Using SAST and DAST together

Should you use SAST and DAST together?

Yes. SAST and DAST cover each other's blind spots, so most mature teams run both. SAST scans the source code early, in the pull request, and names the vulnerable line. DAST tests the running application later, in staging, and shows what an attacker can actually reach. Used together, a flaw one of them reports can be checked against the other's results.

Updated

A combined workflow

  1. Run SAST on every pull request, so developers fix code flaws before merge.
  2. Run dependency and secret scanning at the same point; both are cheap.
  3. Deploy to staging and run DAST on each release candidate, or nightly.
  4. Compare: when DAST finds a flaw, look for the code SAST pointed to, and when SAST flags something DAST never reached, check whether that route is exposed at all.
  5. Feed what you learn back into your rules and tests.

What each catches that the other misses

Only SAST tends to findOnly DAST tends to find
Flaws in code paths a crawler never reachesServer and framework misconfiguration
Hard-coded secrets and weak cryptography in codeMissing security headers
Flaws in code not deployed yetProblems in how components behave together at runtime
The exact file and line at faultFlaws in third-party parts you have no source for

Where IAST fits

Interactive application security testing (IAST) places an agent inside the running app while tests or a DAST scan exercise it, so it can tie a runtime flaw to a line of code. It narrows the gap between the two, but it only works on the languages and runtimes its agent supports.

Where pokayoke fits

pokayoke sits on the SAST side, with one step borrowed from DAST: it runs exploits against your code and against a hardened copy to prove what it can, so a static finding it proves arrives with the kind of proof a dynamic test gives, and each finding is marked proven or not. Keep a DAST scan for your deployed environment.