hardw00t/ai-security-arsenal

sca-security

Software Composition Analysis: find vulnerable dependencies, correlate CVE/GHSA/OSV across ecosystems, generate CycloneDX/SPDX SBOMs, assess license compliance, and run reachability-aware triage to suppress unexploitable findings.

소스 보기
원본 Skill 문서

원본 저장소의 제목, 예시, 코드, 표, 링크, 이미지를 유지해 표시합니다.

Software Composition Analysis (SCA)

Router skill for dependency security: SBOM generation, multi-source vuln correlation, license compliance, supply chain review, and reachability-driven triage. Optimized for polyglot repositories and PR-time lockfile review. Load the relevant workflow + ecosystem reference on demand — do not read the whole skill up front.

When to Use

  • Scanning project dependencies for known vulnerabilities (CVE / GHSA / OSV)
  • Generating an SBOM (CycloneDX or SPDX) for a repo, container, or binary
  • Reviewing a PR's lockfile delta for new vulns, license changes, malicious packages
  • Reachability analysis to prioritize the 5-15% of findings that are actually exploitable
  • License compliance against an allow/deny policy
  • Supply chain review: typosquatting, dependency confusion, malicious package triage
  • Ecosystem-specific audits: npm, yarn, pnpm, pip, poetry, Maven, Gradle, Go, Cargo, Ruby, Composer
  • CI/CD integration for continuous dependency scanning

Trigger Phrases

  • "scan dependencies", "check package vulnerabilities", "run npm audit"
  • "generate SBOM", "CycloneDX", "SPDX"
  • "license compliance", "audit licenses"
  • "supply chain", "typosquat", "dependency confusion", "malicious package"
  • "lockfile diff", "dep review", "PR dependency review"
  • "is this CVE reachable", "reachability analysis", "filter false positives"

When NOT to Use This Skill

  • First-party source code vulnerabilities (SQLi, XSS, SSRF, etc.) → use sast-orchestration. SCA looks at third-party deps only.
  • OS-level packages inside container images (apt, apk, rpm) → use container-security. (Overlap: Syft/Grype handle both; choose based on where the bulk of the work is.)
  • Infrastructure-as-Code misconfigurations (Terraform, K8s YAML) → use iac-security.
  • Live web-app runtime testing → use dast-automation.
  • LLM-specific supply chain (model weights, prompts, tool chains) → use llm-security.
  • Mobile app third-party libraries → this skill works, but android-pentest / ios-pentest add platform context (cocoapods, SPM, gradle android).

Decision Tree

Start
 ├── Have a PR that touches a lockfile / manifest?
 │    → workflows/lockfile_diff.md
 │
 ├── Need a baseline for a repo or container?
 │    → workflows/sbom_generation.md  → workflows/vuln_correlation.md (parallel: license_audit.md)
 │
 ├── Got 100+ vuln findings and need to prioritize?
 │    → workflows/reachability_analysis.md  (HIGH-VALUE, use extended thinking)
 │
 ├── New or unfamiliar package just showed up in a dep graph?
 │    → workflows/supply_chain_review.md + references/malicious_package_indicators.md
 │
 ├── License audit only?
 │    → workflows/license_audit.md
 │
 └── Ecosystem-specific question?
      → references/{npm_yarn_pnpm,python_pip_poetry,maven_gradle,go_modules,cargo,ruby_gems,php_composer}.md

Parallelism Hints

Run concurrently (independent):

  • SBOM generation is independent of vuln scanning — start SBOM, then fan out to Grype + OSV-Scanner + ecosystem-native tools while license + supply chain checks also run.
  • Per-ecosystem scans in polyglot repos are fully parallel (npm audit, pip-audit, cargo audit, etc.).
  • License audit and vuln correlation are independent — run concurrently.
  • OSV batch API: batch all package versions in one HTTP call; do not loop.
  • Registry metadata lookups for supply chain triage: parallel, one per package.

Must be sequential:

  • Vuln correlation after SBOM (scanner reads the SBOM).
  • Reachability analysis after vuln correlation (it refines findings).
  • Call-graph construction before reachability queries.
  • Lockfile diff classification before per-delta scans.

Sub-Agent Delegation

  • Polyglot monorepos: one sub-agent per ecosystem. Each runs the matching reference + native scanner + adds to a shared finding set.
  • PR review: one sub-agent per changed lockfile. Each applies workflows/lockfile_diff.md and reports deltas, then a root agent consolidates.
  • Large finding queue: shard by ecosystem or by package-prefix for reachability analysis; each sub-agent handles ~50 findings with the same call graph.
  • Supply chain triage at scale: one sub-agent per batch of ~10 new packages for metadata + tarball inspection.

Reasoning Budget

TaskBudget
SBOM generationminimal — mechanical orchestration
Vuln correlation / dedupminimal — unless scanners disagree on version ranges
License classificationlow — policy lookup
Lockfile diff classificationmedium — distinguish regression vs pre-existing
Reachability analysisextended thinking — combines call graph + vuln metadata + taint + framework semantics
Malicious package triageextended thinking — weighing many weak signals; high cost of FP/FN
Integrity hash mismatch (no version change)extended thinking — possible registry compromise
License expression parsing (dual-license, SPDX exprs)medium

Multimodal Hooks

  • Dependency graph visualizations: syft dir:. -o cyclonedx-json | cyclonedx-cli graph produces a graph you can screenshot into a PR comment for humans.
  • cargo tree -d, npm ls --all, mvn dependency:tree -Dverbose are better consumed as text — do not screenshot.
  • For reachability results, CodeQL's query result JSON is preferred over SARIF HTML render.

Structured Output

All findings MUST conform to schemas/finding.json. Key fields:

  • ecosystem, package_name, installed_version
  • vulnerable_range, fixed_version
  • cve, ghsa, osv_id
  • is_transitive, dependency_path[]
  • is_reachable (reachable / unreachable / unknown), reachability_evidence
  • exploitability_notes
  • license, license_risk
  • malicious_indicators[], finding_type
  • epss_score, kev

Priority rule (applies after correlation + reachability):

ReachableKEVEPSSCVSSPrioritySLA
yesyesanyanyP024h
yesno>=0.5anyP17d
yesnoany>=7P17d
yesno<0.5<7P230d
unknownyesanyanyP1investigate first
unknownnoany>=9P2investigate first
no (unreachable)anyanyanyP3next dep-upgrade cycle

CI/CD Integration

Run at three gates:

  • Pre-commit — lightweight ecosystem-native (npm audit --audit-level=high, pip-audit). Fast local feedback.
  • PRworkflows/lockfile_diff.md as a required check. Block on new high/critical vulns; comment on license / supply-chain flags.
  • Main / nightly — full workflows/sbom_generation.mdvuln_correlation.mdreachability_analysis.md. Publish SBOM as build artifact. Update Dependency-Track / CycloneDX server.

Use --exit-code 1 on the relevant scanner with --severity HIGH,CRITICAL (Trivy) or --fail-on high --only-fixed (Grype) to gate builds. Keep suppressions in tool-native config (.trivyignore, .snyk, deny.toml, suppressions.xml) with reason + expires fields — never suppress silently.

Remediation Strategy

Upgrade paths (see per-ecosystem reference for commands):

  1. Patch-level bump if fix is in a patch release → low risk.
  2. Minor bump if patch unavailable → test + ship.
  3. Major bump or fork → extended thinking; coordinate with owning team.
  4. Virtual patch / WAF rule if upgrade blocked → record in finding's exploitability_notes + set an expiry.
  5. Accept risk → only for is_reachable: "unreachable" + kev: false + epss < 0.2; document + set review date.

Workflow Index

WorkflowPurpose
sbom_generation.mdSyft + CycloneDX + SPDX generation + validation
vuln_correlation.mdGrype + OSV + ecosystem-native merge + KEV/EPSS enrichment
license_audit.mdSBOM-driven license extraction + policy enforcement
lockfile_diff.mdPR-time delta review across lockfiles (frontier-model favored)
reachability_analysis.mdCall-graph-aware filtering — key workflow for triage
supply_chain_review.mdTyposquatting, dependency confusion, malicious-package detection

References Index

ReferenceContent
npm_yarn_pnpm.mdNode.js ecosystem: manifests, scanners, install-script hardening
python_pip_poetry.mdPython: pip/poetry/pdm/uv + hashed lockfiles + sdist risks
maven_gradle.mdJava: Maven + Gradle + Log4Shell-class patterns
go_modules.mdGo: govulncheck (built-in reachability), MVS, binary scanning
cargo.mdRust: cargo-audit + cargo-deny + geiger
ruby_gems.mdRuby: bundler-audit + RubySec
php_composer.mdPHP: composer audit + FriendsOfPHP
sbom_formats.mdCycloneDX 1.6 vs SPDX 2.3 field-by-field
vuln_databases.mdNVD, OSV, GHSA, ecosystem DBs — coverage + gaps
malicious_package_indicators.mdSignal catalog + triage matrix
bounty_patterns_2024_2026.mdPost-2023 supply-chain bounty TTPs (Shai-Hulud 2.0 npm worm, tj-actions/changed-files compromise, CVE-2025-48384 git, transitive reachability)

Templates Index

TemplatePurpose
sca_report.mdFinal report format

Tools

ToolPurposeInstall
syftMulti-eco SBOM generatorbrew install syft
grypeSBOM + dir vuln scannerbrew install grype
trivyMulti-eco scanner (also containers/IaC)brew install trivy
osv-scannerOSV-backed multi-eco, call analysisgo install github.com/google/osv-scanner/cmd/osv-scanner@latest
govulncheckGo official, reachability-awarego install golang.org/x/vuln/cmd/govulncheck@latest
pip-auditPython, PyPA officialpipx install pip-audit
cargo-auditRust, RustSeccargo install cargo-audit
cargo-denyRust, unified advisories + licenses + sourcescargo install cargo-deny
cyclonedx-cliSBOM convert / merge / validatebrew install cyclonedx-cli
snykCommercial, multi-econpm install -g snyk
socketSupply chain risk scoring (npm/PyPI/Go/Rust)npm install -g @socketsecurity/cli
OWASP Dependency-CheckJava-focused, NVD-backedhttps://github.com/jeremylong/DependencyCheck
license-checkernpm license scannpm install -g license-checker
pip-licensesPython license scanpipx install pip-licenses
go-licensesGo license scango install github.com/google/go-licenses@latest

Last Validated

2026-04. Tool minimum versions per ecosystem are listed at the bottom of each references/*.md. Advisory DBs (OSV, GHSA) are rolling — re-check coverage notes in references/vuln_databases.md for NVD backlog status.

같은 저장소의 Skills

더 많은 Skills

모든 Skills
hardw00t
커뮤니티

api-security

Router skill for API penetration testing across REST, GraphQL, gRPC, and WebSocket. Covers OWASP API Top 10 (2023) including BOLA/BFLA/BOPLA, JWT attack chains, GraphQL introspection abuse, and mass assignment. Invoke when the user asks to pentest an API, analyze OpenAPI/Swagger, test auth/authorization, fuzz endpoints, or find API vulnerabilities.

설치 수
1
GitHub Stars
101
업데이트
4월 19일
hardw00t
커뮤니티

cloud-security

Multi-cloud security assessment skill for AWS, Azure, and GCP. Use when performing cloud security audits, scanning for misconfigurations, testing IAM policies, auditing storage permissions, and identifying privilege escalation paths. Triggers on requests to audit cloud security, scan AWS/Azure/GCP, check cloud misconfigurations, or perform cloud penetration testing. Covers CIS benchmarks, CSPM, and cross-cloud identity federation.

설치 수
1
GitHub Stars
101
업데이트
4월 19일
hardw00t
커뮤니티

dast-automation

Automated Dynamic Application Security Testing (DAST) using Playwright MCP plus standard OS pentest tooling. Performs blackbox or greybox scans on single or multiple domains with orchestrated crawling, vulnerability detection, and structured output. Trigger on requests like "scan this domain", "run DAST on these URLs", "automated pentest", or "security-test the staging app".

설치 수
1
GitHub Stars
101
업데이트
4월 19일
hardw00t
커뮤니티

iac-security

Infrastructure-as-Code security scanning router for Terraform, CloudFormation, Kubernetes manifests, Helm, ARM/Bicep. Orchestrates Checkov, tfsec, Terrascan, KICS, kubesec, kube-linter, Polaris, cfn-lint/cfn-nag, and OPA/Conftest. Use when auditing IaC for misconfigurations, scanning Terraform plans, validating K8s security policies, checking cloud infrastructure compliance, or authoring custom policy-as-code (Rego).

설치 수
1
GitHub Stars
101
업데이트
4월 19일