skills/sast-orchestration/SKILL.md
Static Application Security Testing orchestration — run and compose Semgrep, CodeQL, Bandit, gosec, Brakeman, SpotBugs, ESLint; author custom rules; ingest SARIF; triage and rank findings by exploitability. Use this skill when asked to scan code for vulnerabilities, write Semgrep/CodeQL rules, triage SAST output, reduce false positives, or integrate SAST into CI/CD. Triggers on phrases like 'scan this code', 'write a Semgrep rule', 'triage these findings', 'SARIF', 'SAST in CI', or when a repo is handed over for a security review.
npx skillsauth add hardw00t/ai-security-arsenal sast-orchestrationInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
This skill runs multiple static-analysis tools against a codebase, authors custom detection rules, ingests SARIF, and performs high-signal triage. The headline capability is triage: converting raw, noisy SAST output into a ranked list of exploitable findings — where frontier reasoning models outperform traditional tools.
sca-security.dast-automation.container-security.iac-security.android-pentest / ios-pentest.llm-security.threat-modeling.SAST = source code static analysis. If the artifact is not source, check a sibling skill first.
Incoming request
│
├── "write a rule" → workflows/custom_semgrep_from_cve.md (from CVE/advisory)
│ workflows/custom_codeql_from_sink.md (from sink spec)
│
├── "triage these findings"→ workflows/triage.md [MAX THINKING]
│
├── "scan this codebase" → workflows/multi_tool_scan.md (parallel fan-out)
│ then workflows/triage.md
│
├── "too much noise" → workflows/false_positive_reduction.md
│
├── "SAST in CI" → workflows/cicd_integration.md
│
└── "which tool for X?" → references/<tool>.md (selection matrix below)
Tool-picking rules of thumb:
| Codebase characteristic | First choice | Second |
|-------------------------|-------------|--------|
| Polyglot / unfamiliar | Semgrep (auto) | CodeQL (security-extended per lang) |
| Python mono-repo | Semgrep + Bandit | CodeQL python-security-extended |
| Go services | gosec + Semgrep | CodeQL go-security-extended |
| Rails app | Brakeman | Semgrep p/ruby |
| Java / Spring | SpotBugs+FSB | CodeQL java-security-extended |
| JS/TS + Node | Semgrep p/javascript p/nodejs | ESLint security plugins |
| Need inter-procedural taint | CodeQL | Semgrep Pro |
| Fast PR gating | Semgrep ci mode | ESLint for JS |
Independent (run concurrently):
database create across distinct languages — independent.database analyze across distinct language databases — independent.Sequential (hard dependency):
database create → database analyze for the same language.mvn compile / gradle build to have produced classes first.See workflows/multi_tool_scan.md for the reference orchestration.
Pattern: one sub-agent per tool for scanning; one aggregator/triage agent downstream.
<tool> and reports SARIF path + count. Minimal thinking.schemas/finding.json, deduplicates by (cwe, file, ±3 lines).Do not pool tool-specific expertise into one mega-agent — it collapses parallelism and exhausts context.
Allocate extended thinking deliberately — not uniformly.
| Activity | Budget | Rationale |
|----------|--------|-----------|
| Running a scan (semgrep --config=auto .) | None | Mechanical; just invoke |
| Pack selection / tool selection | Low | Matrix lookup in references/<tool>.md |
| SARIF aggregation + dedup | Low | Deterministic key-based merge |
| Triage (workflows/triage.md) | MAXIMUM | Reachability, taint, impact, FP classification — where Opus-4.7-class models dominate |
| Custom Semgrep rule from CVE | High | Generalizing patch diff → AST pattern |
| Custom CodeQL query from sink | High | Source/sink/barrier modeling |
| FP reduction (rule tuning) | Medium | Pattern recognition across findings |
| CI/CD config | Low | Template instantiation |
Headline: extended thinking pays off most on triage. This is the single biggest win over traditional SAST tools. Do not rush per-finding analysis.
All findings — regardless of source tool — conform to schemas/finding.json. Key fields include tool, rule_id, cwe, file_path, line, column, snippet, confidence, exploitability_rank (1-5), is_reachable, taint_source, taint_sink, taint_flow, is_false_positive, fp_reason, remediation, fix_suggestion.
Use SARIF 2.1.0 for tool-native emission; convert to the finding schema during aggregation. See references/sarif_format.md.
| Workflow | Purpose | Thinking | |----------|---------|----------| | workflows/multi_tool_scan.md | Run Semgrep + CodeQL + language tools in parallel; dedup SARIF | Low | | workflows/triage.md | HEADLINE — ingest SARIF, rank exploitability, identify FPs, emit fix suggestions | MAX | | workflows/custom_semgrep_from_cve.md | CVE advisory + patch → Semgrep rule + tests | High | | workflows/custom_codeql_from_sink.md | Sink API → taint-tracking query with sources/sanitizers | High | | workflows/false_positive_reduction.md | Systematic rule-level FP triage + suppression loop | Medium | | workflows/cicd_integration.md | GitHub Actions / GitLab CI / Bitbucket / Jenkins / pre-commit templates | Low |
| Reference | Covers |
|-----------|--------|
| references/semgrep.md | Install, pack selection, rule authoring, taint mode, autofix |
| references/codeql.md | DB creation, suite names, modern DataFlow::ConfigSig taint template |
| references/bandit.md | Python AST scanner: test IDs, known FPs |
| references/gosec.md | Go scanner: G-rule table, suppressions |
| references/brakeman.md | Rails-aware scanner: check list, config |
| references/spotbugs.md | Java bytecode + Find Security Bugs: Maven/Gradle setup, FSB detectors |
| references/eslint_security.md | JS/TS security plugins: flat-config + legacy |
| references/sarif_format.md | SARIF 2.1.0 schema, codeFlows, fingerprinting, emission flags |
| references/bounty_patterns_2024_2026.md | Post-2023 bounty TTPs as SAST rule ideas (prototype-pollution, ORM JOIN leakage, AI-tool-call injection in repo/config strings) |
| Path | Purpose |
|------|---------|
| examples/semgrep_rules/sql_injection.yaml | Multi-language SQL injection rules (textual + taint) |
| examples/semgrep_rules/ssrf.yaml | SSRF rules — Python/JS/Go with taint + fallback |
| examples/semgrep_rules/hardcoded_secret.yaml | Secret-pattern regex rules: AWS, GitHub, Slack, Stripe, keys |
| examples/codeql_queries/taint_template.ql | Starter taint-tracking query (Python, modern API) |
| examples/codeql_queries/sql_injection_taint.ql | Full SQLi taint query: multi-framework sources + sanitizers |
| examples/codeql_queries/hardcoded_credential.ql | Single-location @kind problem query |
| Script | Purpose |
|--------|---------|
| scripts/sast_scan.sh | Parallel multi-tool orchestration; emits SARIF per tool |
| scripts/aggregate_results.py | SARIF → schemas/finding.json with dedup |
| Tool | Purpose | Install |
|------|---------|---------|
| Semgrep | Multi-language pattern + taint SAST | pip install semgrep / brew install semgrep |
| CodeQL | Deep taint SAST, GitHub-native | Download CLI from github/codeql-cli-binaries |
| Bandit | Python AST scanner | pip install 'bandit[sarif]' |
| gosec | Go scanner | go install github.com/securego/gosec/v2/cmd/gosec@latest |
| Brakeman | Rails scanner | gem install brakeman |
| SpotBugs + FSB | Java bytecode scanner | Maven/Gradle plugin |
| ESLint + security plugins | JS/TS linter-scanner | npm i -D eslint eslint-plugin-security eslint-plugin-no-unsanitized |
| Gitleaks | Secret scanner | brew install gitleaks |
2026-04. Minimum versions tested: Semgrep 1.60, CodeQL CLI 2.17, Bandit 1.8, gosec 2.20, Brakeman 6.2, SpotBugs 4.8 + FSB 1.13, ESLint 9.
development
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. Use when scanning package dependencies (npm, PyPI, Maven, Cargo, Go, RubyGems, Composer), reviewing PR lockfile diffs, generating SBOMs, auditing licenses, hunting malicious packages, or auditing the software supply chain. Triggers on requests to scan dependencies, check vulnerable packages, generate SBOM, license compliance, typosquat/dependency-confusion review, or reachability-based vuln triage.
testing
Internal network and Active Directory penetration testing skill for corporate environments. Use when performing authorized internal network assessments, AD attack path analysis, lateral movement, privilege escalation, and post-exploitation across Windows/Linux estates. Covers BloodHound, Impacket, NetExec/CrackMapExec, Responder, Rubeus, mimikatz, certipy. Triggers on requests to pentest internal networks, attack AD, perform lateral movement, Kerberoast, DCSync, or escalate privileges.
tools
LLM and AI application security testing skill for prompt injection (direct, indirect, multimodal), system-prompt extraction, RAG poisoning, memory poisoning, MCP server injection, skill-file injection, agentic tool misuse, computer-use UI injection, and excessive agency. Authorization required — this skill tests AI systems you are explicitly permitted to assess. Triggers on requests to test LLM / AI-agent / RAG / MCP / computer-use security, perform prompt injection, extract system prompts, poison RAG or memory, audit agent tool use, or evaluate AI guardrails.
development
iOS mobile application penetration testing with Frida and Objection on jailbroken or non-jailbroken devices. Use for static + dynamic analysis of IPAs, SSL pinning / jailbreak / biometric bypass, keychain & local-storage extraction, network interception, and OWASP MASTG iOS assessments. Triggers on requests to pentest iOS apps, analyze IPAs, bypass iOS security controls, or produce MASTG-aligned findings.