implementing-devsecops-security-scanning
Что он делает
Этот инструмент помогает автоматизировать проверку кода и приложений на безопасность. Он ищет распространённые уязвимости, утёкшие секреты и уязвимости в зависимостях до того, как код попадёт в продакшен.
Когда использовать
- ✓Когда нужно настроить автоматическое сканирование безопасности для проекта.
- ✓Чтобы находить проблемы безопасности до выпуска кода.
- ✓Чтобы выполнять требования безопасности, например SOC 2 или PCI-DSS.
Ссылка на скилл
https://github.com/mukul975/Anthropic-Cybersecurity-Skills/blob/main/skills/implementing-devsecops-security-scanning/SKILL.mdСкопируйте и вставьте её в ваш ИИ (Claude, ChatGPT или Cursor) с просьбой следовать инструкциям.
Как использовать
Самый простой способ: скопируйте сообщение и вставьте его в свой ИИ. Он прочитает скилл и выполнит инструкции.
Готовое сообщение для вставки
Для Claude Code, Codex или Cursor: запустите в папке проекта, и скилл установится.
Скачайте SKILL.md и положите его в папку скиллов вашего агента.
Пример запроса к вашему ИИ
“Настрой автоматическое сканирование безопасности для моего проекта.”
5 новых скиллов в неделю. 1 минута чтения.
Как это работает
Инструмент использует такие средства, как Gitleaks, Semgrep, Trivy и OWASP ZAP, чтобы проанализировать ваш код и приложения на наличие проблем. Результаты выводятся так, чтобы вы могли их исправить.
Технический текст (оригинальный SKILL.md)
Оригинальный текст автора на английском, прямо с GitHub.
Implementing DevSecOps Security Scanning
When to Use
- Setting up automated security scanning in a new or existing CI/CD pipeline
- Shifting security left by catching vulnerabilities before code reaches production
- Meeting compliance requirements (SOC 2, PCI-DSS, ISO 27001) that mandate automated security testing
- Integrating SAST, DAST, and SCA together to achieve comprehensive application security coverage
- Establishing security gates that block deployments containing critical or high-severity vulnerabilities
Do not use as a replacement for manual penetration testing. Automated scanning catches common vulnerability patterns but cannot replace human-driven security assessments for business logic flaws and complex attack chains.
Prerequisites
- CI/CD platform: GitHub Actions, GitLab CI, Jenkins, or Azure DevOps
- Container runtime (Docker) for running scanning tools
- A staging environment URL for DAST scanning (DAST cannot test static code)
- Repository access with permissions to modify CI/CD workflow files
- Tool-specific requirements:
- Semgrep: free for open-source rulesets (
p/security-audit,p/owasp-top-ten) - Trivy: free, no account required
- OWASP ZAP: free, Docker image available
- Gitleaks: free, no account required
- Semgrep: free for open-source rulesets (
Workflow
Step 1: Add Secrets Detection with Gitleaks
Secrets detection runs first because leaked credentials are the highest-priority finding. Add to .github/workflows/security.yml:
name: DevSecOps Security Pipeline
on:
push:
branches: [main, develop]
pull_request:
branches: [main]
jobs:
secrets-scan:
name: Secrets Detection (Gitleaks)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0 # Full history for scanning all commits
- name: Run Gitleaks
uses: gitleaks/gitleaks-action@v2
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Configure .gitleaks.toml in the repository root for custom rules and allowlists:
[extend]
useDefault = true
[allowlist]
description = "Global allowlist"
paths = [
'''\.gitleaks\.toml''',
'''test/fixtures/.*''',
'''docs/examples/.*'''
]
[[rules]]
id = "custom-internal-api-key"
description = "Internal API key pattern"
regex = '''INTERNAL_KEY_[A-Za-z0-9]{32}'''
tags = ["internal", "api-key"]
Step 2: Add SAST Scanning with Semgrep
Semgrep performs static code analysis to find security vulnerabilities, bugs, and code patterns:
sast-scan:
name: SAST (Semgrep)
runs-on: ubuntu-latest
container:
image: semgrep/semgrep
steps:
- uses: actions/checkout@v4
- name: Run Semgrep SAST scan
run: |
semgrep scan \
--config p/security-audit \
--config p/owasp-top-ten \
--config p/secrets \
--severity ERROR \
--error \
--json \
--output semgrep-results.json \
.
- name: Upload SAST results
if: always()
uses: actions/upload-artifact@v4
with:
name: semgrep-results
path: semgrep-results.json
For custom rules, create .semgrep/custom-rules.yml:
rules:
- id: no-exec-user-input
patterns:
- pattern: exec($INPUT)
- pattern-not: exec("...")
message: >
User input passed to exec(). This is a command injection vulnerability.
severity: ERROR
languages: [python]
metadata:
cwe: "CWE-78: OS Command Injection"
owasp: "A03:2021 - Injection"
- id: no-raw-sql-queries
patterns:
- pattern: cursor.execute(f"...")
- pattern: cursor.execute("..." + ...)
message: >
SQL query built with string concatenation or f-strings. Use parameterized queries.
severity: ERROR
languages: [python]
metadata:
cwe: "CWE-89: SQL Injection"
owasp: "A03:2021 - Injection"
Step 3: Add SCA Scanning with Trivy
Trivy scans dependencies, container images, IaC files, and generates SBOM:
sca-scan:
name: SCA & Container Scan (Trivy)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Run Trivy filesystem scan (dependencies)
uses: aquasecurity/trivy-action@0.28.0
with:
scan-type: 'fs'
scan-ref: '.'
severity: 'CRITICAL,HIGH'
exit-code: '1'
format: 'json'
output: 'trivy-fs-results.json'
…
Частые вопросы
Что такое SAST, DAST и SCA?
SAST (Static Application Security Testing) проверяет код без его запуска. DAST (Dynamic Application Security Testing) тестирует работающее приложение. SCA (Software Composition Analysis) проверяет библиотеки и зависимости, которые вы используете.
Нужно ли платить за эти инструменты?
Инструменты, упомянутые здесь (Semgrep, Trivy, OWASP ZAP, Gitleaks), бесплатны для большинства сценариев, особенно при настройках по умолчанию и с открытыми правилами.
Заменяет ли это ручное тестирование безопасности?
Нет. Этот автоматический инструмент находит типичные проблемы, но не заменяет глубокий анализ, который проводят специалисты по безопасности.
Подробности
Оригинальное описание автора
Integrates SAST, DAST, and SCA into CI/CD pipelines using Semgrep for SAST, Trivy for SCA and container scanning, OWASP ZAP for DAST, and Gitleaks for secrets detection. Use when setting up automated security scanning in CI/CD, shifting security left, meeting compliance mandates (SOC 2, PCI-DSS, ISO 27001), or gating deployments on critical vulnerabilities. '
Популярность
- Звёзды на GitHub
- 35k
- Место в рейтинге
- #8027
- Лицензия
- Apache-2.0
- Обновлён
- 31.08.2026
Комментарии
- …
Другие скиллы из этого репозитория
abusing-dpapi-for-credential-access
35kДаёт ИИ-агенту готовые инструкции для конкретной задачи, чтобы он делал её лучше и быстрее.
abusing-shadow-credentials-for-privesc
35kУчит ИИ-агента писать ясные структурированные тексты.
achieving-cmmc-level-2-compliance
35kПомогает агенту подготовить среду к соответствию CMMC уровня 2.
acquiring-disk-image-with-dd-and-dcfldd
35kПомогает агенту создавать точные копии дисков для расследований.
Похожие скиллы
openclaw-update
394kПомогает агенту обновить уже работающий OpenClaw Gateway, выбрав способ обновления по тому, как он был установлен, и сохранив вашу сессию.
diagnose-gateway
394kПомогает агенту выяснить, почему ваш OpenClaw Gateway не работает, проверяя настройки, каналы и порты, но ничего не меняя.
crabbox-apps
394kПомогает агенту открыть и запустить приложение на временной облачной машине, а затем показать его вид на боковой панели чата.