unitoneai/securityskills/sast-config
Claude Code and agent skill by unitoneai/securityskills
- community
- ext:[{"type":"hook","description":"Pre/post lifecycle hooks"},{"type":"config","description":"Configuration overrides"}]
Checking that the SKILL.md file is still in the repository.
Reviews and tunes SAST tool configurations against OWASP ASVS 4.0.3 and CWE Top 25. Auto-invoked when reviewing Semgrep rules, CodeQL queries, SAST CI integration, or false positive triage workflows. Produces a SAST maturity assessment covering rule authoring, severity tuning, custom rule development, and CI integration patterns.
Install
npx vskill@latest install unitoneai/securityskills/sast-configSemi-extensibleMentions customization, but needs skill-specific knowledge. Read the extensible skills standard
SKILL.md
The same SKILL.md was published earlier as unitoneai/securityskills/sast-config.
SAST Tool Configuration and Tuning
A structured, repeatable process for reviewing and tuning Static Application Security Testing (SAST) tool configurations against OWASP ASVS 4.0.3 verification requirements and the CWE Top 25 Most Dangerous Software Weaknesses. This skill covers Semgrep rule authoring, CodeQL query patterns, severity tuning, false positive management, custom rule development, and CI integration. All findings map to ASVS controls and CWE identifiers.
When to Use
If a target is provided via arguments, focus the review on: $ARGUMENTS
- Initial SAST deployment to establish baseline rule configuration.
- Periodic SAST tuning reviews to reduce false positive rates.
- Custom rule development for organization-specific vulnerability patterns.
- CI/CD integration review for SAST gate enforcement.
- Post-incident rule gap analysis (a vulnerability was missed -- why?).
- ASVS compliance mapping to verify SAST coverage against verification requirements.
Context
SAST tools are only as effective as their configuration. Default rule sets produce high false positive rates that erode developer trust, while overly aggressive tuning creates dangerous blind spots. OWASP ASVS 4.0.3 provides 286 verification requirements across 14 chapters -- a subset of these are automatable via SAST. The CWE Top 25 (2024 edition) identifies the most prevalent and impactful weakness types. Effective SAST tuning maps rules to these frameworks, tunes severity to organizational risk context, and integrates into CI with clear pass/fail criteria that developers can act on.
Process
Step 1: Discovery -- Locate SAST Configurations
Use Glob and Grep to locate SAST tool configurations, custom rules, and CI integration.
Patterns to search:
Categorize by:
- Tool: Semgrep, CodeQL, SonarQube, Bandit, ESLint-security, etc.
- Rule source: Default/managed rules, community rules, custom org rules.
- Integration point: Pre-commit, PR check, scheduled scan, IDE plugin.
Step 2: Rule Coverage Analysis Against CWE Top 25
Map the active SAST rule set against CWE Top 25 (2024) to identify coverage gaps.
2.1 CWE Top 25 Coverage Matrix
| Rank | CWE ID | Weakness | SAST Detectable | Semgrep Registry | CodeQL Coverage | |
|---|---|---|---|---|---|---|
| 1 | CWE-787 | Out-of-bounds Write | Partial (C/C++) | Limited | cpp/overflow-buffer | |
| 2 | CWE-79 | Cross-site Scripting (XSS) | Yes | javascript.browser.security.*.xss | js/xss, js/reflected-xss | |
| 3 | CWE-89 | SQL Injection | Yes | python.django.security.injection.sql.*, java.lang.security.audit.sqli.* | java/sql-injection, python/sql-injection | |
| 4 | CWE-416 | Use After Free | Partial (C/C++) | Limited | cpp/use-after-free | |
| 5 | CWE-78 | OS Command Injection | Yes | python.lang.security.audit.dangerous-subprocess-use.* | python/command-injection, java/command-injection | |
| 6 | CWE-20 | Improper Input Validation | Partial | Pattern-dependent | Pattern-dependent | |
| 7 | CWE-125 | Out-of-bounds Read | Partial (C/C++) | Limited | cpp/out-of-bounds-read | |
| 8 | CWE-22 | Path Traversal | Yes | python.lang.security.audit.path-traversal.* | python/path-injection, java/path-injection | |
| 9 | CWE-352 | CSRF | Partial | Framework-specific | java/csrf, python/csrf | |
| 10 | CWE-434 | Unrestricted Upload | Partial | Framework-specific | Pattern-dependent |
For each CWE, verify:
- At least one active rule covers the weakness for each language in the codebase.
- Rule is enabled (not suppressed in configuration).
- Rule severity matches the CWE's risk (Top 10 CWEs should not be INFO level).
Finding classification: CWE Top 10 weakness with zero SAST coverage for a language in use is High. CWE 11-25 with no coverage is Medium.
Step 3: Semgrep Rule Authoring Review
3.1 Semgrep Configuration Structure
Verify the Semgrep configuration follows best practices:
What to verify:
- Managed rule sets are pinned to a version or use
p/registry references. - Custom rule directory exists and contains organization-specific rules.
.semgrepignoreexclusions are justified (test files are acceptable; production code paths are not).--errorflag is used in CI to fail the pipeline on findings (not just report).
3.2 Custom Semgrep Rule Authoring (YAML format)
Custom rules should follow Semgrep's rule schema. Example of a well-authored custom rule:
Rule quality checklist:
- [ ]
idfollows a namespace convention (e.g.,custom.category.name). - [ ]
patternuses metavariables ($VAR) correctly for taint tracking. - [ ]
messageexplains the vulnerability AND references the fix. - [ ]
severityisERROR(blocks CI),WARNING(reported), orINFO(informational). - [ ]
metadataincludescwe,owasp, and/orasvsreferences. - [ ]
confidenceis documented (HIGH, MEDIUM, LOW). - [ ]
languagesis explicitly specified. - [ ]
pattern-notorpattern-not-insidehandles known safe patterns to reduce false positives.
Step 4: CodeQL Query Pattern Review
4.1 CodeQL Configuration
What to verify:
security-extendedorsecurity-and-qualityquery suite is used (not justdefault).- Custom query directory exists for org-specific patterns.
paths-ignoredoes not exclude production source code.query-filtersexclusions have documented justification.
4.2 CodeQL Custom Query Structure
Query quality checklist:
- [ ]
@kindis appropriate (path-problemfor taint tracking,problemfor point queries). - [ ]
@security-severityuses CVSS scale (0.0-10.0). - [ ]
@precisionis set (high,medium,low) -- affects result ranking. - [ ]
@tagsinclude CWE and OWASP references. - [ ] Taint tracking uses appropriate source and sink definitions.
- [ ] Query is tested against known-vulnerable and known-safe code samples.
Step 5: Severity Tuning and False Positive Management
5.1 Severity Mapping to OWASP ASVS
Map tool-native severity levels to a consistent organizational severity:
| ASVS Level | Risk Context | Semgrep Severity | CodeQL Severity | CI Action | |
|---|---|---|---|---|---|
| L1 (Opportunistic) | Internet-facing, unauthenticated | ERROR | error, @security-severity >= 7.0 | Block merge | |
| L2 (Standard) | Authenticated, business-critical | ERROR or WARNING | error or warning, >= 4.0 | Block or warn | |
| L3 (Advanced) | High-value targets, regulated data | WARNING or INFO | All severities | Warn, review required |
5.2 False Positive Management Workflow
Suppression requirements:
What to verify:
- Every suppression has a documented justification (not just
nosemgrep). - Suppressions are reviewed periodically (quarterly).
- False positive rate is tracked as a metric (target: < 20% FP rate).
- True positive findings have a defined SLA (Critical: 7 days, High: 30 days, Medium: 90 days).
This is the start of the file. Read the full SKILL.md on GitHub.
Security
- Security scanPassed, 95 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/devsecops/sast-config/SKILL.md
Popularity
- Repository stars
- 76
- Repository forks
- 133
- 7-day trend score
- 22
Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.
Extension points
hookPre/post lifecycle hooksconfigConfiguration overrides
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/unitoneai/securityskills/sast-config)