Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Static application security testing (SAST) using Semgrep for vulnerability detection, security code review, and secure coding guidance with OWASP and CWE framework mapping. Use when: (1) Scanning code for security vulnerabilities across multiple languages, (2) Performing security code reviews with pattern-based detection, (3) Integrating SAST checks into CI/CD pipelines, (4) Providing remediation guidance with OWASP Top 10 and CWE mappings, (5) Creating custom security rules for organization-spe
.claude/skills/aiskillstore-sast-semgrep/SKILL.md| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-05 | ✗→✓ | ▲ Improved | 83% | 0% |
| case-08 | ✗→✓ | ▲ Improved | 39% | 0% |
| case-09 | ✗→✓ | ▲ Improved | 68% | 0% |
| case-10 | ✗→✓ | ▲ Improved | 116% | 0% |
| case-15 | ✗→✓ | ▲ Improved | 80% | 0% |
Perform comprehensive static application security testing using Semgrep, a fast, open-source static analysis tool. This skill provides automated vulnerability detection, security code review workflows, and remediation guidance mapped to OWASP Top 10 and CWE standards.
Scan a codebase for security vulnerabilities:
bashsemgrep --config=auto --severity=ERROR --severity=WARNING /path/to/code
Run with OWASP Top 10 ruleset:
bashsemgrep --config="p/owasp-top-ten" /path/to/code
scripts/semgrep_scan.py with appropriate rulesetssemgrep --diff to scan only modified codereferences/remediation_guide.mdassets/rule_template.yamlreferences/custom_rules.mdassets/ci_config_examples/secrets or proprietary code patterns. Use --max-lines-per-finding to limit output.
result access to authorized security and development teams.
findings count for compliance auditing.
Maintain scan history and remediation tracking.
--config=auto for balanced detection. For security-criticalapplications, use --config="p/security-audit" for comprehensive coverage.
Semgrep supports 30+ languages including:
scripts/semgrep_scan.py - Full-featured scanning with OWASP/CWE mapping and reportingscripts/baseline_scan.sh - Quick baseline scan for CI/CDscripts/diff_scan.sh - Scan only changed files (for PRs)references/owasp_cwe_mapping.md - OWASP Top 10 to CWE mapping with Semgrep rulesreferences/remediation_guide.md - Vulnerability remediation patterns by categoryreferences/rule_library.md - Curated list of useful Semgrep rulesetsassets/rule_template.yaml - Template for creating custom Semgrep rulesassets/ci_config_examples/ - CI/CD integration examples (GitHub Actions, GitLab CI)assets/semgrep_config.yaml - Recommended Semgrep configurationbash# Run comprehensive scan and generate report scripts/semgrep_scan.py --config security-audit \ --output results.json \ --format json \ --severity HIGH CRITICAL
bash# Scan only changed files, fail on HIGH/CRITICAL scripts/diff_scan.sh --fail-on high \ --base-branch main \ --output sarif
bash# Search for specific vulnerability patterns semgrep --config "r/javascript.lang.security.audit.xss" \ --json /path/to/code | jq '.results'
bash# Test custom rule against vulnerable samples semgrep --config assets/custom_rules.yaml \ --test tests/vulnerable_samples/
semgrep/semgrep-action@v1 with SARIF uploadSee assets/ci_config_examples/ for ready-to-use configurations.
Semgrep findings are classified by severity:
For large codebases:
bash# Use --jobs for parallel scanning semgrep --config auto --jobs 4 # Exclude vendor/test code semgrep --config auto --exclude "vendor/" --exclude "test/" # Use lightweight rulesets for faster feedback semgrep --config "p/owasp-top-ten" --exclude-rule "generic.*"
Solution:
--exclude-rule to disable noisy rules.semgrepignore file to exclude false positive patterns--severity filtering# nosemgrep comments for confirmed false positives (with justification)Solution:
--exclude for vendor/generated code--jobs for parallel processing--config=auto--diffSolution:
p/security-audit or p/owasp-top-tenreferences/rule_library.md for specialized rulesSee references/rule_library.md for guidance on writing effective Semgrep rules. Use assets/rule_template.yaml as a starting point.
Example rule structure:
yamlrules: - id: custom-sql-injection patterns: - pattern: execute($QUERY) - pattern-inside: | $QUERY = $USER_INPUT + ... message: Potential SQL injection from user input concatenation severity: ERROR languages: [python] metadata: cwe: "CWE-89" owasp: "A03:2021-Injection"
This skill provides detection for all OWASP Top 10 2021 categories. See references/owasp_cwe_mapping.md for complete coverage matrix.
| Case | Status | Duration (ms) | Turns | Tokens | Tool calls | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Without | With | Δ | Without | With | Δ | Without | With | Δ | Without | With | Δ | ||
case-07 | fail→fail | 10,777 | 6,714 | -38% | 1 | 1 | 0% | 2,127 | 3,153 | +48% | 0 | 0 | — |
case-01 | fail→fail | 12,394 | 13,833 | +12% | 1 | 1 | 0% | 1,557 | 3,830 | +146% | 0 | 0 | — |
case-02 | fail→fail | 15,785 | 14,840 | -6% | 1 | 1 | 0% | 2,067 | 4,289 | +107% | 0 | 0 | — |
case-03 | fail→fail | 15,703 | 11,091 | -29% | 1 | 1 | 0% | 2,987 | 4,369 | +46% | 0 | 0 | — |
case-04 | fail→fail | 11,946 | 10,935 | -8% | 1 | 1 | 0% | 1,617 | 2,966 | +83% | 0 | 0 | — |
case-05 | fail→pass | 12,112 | 10,669 | -12% | 1 | 1 | 0% | 2,324 | 4,256 | +83% | 0 | 0 | — |
case-06 | fail→fail | 15,432 | 12,150 | -21% | 1 | 1 | 0% | 3,089 | 4,582 | +48% | 0 | 0 | — |
case-08 | fail→pass | 10,462 | 2,352 | -78% | 1 | 1 | 0% | 1,869 | 2,591 | +39% | 0 | 0 | — |
case-09 | fail→pass | 8,299 | 2,270 | -73% | 1 | 1 | 0% | 1,481 | 2,493 | +68% | 0 | 0 | — |
case-10 | fail→pass | 7,028 | 2,886 | -59% | 1 | 1 | 0% | 1,227 | 2,648 | +116% | 0 | 0 | — |
case-11 | pass→pass | 16,438 | 4,939 | -70% | 1 | 1 | 0% | 2,694 | 2,740 | +2% | 0 | 0 | — |
case-12 | pass→pass | 9,324 | 2,779 | -70% | 1 | 1 | 0% | 1,612 | 2,592 | +61% | 0 | 0 | — |
case-13 | pass→pass | 6,604 | 2,570 | -61% | 1 | 1 | 0% | 1,215 | 2,529 | +108% | 0 | 0 | — |
case-14 | pass→pass | 7,834 | 4,376 | -44% | 1 | 1 | 0% | 1,308 | 2,921 | +123% | 0 | 0 | — |
case-15 | fail→pass | 7,333 | 3,546 | -52% | 1 | 1 | 0% | 1,374 | 2,473 | +80% | 0 | 0 | — |
case-16 | fail→pass | 10,732 | 1,674 | -84% | 1 | 1 | 0% | 1,628 | 2,359 | +45% | 0 | 0 | — |
case-17 | fail→pass | 9,123 | 3,864 | -58% | 1 | 1 | 0% | 1,542 | 2,552 | +65% | 0 | 0 | — |
case-18 | fail→pass | 12,691 | 1,499 | -88% | 1 | 1 | 0% | 2,210 | 2,386 | +8% | 0 | 0 | — |
case-19 | fail→pass | 8,427 | 1,835 | -78% | 1 | 1 | 0% | 1,437 | 2,414 | +68% | 0 | 0 | — |
case-20 | pass→pass | 10,527 | 3,597 | -66% | 1 | 1 | 0% | 1,774 | 2,419 | +36% | 0 | 0 | — |
case-21 | pass→pass | 13,245 | 3,544 | -73% | 1 | 1 | 0% | 2,286 | 2,670 | +17% | 0 | 0 | — |
case-22 | pass→pass | 7,845 | 3,715 | -53% | 1 | 1 | 0% | 1,330 | 2,363 | +78% | 0 | 0 | — |
DecimalAI ran this skill against gemini-3.6-flash twice over the same eval suite — once with the skill loaded and once without — and compared the two runs case by case. 22 cases were attempted. The headline lift of +41 percentage points is the difference between those two pass rates over the 22 comparable cases. 1 case got worse with the skill loaded, and it is included in that figure.
Without the skill loaded, the model failed this case. With it loaded, the same prompt on the same model passed. This is one improved case from the latest verified run; every case, including any that regressed, is in the table above.
Other measured skills in the registry, with their headline benchmark lift.