SAST, DAST, and SCA are the three scanner classes that anchor a DevSecOps pipeline. This module covers what each actually detects, how to choose tools, and how to wire them into CI without turning your build times into a latency incident.
Clear definitions
- SAST (Static Application Security Testing): analyzes source code or compiled bytecode without running it. Detects code-level patterns β SQL injection via unsanitized input, hardcoded crypto keys, unsafe deserialization. Strengths: broad coverage, language-aware. Weaknesses: false positives, limited data-flow reach for dynamic languages
- DAST (Dynamic Application Security Testing): interacts with the running application via HTTP, attempts attacks, observes responses. Detects runtime behaviour β reflected XSS that actually fires, SQL errors surfaced by a specific payload, weak auth flows. Strengths: tests real runtime behaviour. Weaknesses: needs staging deployment; coverage depends on what the scanner can reach
- SCA (Software Composition Analysis): inventories the libraries your code depends on; compares against vulnerability databases. Detects “your code uses log4j 2.14.0 which has CVE-2021-44228.” Strengths: fast, deterministic. Weaknesses: only as good as the database; doesn’t know whether the vulnerable function is actually reached from your code
SAST β tool landscape in 2026
- Semgrep β open source + commercial, fast, rule-based pattern matching in 30+ languages. Sweet spot for startups. Rule authoring is accessible β you can write custom rules for your codebase’s specific patterns
- SonarQube / SonarCloud β broad language support, quality and security combined. Free tier for public repos, paid for private
- Snyk Code β AI-assisted. Good JavaScript/TypeScript/Python coverage. Paid
- Checkmarx β enterprise, deep dataflow analysis, slow, expensive. Common in banking/FSI
- Veracode β SaaS, cloud-analysis model. Reports are audit-friendly
- GitHub Advanced Security (CodeQL) β if you are already on GitHub, the integration ease is significant. Strong Java, C/C++, Go, Python
For most teams: start with Semgrep (free tier catches 70% of common issues) + GitHub code scanning. Upgrade only when you need specific features.
SAST integration β the minimal CI job
# .github/workflows/security.yml
name: Security Scan
on: [pull_request]
jobs:
semgrep:
runs-on: ubuntu-latest
container: returntocorp/semgrep
steps:
- uses: actions/checkout@v4
- run: |
semgrep ci \
--config p/security-audit \
--config p/owasp-top-ten \
--config p/r2c-ci \
--sarif --output semgrep.sarif
- uses: github/codeql-action/upload-sarif@v3
with:
sarif_file: semgrep.sarif
Managing SAST false positives
The single biggest reason SAST programs die: too many false positives, developers stop reading reports. Tuning approaches:
Continue reading with Basic tier (βΉ499/month)
You've read 33% of this module. Unlock the remaining deep-dive, quiz, and every other Intermediate module.