sast-triage
Skill0 starsChanged 13 days agoMITView on GitHub
Run and triage static application security testing (Semgrep, CodeQL, SonarQube, Bandit, gosec, Brakeman) — reachability of sources to sinks, framework-provided protections, true/false positive decisions, suppression hygiene and custom rules. Use when a SAST scan produces findings to review, when tuning SAST noise in CI, or writing a custom rule for a recurring bug class.
In this repository273 other files it gives its agents.
- ad-attack-path-analysisSkill
- adcs-security-reviewSkill
- ad-privileged-access-reviewSkill
- dcsync-detectionSkill
- gpo-security-reviewSkill
- kerberos-attack-detectionSkill
- agent-tool-permission-reviewSkill
- ai-incident-responseSkill
- llm-gateway-controlsSkill
- llm-security-evaluationSkill
- mcp-server-security-reviewSkill
- model-artifact-securitySkill
- prompt-injection-reviewSkill
- rag-security-reviewSkill
- api-abuse-detectionSkill
- api-authorization-testingSkill
- api-inventorySkill
- api-schema-securitySkill
- dast-baselineSkill
- sca-dependency-riskSkill
- secure-code-reviewSkill
- security-requirementsSkill
- threat-modelingSkill
- asset-criticality-tieringSkill
- asset-inventory-reconciliationSkill
- external-attack-surface-reviewSkill
- shadow-it-discoverySkill
- aws-credential-compromiseSkill
- aws-iam-reviewSkill
- aws-org-guardrailsSkill
- cloudtrail-investigationSkill
- guardduty-triageSkill
- s3-exposure-reviewSkill
- azure-activity-investigationSkill
- azure-rbac-reviewSkill
- conditional-access-reviewSkill
- entra-audit-investigationSkill
- entra-signin-investigationSkill
- backup-assuranceSkill
- critical-service-mappingSkill
- ransomware-recoverySkill
- recovery-exerciseSkill
- cloud-exposure-reviewSkill
- cloud-incident-responseSkill
- cloud-logging-baselineSkill
- cloud-posture-assessmentSkill
- audit-evidence-packageSkill
- continuous-control-monitoringSkill
- control-mappingSkill
- control-testing-samplingSkill
- container-incidentSkill
- dockerfile-hardeningSkill
- image-scanningSkill
- runtime-detection-falcoSkill
- db-audit-loggingSkill
- db-exfiltration-investigationSkill
- db-hardeningSkill
- db-privilege-reviewSkill
- data-classificationSkill
- data-discoverySkill
- The first 60 shown.
The file
We split this skill into the rules it gives an agent
2 rules. About 0 are common, 2 are distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈2
Distinctive · estimate
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 28
Does data reach the sink unsanitized?: Follow the dataflow path the tool reports.
- Distinctive: line 35
Never suppress a whole rule globally because of one FP.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
SAST Triage
Running scanners
semgrep scan --config p/default --config p/owasp-top-ten --sarif -o semgrep.sarif .
semgrep scan --config p/secrets . # secrets ruleset
codeql database create db --language=python --source-root .
codeql database analyze db codeql/python-queries:codeql-suites/python-security-extended.qls --format=sarif-latest --output=codeql.sarif
bandit -r src/ -f json -o bandit.json # Python
gosec -fmt sarif -out gosec.sarif ./... # GoUpload SARIF to the code host (GitHub code scanning, GitLab) so findings appear inline in PRs.
Triage decision per finding
- Is the source attacker-controlled? (HTTP input, file upload, message queue) — or constant/config/admin-only?
- Does data reach the sink unsanitized? Follow the dataflow path the tool reports; check for validation, parameterization, framework auto-escaping (Django/Jinja2 autoescape, React JSX), allow-lists.
- Is the code reachable in production? (dead code, tests, scripts, feature-flagged off).
- Decide: TP (ticket with fix), FP (suppress with reason), won't-fix (risk-accepted with approver).
Suppression hygiene
- Inline suppressions with a reason:
# nosemgrep: python.lang.security.audit.subprocess-shell-true -- command is constant. - Never suppress a whole rule globally because of one FP; tune the rule (path exclusions for tests, pattern-not for known safe wrappers).
- Review suppressions periodically.
Custom Semgrep rule example
rules:
- id: corp-missing-ownership-check
languages: [python]
severity: WARNING
message: Order fetched by ID without owner filter — possible IDOR (CWE-639)
patterns:
- pattern: Order.objects.get(id=$ID)
- pattern-not-inside: |
Order.objects.get(id=$ID, owner=$USER)Metrics
TP rate per rule (drop/tune rules < 20% TP), time-to-fix by severity, new vs. existing findings (gate only on new findings in PRs to avoid blocking on legacy debt).
Related skills
secure-code-review, sca-dependency-risk, release-gate, github-actions-hardening
References
- Semgrep docs: https://semgrep.dev/docs/
- CodeQL docs: https://codeql.github.com/docs/
- SARIF 2.1.0 (OASIS): https://docs.oasis-open.org/sarif/sarif/v2.1.0/sarif-v2.1.0.html
- OWASP Source Code Analysis Tools: https://owasp.org/www-community/Source_Code_Analysis_Tools
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

