← Home ← Codex ← DEBT ← Engine
Browse by Category
+ added · updated 7d
← Back to glossary

SAST vs DAST vs IAST

Security PHP 5.0+ Intermediate
debt(d7/e5/b3/t5)
d7 Detectability Operational debt — how invisible misuse is to your safety net

Closest to 'only careful code review or runtime testing' (d7) — the absence of SAST/DAST in a pipeline is visible only via CI configuration review; no tool flags 'you don't have security scanning configured' by default.

e5 Effort Remediation debt — work required to fix once spotted

Closest to 'touches multiple files / significant refactor in one component' (e5) — per quick_fix, integrating PHPStan/semgrep in CI plus standing up OWASP ZAP against staging requires pipeline configuration, staging environment setup, and workflow integration across CI/CD.

b3 Burden Structural debt — long-term weight of choosing wrong

Closest to 'localised tax' (b3) — applies_to web/api contexts; the tooling lives in CI/CD config and a staging job, adding maintenance load but not shaping application code itself.

t5 Trap Cognitive debt — how counter-intuitive correct behaviour is

Closest to 'notable trap most devs eventually learn' (t5) — the misconception that 'SAST alone is sufficient' is a documented gotcha; teams routinely learn the hard way that runtime classes of bugs (deserialisation, auth flow issues) escape static analysis.

About DEBT scoring →

Also Known As

static analysis security dynamic analysis SAST DAST IAST

TL;DR

Three automated security testing approaches: SAST analyses source code without running it, DAST attacks a running app from outside, IAST instruments the app from within during testing.

Explanation

Static Application Security Testing (SAST) scans source code for vulnerabilities before execution — fast, early in CI, but produces false positives and cannot find runtime issues. Dynamic Application Security Testing (DAST) sends attacks against a running application from the outside — finds real vulnerabilities but requires a deployed app. Interactive AST (IAST) instruments the runtime and observes data flows during test execution — most accurate, fewest false positives, but complex to set up. PHP tools: PHPStan/Psalm (SAST), OWASP ZAP/Burp Suite (DAST).

Common Misconception

SAST alone is sufficient for security testing — SAST cannot find runtime vulnerabilities like insecure deserialisation triggered by specific input sequences; DAST is needed for those.

Why It Matters

Each tool finds a different class of vulnerability — using only SAST misses runtime issues, using only DAST misses code-level flaws. Combining both gives significantly better coverage.

Common Mistakes

  • Running SAST only at release time — it should run on every commit in CI to catch issues early and cheaply.
  • Ignoring SAST false positives instead of suppressing them — noise trains developers to ignore all alerts.
  • DAST against production — always run DAST against a staging environment; it sends real attacks.
  • Not integrating findings into the developer workflow — security results buried in a separate dashboard get ignored.

Code Examples

✗ Vulnerable
# SAST only in CI — misses runtime vulnerabilities:
# .github/workflows/ci.yml:
- run: vendor/bin/phpstan analyse  # Good — catches type errors, code issues
# No DAST step — SQL injection via serialised objects not caught
# No dependency audit — known CVEs in vendor/ undetected
✓ Fixed
# Layered security testing:
# CI (every commit): SAST
- run: vendor/bin/phpstan analyse
- run: composer audit              # Known CVEs in dependencies

# Nightly / pre-release: DAST against staging
- run: docker run owasp/zap zap-baseline.py -t https://staging.example.com

# Code review: manual review of auth, crypto, input handling

Added 15 Mar 2026
Edited 22 Mar 2026
Views 60
Rate this term
No ratings yet
🤖 AI Guestbook educational data only
| |
Last 30 days
1 ping S 0 pings M 0 pings T 0 pings W 0 pings T 2 pings F 0 pings S 1 ping S 1 ping M 0 pings T 0 pings W 0 pings T 1 ping F 2 pings S 1 ping S 0 pings M 0 pings T 0 pings W 0 pings T 2 pings F 1 ping S 0 pings S 0 pings M 0 pings T 0 pings W 0 pings T 1 ping F 2 pings S 0 pings S 0 pings M
No pings yet today
No pings yesterday
Amazonbot 9 PetalBot 5 Google 4 Ahrefs 4 ChatGPT 4 SEMrush 4 Bing 3 Scrapy 3 Unknown AI 2 Brave Search 2 Perplexity 1 Meta AI 1 Twitter/X 1 Applebot 1
crawler 39 crawler_json 5
DEV INTEL Tools & Severity
🔵 Info ⚙ Fix effort: Medium
⚡ Quick Fix
Run SAST (PHPStan/semgrep) in CI for fast feedback on every commit; run DAST (OWASP ZAP) against staging weekly for runtime behaviour
📦 Applies To
PHP 5.0+ web api
🔗 Prerequisites
🔍 Detection Hints
Neither SAST nor DAST tool configured in CI/CD pipeline
Auto-detectable: ✓ Yes phpstan psalm semgrep owasp-zap burpsuite
⚠ Related Problems
🤖 AI Agent
Confidence: Low False Positives: High ✗ Manual fix Fix: Medium Context: File


✓ schema.org compliant