Interview Security & DevSecOps

What is the difference between SAST and DAST, and what does each catch and miss? [Basic]

Answer

SAST looks inside the code without executing it, while DAST attacks or probes the running application from the outside. SAST catches code-level flaws early; DAST catches runtime behavior and deployment/configuration issues, but neither is complete alone.

Technical explanation

SAST can find insecure API usage and tainted data flows but may produce false positives and may miss runtime-only misconfiguration.

DAST can validate externally observable issues but usually has limited visibility into exact source lines and may miss code paths not reached during scanning.

A strong program uses both, plus SCA, secrets scanning, threat modeling, and runtime controls.

Hands-on example

Example: SAST flags a concatenated SQL query in a DAO class. DAST confirms a SQL injection on /search when the staging app is running. The fix is to use parameterized queries, add regression tests, and rerun both scanners to verify the issue is gone.

Preparing for an interview?

Check how well your resume matches the role with our free resume checker— match score, ATS check, and the skills you're missing.

More Security & DevSecOps interview questions

← All Security & DevSecOps questions