Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Static Application Security Testing orchestration and analysis. Execute Semgrep, Bandit, ESLint security plugins, CodeQL, and other SAST tools. Parse, prioritize, and deduplicate findings across multiple tools with remediation guidance.
.claude/skills/a5c-ai-sast-analyzer/SKILL.md| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-01 | ✗→✓ | ▲ Improved | 71% | 0% |
| case-02 | ✗→✓ | ▲ Improved | -8% | 0% |
| case-03 | ✗→✓ | ▲ Improved | 385% | 0% |
| case-10 | ✗→✓ | ▲ Improved | 101% | 0% |
| case-15 | ✗→✓ | ▲ Improved | 28% | 0% |
You are sast-analyzer - a specialized skill for Static Application Security Testing (SAST) orchestration and analysis. This skill provides comprehensive capabilities for detecting security vulnerabilities in source code through static analysis.
This skill enables AI-powered SAST including:
Execute Semgrep with comprehensive security rulesets:
bash# Run with auto config (detects languages) semgrep scan --config auto --json > semgrep-results.json # Run OWASP Top 10 rules semgrep scan --config "p/owasp-top-ten" --json # Run language-specific security rules semgrep scan --config "p/python" --config "p/security-audit" . # Run with custom rules semgrep scan --config ./custom-rules/ --json # CI-friendly output with SARIF semgrep scan --config auto --sarif -o results.sarif # Scan specific paths semgrep scan --config auto --include="src/**" --exclude="**/test/**"
| Pack | Description | Use Case | |------|-------------|----------| | p/owasp-top-ten | OWASP Top 10 vulnerabilities | General web security | | p/security-audit | Comprehensive security audit | Deep security review | | p/ci | Fast, high-confidence rules | CI/CD pipelines | | p/secrets | Hardcoded secrets detection | Pre-commit checks | | p/python | Python-specific security | Python projects | | p/javascript | JavaScript security | JS/TS projects | | p/java | Java security rules | Java projects | | p/go | Go security rules | Go projects |
bash# Basic scan with JSON output bandit -r ./src -f json -o bandit-results.json # Scan with specific severity levels bandit -r ./src -ll -ii -f json # medium and above # Exclude test directories bandit -r ./src --exclude ./tests,./venv -f json # Run specific tests only bandit -r ./src -t B101,B102,B103 -f json # Generate SARIF output bandit -r ./src -f sarif -o bandit.sarif # Show only high severity bandit -r ./src -lll -f json
| Test ID | Name | Severity | |---------|------|----------| | B101 | assert_used | Low | | B102 | exec_used | Medium | | B103 | set_bad_file_permissions | Medium | | B104 | hardcoded_bind_all_interfaces | Medium | | B105-B107 | hardcoded_passwords | Low | | B108 | hardcoded_tmp_directory | Medium | | B110 | try_except_pass | Low | | B201 | flask_debug_true | High | | B301-B303 | pickle/marshal | Medium | | B501-B508 | SSL/TLS issues | High | | B601-B602 | shell_injection | High | | B608 | sql_injection | Medium |
bash# Install security plugins npm install --save-dev eslint-plugin-security eslint-plugin-no-secrets # Run ESLint with security rules eslint --config .eslintrc.security.js --format json -o eslint-results.json src/ # Run with SARIF formatter npx eslint --config .eslintrc.security.js --format @microsoft/eslint-formatter-sarif -o eslint.sarif src/
javascript// .eslintrc.security.js module.exports = { plugins: ['security', 'no-secrets'], extends: ['plugin:security/recommended'], rules: { 'security/detect-object-injection': 'error', 'security/detect-non-literal-regexp': 'warn', 'security/detect-non-literal-fs-filename': 'warn', 'security/detect-eval-with-expression': 'error', 'security/detect-no-csrf-before-method-override': 'error', 'security/detect-possible-timing-attacks': 'warn', 'security/detect-pseudoRandomBytes': 'warn', 'security/detect-buffer-noassert': 'error', 'security/detect-child-process': 'warn', 'security/detect-disable-mustache-escape': 'error', 'security/detect-new-buffer': 'error', 'security/detect-unsafe-regex': 'error', 'no-secrets/no-secrets': ['error', { tolerance: 4.5 }] } };
bash# Create CodeQL database codeql database create codeql-db --language=javascript --source-root=. # Run security queries codeql database analyze codeql-db \ codeql/javascript-queries:codeql-suites/javascript-security-extended.qls \ --format=sarif-latest \ --output=codeql-results.sarif # Run for multiple languages codeql database create codeql-db --language=javascript,python # Run specific security queries codeql database analyze codeql-db \ codeql/javascript-queries:Security/CWE-079/XssThroughDom.ql \ --format=json
| Suite | Coverage | |-------|----------| | javascript-security-extended.qls | Extended JS security | | python-security-extended.qls | Extended Python security | | java-security-extended.qls | Extended Java security | | csharp-security-extended.qls | Extended C# security | | go-security-extended.qls | Extended Go security |
Combine and deduplicate results from multiple SAST tools:
bash# Run all tools and aggregate semgrep scan --config auto --sarif -o semgrep.sarif bandit -r ./src -f sarif -o bandit.sarif eslint --format @microsoft/eslint-formatter-sarif -o eslint.sarif src/ # Parse and aggregate SARIF files node aggregate-sarif.js semgrep.sarif bandit.sarif eslint.sarif > combined.json
json{ "findings": [ { "id": "finding-001", "tool": "semgrep", "rule_id": "python.lang.security.audit.dangerous-system-call", "severity": "high", "confidence": "high", "cwe": ["CWE-78"], "owasp": ["A03:2021"], "file": "src/utils/exec.py", "line": 42, "column": 5, "snippet": "os.system(user_input)", "message": "Dangerous system call with user-controlled input", "remediation": "Use subprocess.run with shell=False and explicit arguments", "references": [ "https://cwe.mitre.org/data/definitions/78.html" ], "duplicates": ["bandit-B602"], "status": "open" } ], "summary": { "total": 45, "critical": 2, "high": 8, "medium": 15, "low": 20, "deduplicated": 12 } }
yaml# custom-rules/sql-injection.yaml rules: - id: custom-sql-injection languages: [python] severity: ERROR message: > Possible SQL injection vulnerability. User input '$INPUT' is concatenated into SQL query. patterns: - pattern-either: - pattern: | $QUERY = "..." + $INPUT + "..." $CURSOR.execute($QUERY) - pattern: | $CURSOR.execute("..." + $INPUT + "...") - pattern: | $CURSOR.execute(f"...{$INPUT}...") metadata: cwe: "CWE-89" owasp: "A03:2021 - Injection" confidence: HIGH impact: HIGH category: security
This skill can leverage the following MCP servers:
| Server | Description | Installation | |--------|-------------|--------------| | sast-mcp | 23+ security tools integration | GitHub | | Semgrep MCP | Official Semgrep integration | GitHub | | SecOpsAgentKit | Multi-tool SAST orchestration | GitHub |
yaml# GitHub Actions example name: SAST Scan on: [push, pull_request] jobs: sast: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - name: Semgrep Scan uses: returntocorp/semgrep-action@v1 with: config: p/owasp-top-ten - name: Upload SARIF uses: github/codeql-action/upload-sarif@v2 with: sarif_file: semgrep.sarif
This skill integrates with the following processes:
sast-pipeline.js - CI/CD SAST integrationsecure-sdlc.js - Security in development lifecycledevsecops-pipeline.js - DevSecOps automationsecurity-code-review.js - Security-focused code reviewWhen executing operations, provide structured output:
json{ "operation": "sast-scan", "status": "completed", "tools_executed": ["semgrep", "bandit", "eslint"], "scan_duration_seconds": 45, "summary": { "total_findings": 32, "by_severity": { "critical": 1, "high": 5, "medium": 12, "low": 14 }, "by_tool": { "semgrep": 18, "bandit": 8, "eslint": 6 }, "deduplicated_count": 5 }, "top_issues": [ { "rule": "sql-injection", "count": 3, "severity": "critical", "files": ["src/db/queries.py", "src/api/users.py"] } ], "artifacts": ["semgrep.sarif", "bandit.json", "eslint.json", "combined-report.json"] }
| Error | Cause | Resolution | |-------|-------|------------| | Rule not found | Invalid rule pack name | Verify rule pack exists | | Parse error | Syntax error in source | Check file encoding/syntax | | Timeout | Large codebase | Increase timeout or scan incrementally | | Memory exceeded | Too many files | Exclude generated/vendor files |
| Case | Status | Duration (ms) | Turns | Tokens | Tool calls | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Without | With | Δ | Without | With | Δ | Without | With | Δ | Without | With | Δ | ||
case-01 | fail→pass | 22,972 | 32,758 | +43% | 1 | 1 | 0% | 3,490 | 5,972 | +71% | 0 | 0 | — |
case-02 | fail→pass | 41,265 | 20,691 | -50% | 1 | 1 | 0% | 6,802 | 6,252 | -8% | 0 | 0 | — |
case-03 | fail→pass | 21,480 | 6,820 | -68% | 1 | 1 | 0% | 754 | 3,660 | +385% | 0 | 0 | — |
case-04 | pass→pass | 14,558 | 10,180 | -30% | 1 | 1 | 0% | 1,678 | 4,070 | +143% | 0 | 0 | — |
case-05 | pass→pass | 18,710 | 10,821 | -42% | 1 | 1 | 0% | 1,997 | 4,361 | +118% | 0 | 0 | — |
case-06 | pass→pass | 4,124 | 9,972 | +142% | 1 | 1 | 0% | 632 | 3,431 | +443% | 0 | 0 | — |
case-07 | pass→pass | 77,414 | 9,524 | -88% | 1 | 1 | 0% | 1,111 | 3,829 | +245% | 0 | 0 | — |
case-08 | pass→pass | 26,118 | 19,193 | -27% | 1 | 1 | 0% | 3,760 | 6,118 | +63% | 0 | 0 | — |
case-09 | pass→pass | 25,913 | 13,196 | -49% | 1 | 1 | 0% | 3,047 | 5,528 | +81% | 0 | 0 | — |
case-10 | fail→pass | 25,281 | 14,287 | -43% | 1 | 1 | 0% | 2,390 | 4,793 | +101% | 0 | 0 | — |
case-11 | pass→pass | 6,072 | 2,251 | -63% | 1 | 1 | 0% | 1,023 | 3,507 | +243% | 0 | 0 | — |
case-12 | pass→pass | 13,835 | 9,690 | -30% | 1 | 1 | 0% | 1,517 | 3,891 | +156% | 0 | 0 | — |
case-13 | pass→pass | 8,705 | 8,789 | +1% | 1 | 1 | 0% | 659 | 3,756 | +470% | 0 | 0 | — |
case-14 | pass→pass | 15,135 | 10,338 | -32% | 1 | 1 | 0% | 1,920 | 4,075 | +112% | 0 | 0 | — |
case-15 | fail→pass | 22,739 | 3,433 | -85% | 1 | 1 | 0% | 2,885 | 3,698 | +28% | 0 | 0 | — |
case-16 | pass→pass | 18,360 | 18,649 | +2% | 1 | 1 | 0% | 2,668 | 5,677 | +113% | 0 | 0 | — |
case-17 | pass→pass | 9,783 | 5,476 | -44% | 1 | 1 | 0% | 821 | 3,954 | +382% | 0 | 0 | — |
case-18 | fail→pass | 22,014 | 10,800 | -51% | 1 | 1 | 0% | 2,751 | 4,188 | +52% | 0 | 0 | — |
case-19 | pass→pass | 12,451 | 10,001 | -20% | 1 | 1 | 0% | 2,016 | 4,783 | +137% | 0 | 0 | — |
case-20 | fail→fail | 22,402 | 17,225 | -23% | 1 | 1 | 0% | 3,002 | 4,276 | +42% | 0 | 0 | — |
case-21 | fail→fail | 15,848 | 18,363 | +16% | 1 | 1 | 0% | 2,927 | 6,306 | +115% | 0 | 0 | — |
case-22 | fail→fail | 17,690 | 16,765 | -5% | 1 | 1 | 0% | 2,240 | 5,482 | +145% | 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, and 21 counted toward the lift figure. The other 1 produced results that are not comparable between the two arms, so they are excluded from the headline rather than averaged into it. The headline lift of +27 percentage points is the difference between those two pass rates over the 21 comparable cases.
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.