К основному содержанию
скилл CX Codex

security-devsecops — скилл для Claude Code

Скилл security-devsecops для Claude Code и Codex направляет разработку по практикам DevSecOps и AppSec. Включается при работе с секретами, базой данных, аутентификацией или настройке CI/CD.

Apache-2.0 117 установок ★ 312 обновлён 2026-10-08

Установить в Claude Code · Через Skills CLI (Vercel) Все способы и платформы ↓
npx skills add Mindrally/skills --skill security-devsecops -a claude-code
Открыть на GitHub

Что делает security-devsecops

Скилл внедряет пошаговый процесс безопасной разработки (SSDLC) от локального написания кода до пайплайнов доставки. Он задаёт алгоритм из семи шагов: поиск границ доверия, валидация входящих параметров, отказ от самодельной криптографии, изоляция секретов, локальный аудит и обязательные проверки в CI.

В правилах собраны требования к хранению учётных данных через переменные окружения или хранилища вроде HashiCorp Vault и AWS Secrets Manager. Для баз данных скилл запрещает конкатенацию строк и интерполяцию в пользу параметризованных запросов. В авторизации он требует обязательной повторной валидации прав на сервере для каждого запроса к ресурсу.

Провал проверок SAST, SCA или IaC на этапе CI скилл предписывает считать блокирующей ошибкой сборки, запрещая заглушать предупреждения сканеров без аудита.

Какие задачи решает

  • настроить проверки SAST, SCA и сканирование IaC в пайплайне CI/CD
  • исключить утечку паролей и API-токенов в коммиты и логи
  • перевести сырые SQL-запросы на безопасную параметризацию
  • проверить серверный контроль доступа к объектам по ID

Примеры запросов агенту

  • Проверь этот эндпоинт на уязвимости и настрой валидацию входных данных
  • Добавь шаг сканирования зависимостей через pip-audit в конфигурацию CI
  • Перепиши запрос к базе данных с конкатенации строк на параметризованный вид

Как установить security-devsecops

1Через Skills CLI (Vercel)

npx skills add Mindrally/skills --skill security-devsecops -a claude-code

2Вручную: положить файлы

~/.claude/skills/security-devsecops/SKILL.md

Папка скилла целиком; для одного проекта — .claude/skills/security-devsecops/

По шагам, с командами для каждой платформы: Как установить скилл в Claude Code: пять способов

Вопросы о security-devsecops

Как установить security-devsecops в Claude Code?

Выполните команду npx skills add Mindrally/skills --skill security-devsecops -a claude-code либо сохраните файл по пути ~/.claude/skills/security-devsecops/SKILL.md.

Что делает security-devsecops?

Он задаёт модели безопасного программирования, правила защиты секретов, проверку сторонних библиотек и настройку автоматических проверок кода в CI/CD.

Какие утилиты сканирования упоминаются в скилле?

В руководстве указаны сканеры секретов gitleaks и trufflehog, анализаторы зависимостей pip-audit, npm audit и trivy, а также инструменты SAST и проверки конфигураций semgrep, checkov и tfsec.

Исходный текст

SKILL.md · Apache-2.0
---
name: security-devsecops
description: "DevSecOps, secure software development lifecycle (SSDLC), and application security (AppSec) practices covering secret handling, input validation, dependency hygiene, authentication/authorization, and CI/CD security tooling (SAST, SCA, DAST, secret scanning, IaC scanning). Use when writing code that handles credentials, user input, database queries, or authentication, when setting up a CI/CD pipeline, or when reviewing code or infrastructure for security issues."
metadata:
  maintainer: Mindrally
  source: https://github.com/Mindrally/skills
---

# Security / DevSecOps

This skill covers secure coding practices, dependency and secret hygiene, authentication and authorization, and the security tooling that belongs in a secure software development lifecycle (SSDLC) — from local coding habits through CI/CD gates to production monitoring.

## Workflow for Adding a New Feature Securely

1. **Identify trust boundaries** — Note every place the new code accepts input from a user, another service, or a file, and every place it emits output (HTML, logs, another service).
2. **Validate and sanitize at the boundary** — Validate all untrusted input on entry; escape output for its destination context (HTML, JS, SQL, shell).
3. **Use existing security primitives** — Reach for the project's established auth framework, ORM, and secret-management approach rather than writing new ones.
4. **Keep secrets out of code and logs** — Read credentials from environment variables or a secrets vault; confirm nothing sensitive reaches logs or error messages.
5. **Run local security checks before pushing** — Lint, SAST, and secret-scanning tools where available (`gitleaks`, `semgrep`, `npm audit`, `pip-audit`, etc.).
6. **Let CI gates run** — SAST, SCA, secret scanning, and IaC scanning should run on every PR; treat a failure as a blocker, not a suggestion to suppress.
7. **Document the security-relevant decision** — Note in the PR description any auth/authz change, new dependency, or deviation from a default-secure pattern, so it's auditable later.

## General Security Principles

- Never hardcode secrets, credentials, or API keys in source code. Use environment variables or a secure vault (e.g. AWS Secrets Manager, HashiCorp Vault, Doppler) for sensitive data.
- Never commit `.env` files, secret config files, or unrecognized tokens to source control. Add them to `.gitignore` before they're ever staged.
- Never log sensitive data, secrets, or session tokens in application logs — redact or omit them at the point of logging, not after the fact.
- Validate and sanitize all user input at the point it enters the system. Escape output appropriately for its context: HTML-encode for HTML, JS-encode for inline scripts, parameterize for SQL.
- Avoid unsafe dynamic-execution functions such as `exec`, `eval`, `Function()`, `pickle.loads` on untrusted data, or shell interpolation of user input.

```python
# Unsafe — string interpolation into a query
query = f"SELECT * FROM users WHERE email = '{email}'"
cursor.execute(query)

# Safe — parameterized query
cursor.execute("SELECT * FROM users WHERE email = %s", (email,))
```

## Secret Handling

- Load secrets from environment variables (`process.env.API_KEY`, `os.environ["API_KEY"]`) or a vault client, never as literals.
- Rotate any credential that was ever committed to version control, even if the commit was later removed — history retains it.
- Scan for accidentally committed secrets before merge, using tools like `gitleaks`, `trufflehog`, or the CI provider's built-in secret scanning.
- Scope credentials narrowly: a CI deploy key should be able to deploy, not administer the whole cloud account.

## Database Security

- Use parameterized queries or an ORM for all database access. Never build queries via string concatenation or f-strings with user input.
- Ensure database users have the least privilege required for their role (a reporting service should not have `DROP TABLE` rights).
- Regularly review and update database access policies as team membership and service responsibilities change.

## Dependency Management

- Only add packages from verified, reputable sources — check download counts, maintenance activity, and known-CVE history before adding a new dependency.
- Do not add new dependencies without explicit approval and a brief security review, especially for packages that will run with elevated privileges or process untrusted input.
- Regularly update dependencies and scan for known vulnerabilities using Software Composition Analysis (SCA) tools such as `npm audit`, `pip-audit`, `Dependabot`, `Snyk`, or `Trivy`.

```bash
# Node.js
npm audit --audit-level=high

# Python
pip-audit

# Container image
trivy image myapp:latest
```

## Authentication & Authorization

- Use established, audited authentication frameworks (e.g. Auth0, Passport, Devise, ASP.NET Identity) — never implement custom cryptographic authentication from scratch.
- Store passwords using strong, salted, adaptive hashes: Argon2id or bcrypt, never MD5, SHA1, or unsalted SHA256.
- Implement Role-Based Access Control (RBAC) — or attribute-based access control for finer granularity — for sensitive operations.
- Enforce the principle of least privilege for both API endpoints and UI actions: check authorization on every request server-side, never trust a hidden UI element as an access control.
- Re-check authorization on every request, even for actions previously permitted — session state and roles can change mid-session.

```js
// Missing authorization check — any authenticated user can access any order
app.get("/orders/:id", requireAuth, async (req, res) => {
  const order = await Order.findById(req.params.id);
  res.json(order);
});

// Correct — verify the resource belongs to the requester
app.get("/orders/:id", requireAuth, async (req, res) => {
  const order = await Order.findById(req.params.id);
  if (!order || order.userId !== req.user.id) {
    return res.status(404).end();
  }
  res.json(order);
});
```

## Secure SDLC Practices

Integrate these into the CI/CD pipeline, not as a manual pre-release checklist:

- **SAST** (Static Application Security Testing) — scan source code for known-bad patterns on every PR (e.g. Semgrep, CodeQL, SonarQube).
- **SCA** (Software Composition Analysis) — scan dependencies for known vulnerabilities and license issues (e.g. Snyk, Dependabot, OWASP Dependency-Check).
- **Secret scanning** — scan every commit and PR diff for accidentally committed credentials before merge (e.g. Gitleaks, GitHub secret scanning, TruffleHog).
- **IaC scanning** — scan Terraform/CloudFormation/Kubernetes manifests for misconfigurations before apply (e.g. Checkov, tfsec, Trivy config scan).
- **DAST** (Dynamic Application Security Testing) — scan a running instance of the deployed application for exploitable behavior in the CD pipeline (e.g. OWASP ZAP, Burp Suite).
- **Policy as Code (PaC)** — encode security and compliance policies as version-controlled, automatically enforced rules (e.g. OPA/Rego, Sentinel) rather than a document nobody rereads.

## Monitoring & Feedback

- Enable continuous vulnerability monitoring and alerting on both dependencies and running infrastructure.
- Integrate Runtime Application Self-Protection (RASP) and a Web Application Firewall (WAF) where the deployment target and traffic profile warrant it.
- Schedule regular vulnerability assessments and penetration tests, not just point-in-time audits before a big release.
- Maintain a feedback loop: recurring vulnerability classes found in production or pentests should update linting rules, SAST policies, and code review checklists — not just get patched once.

## Compliance & Documentation

- Align controls with recognized industry standards: OWASP Top 10, OWASP ASVS, NIST SSDF, ISO 27001, as relevant to the project's regulatory context.
- Document security controls and decisions as they're made (threat model notes, why an exception was granted, what compensating control offsets a known risk) so the reasoning is auditable later, not reconstructed from memory during an audit.

## Common Vulnerability Classes to Watch For

| Class | Watch for |
|---|---|
| Injection (SQL/NoSQL/command) | String-built queries or shell commands with user input |
| Broken access control | Missing per-request authorization checks, IDOR via predictable IDs |
| Cryptographic failures | Weak hashes, hardcoded keys, missing TLS, custom crypto |
| Insecure deserialization | `pickle`, unchecked `JSON.parse` into executable contexts, unsafe YAML loaders |
| Security misconfiguration | Default credentials, verbose error pages in production, permissive CORS |
| Vulnerable dependencies | Outdated packages with known CVEs, unpinned versions |
| Insufficient logging | No audit trail for auth events, sensitive data logged in plaintext |

© Mindrally · Apache-2.0 · Mindrally/skills

Похожие скиллы

Все скиллы по теме «Безопасность» →
sast-sca-security-analyzer официальный github Субагент sast-sca-security-analyzer для GitHub Copilot ищет уязвимости в коде и сторонних зависимостях. Он включается для проверок SAST и SCA, а также аудита соответствия политикам. CX Codex +1 ★ 41 430звёзд репо building-devsecops-pipeline-with-gitlab-ci mahipal Скилл building-devsecops-pipeline-with-gitlab-ci помогает встроить проверки безопасности в GitLab CI/CD: анализирует код, зависимости, контейнеры и секреты. Пригодится при настройке сканирования до деплоя. CX Codex +1 243установок agentic-security Clear-Capabilities Плагин agentic-security для Claude Code, который ищет уязвимости в коде, проверяет находки на эксплуатируемость и чинит их. Валидирует каждый патч через сканирование, линтер и тесты перед записью в файлы. ★ 121звёзд репо appsec-expert martinholovsky Скилл appsec-expert для Claude Code проектирует защиту приложений, ищет уязвимости и встраивает проверки безопасности в разработку. Помогает проводить аудит и исправлять проблемы безопасности. CX Codex +1 243установок devsecops-expert martinholovsky Скилл devsecops-expert для Claude Code помогает встраивать проверки безопасности в CI/CD и настраивать защиту контейнеров и инфраструктуры. Он включается при работе с секретами и безопасностью цепочки поставок. CX Codex +1 366установок application-security-testing usestrix Скилл application-security-testing для Claude Code подбирает проверки кода, веб-приложения, API и CI, затем собирает подтверждённые проблемы в план исправлений. Проводит первичный AppSec-аудит. CX Codex +1 17 000установок

Из того же набора247

Весь набор →
clean-code Скилл clean-code для Claude Code помогает писать и проверять понятный код без лишних абстракций. Включается при создании функций, рефакторинге и ревью. CX Codex +1 182установок embedded-stm32 Скилл embedded-stm32 для Claude Code и Codex задаёт правила разработки встроенного ПО на C/C++ под микроконтроллеры STM32 с библиотекой HAL. Включается при генерации кода в CubeMX, настройке DMA и обработке прерываний. CX Codex +1 132установок network-troubleshooting Скилл network-troubleshooting для Claude Code разбирает сетевые сбои в командах и сервисах. Запускается при ошибках DNS, TLS, прокси, соединения или тайм-аутах реестра пакетов. CX Codex +1 131установок readme-best-practices Скилл readme-best-practices для Claude Code помогает писать и проверять README проектов. Он подключается при создании файла, переработке существующего README или оценке его качества. CX Codex +1 121установок ros2-robotics Скилл ros2-robotics для Claude Code помогает разрабатывать пакеты и узлы ROS 2. Подключается при работе с топиками, QoS, tf2, файлами запуска или тестами рабочего пространства colcon. CX Codex +1 111установок blender-python-addon Скилл blender-python-addon для Claude Code задаёт правила разработки дополнений к Blender через API bpy. Подключается при создании операторов, панелей интерфейса и работе с bmesh. CX Codex +1 111установок automl-hyperparameter-optimization Скилл automl-hyperparameter-optimization для Claude Code помогает настраивать AutoML и поиск гиперпараметров. Включается при проектировании валидации, запуске распределённого поиска и проверке результатов перед продакшеном. CX Codex +1 110установок gamemaker-gml Скилл gamemaker-gml для Claude Code задаёт правила разработки на GameMaker Language (GML). Включается при написании скриптов, настройке событий объектов, комнат и стейт-машин в GameMaker Studio. CX Codex +1 109установок

Спонсоры проекта

Компании, которые помогают держать аналитику открытой