security-scanning
Automated security scanning pipeline covering SAST (Semgrep), SCA (OWASP dependency-check), SBOM generation (Syft), vulnerability scanning (Grype), and…
от oimiragieo★ 48 звёзд на GitHub
Установить security-scanning в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Об этом скилле
Security Scanning Skill
Automated security scanning pipeline: SAST, SCA, SBOM, and secrets detection.
Tools
| Tool | Purpose | Install |
|---|---|---|
| Semgrep | SAST — static analysis | pip install semgrep |
| OWASP dependency-check | SCA — known CVEs in deps | brew install dependency-check |
| Syft | SBOM generation | brew install anchore/syft/syft |
| Grype | Vulnerability scanner (uses SBOM) | brew install anchore/grype/grype |
| detect-secrets | Secrets detection | pip install detect-secrets |
Phase 1: SAST — Static Analysis (Semgrep)
# Run default ruleset
semgrep --config auto .
# Run security-focused rules only
semgrep --config p/security-audit .
# Run OWASP Top 10 rules
semgrep --config p/owasp-top-ten .
# Output JSON for CI
semgrep --config auto --json --output semgrep-results.json .
# Fail CI on any HIGH or CRITICAL finding
semgrep --config auto --severity ERROR .
Recommended rulesets:
p/security-audit— broad security auditp/owasp-top-ten— OWASP Top 10 coveragep/javascript— JS/TS patterns (injection, XSS, prototype pollution)p/python— Python patterns (SQL injection, insecure deserialization)p/secrets— hardcoded credential detection
Phase 2: SCA — Software Composition Analysis (OWASP dependency-check)
# Scan Node.js project
dependency-check --project myapp --scan . --format JSON --out dependency-check-report
# Scan with NVD API key (avoids rate limiting)
dependency-check --project myapp --scan . \
--nvdApiKey "$NVD_API_KEY" \
--format HTML --out reports/
# CI integration: fail on CVSS >= 7.0
dependency-check --project myapp --scan . \
--failOnCVSS 7 \
--format JSON --out reports/
# Suppress false positives
dependency-check --project myapp --scan . \
--suppression suppressions.xml
Phase 3: SBOM Generation (Syft)
# Generate SBOM for current directory
syft . -o spdx-json > sbom.spdx.json
# SBOM from Docker image
syft my-image:latest -o cyclonedx-json > sbom.cyclonedx.json
# Multiple formats
syft . -o spdx-json -o cyclonedx-json -o syft-json
# Sign SBOM with cosign
cosign attest --predicate sbom.spdx.json --type spdx $IMAGE_DIGEST
Phase 4: Vulnerability Scanning (Grype)
# Scan from SBOM
grype sbom:sbom.spdx.json
# Scan Docker image directly
grype my-image:latest
# Scan current directory
grype .
# Fail on CRITICAL or HIGH
grype sbom:sbom.spdx.json --fail-on high
# Output JSON for CI
grype sbom:sbom.spdx.json -o json > grype-results.json
# Filter by severity
grype sbom:sbom.spdx.json --only-fixed
Phase 5: Secrets Detection (detect-secrets)
# Create baseline (initial scan)
detect-secrets scan > .secrets.baseline
# Audit baseline interactively
detect-secrets audit .secrets.baseline
# Scan for new secrets (CI check)
detect-secrets scan --baseline .secrets.baseline
# Add to pre-commit hook
# .pre-commit-config.yaml:
# - repo: https://github.com/Yelp/detect-secrets
# rev: v1.4.0
# hooks:
# - id: detect-secrets
# args: ['--baseline', '.secrets.baseline']
Pre-Commit Gate
# .pre-commit-config.yaml
repos:
- repo: https://github.com/returntocorp/semgrep
rev: v1.58.0
hooks:
- id: semgrep
args: ['--config', 'p/security-audit', '--error']
- repo: https://github.com/Yelp/detect-secrets
rev: v1.4.0
hooks:
- id: detect-secrets
args: ['--baseline', '.secrets.baseline']
CI Integration (GitHub Actions)
# .github/workflows/security.yml
name: Security Scan
on: [push, pull_request]
jobs:
security:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: SAST (Semgrep)
uses: returntocorp/semgrep-action@v1
with:
config: p/security-audit
- name: Generate SBOM
uses: anchore/sbom-action@v0
with:
format: spdx-json
output-file: sbom.spdx.json
- name: Vulnerability Scan (Grype)
uses: anchore/scan-action@v3
with:
sbom: sbom.spdx.json
fail-build: true
severity-cutoff: high
- name: Secrets Detection
run: |
pip install detect-secrets
detect-secrets scan --baseline .secrets.baseline
Finding Triage Workflow
HIGH/CRITICAL findings:
→ Create security issue immediately
→ Assign to security-architect for review
→ Block merge until resolved or suppressed with justification
MEDIUM findings:
→ Log in security backlog
→ Review in next sprint
→ Add to suppression file with justification if false positive
LOW/INFO findings:
→ Weekly review
→ Suppress with justification or accept risk
Su
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
- 01
Bash - 02
Read - 03
Write - 04
Grep
Вложенные файлы
- commands/security-scanning.md
- hooks/post-execute.cjs
- hooks/pre-execute.cjs
- references/research-requirements.md
- rules/security-scanning.md
- schemas/input.schema.json
- schemas/output.schema.json
- scripts/main.cjs
- templates/implementation-template.md
FAQ
Что делает скилл security-scanning?
Automated security scanning pipeline covering SAST (Semgrep), SCA (OWASP dependency-check), SBOM generation (Syft), vulnerability scanning (Grype), and secrets detection (detect-secrets). Invoked by security-architect for pre-commit gates, CI integration, and finding triage.
Как установить скилл security-scanning?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл security-scanning запускает скрипты?
Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.
Похожие скиллы
mcp-builder
AnthropicGuide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when…
claude-api
AnthropicReference for the Claude API / Anthropic SDK — model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration. TRIGGER…
algorithmic-art
AnthropicCreating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code…
mcp-integration
AnthropicThis skill should be used when the user asks to "add MCP server", "integrate MCP", "configure MCP in plugin", "use .mcp.json", "set up Model Context…