Security

Security testing in the SDLC: which test runs at which stage

Updated November 19, 2026

Run code review, static analysis and component analysis as soon as code exists, run dynamic and interactive tests once a build runs somewhere, and keep fuzzing and penetration tests for the code and features that carry the most risk. NIST SP 800-218 (SSDF 1.1) splits this into two practices: PW.7 for human-readable code and PW.8 for executable code. PW.8.1 asks you to decide which types of testing find vulnerabilities that earlier reviews missed. The table below puts each test category at its earliest stage with what it cannot see. Read November 19, 2026.

Stage 5 of 7

Test in the Stage Map

6 controls. SSDF tasks at this stage:

PW.8.1PW.8.2PW.7.2

Open this stage on the Stage Map

Why security testing is a separate activity

A secure design and careful developers do not show that a build is secure. Microsoft's archived SDL verification guidance quotes Michael Howard and David LeBlanc: "The designers and the specifications might outline a secure design, the developers might be diligent and write secure code, but it's the testing process that determines whether the product is secure in the real world."

SP 800-218 states the purpose of PW.8 in one sentence: it helps "identify vulnerabilities so that they can be corrected before the software is released in order to prevent exploitation" and notes that "using automated methods lowers the effort and resources needed to detect vulnerabilities and improves traceability and repeatability." Each test category below finds a different kind of defect, so the question is which mix covers your risk, not which single test is best.

Test categories by stage, trigger and blind spot

These are categories, not products. The "misses" column is what the category cannot see by construction, taken from the OWASP and Microsoft descriptions cited under the table.

Test categoryWhat it examinesEarliest stageUsual triggerWhat it missesSSDF task
Peer or expert code reviewSource read by a person against secure coding standards and the designCodeEvery pull request; deeper review for high-risk changesAnything the reviewer does not know to look for; does not scale to every linePW.7.1, PW.7.2
Static analysis (SAST)Source code examined without executing itCodeEditor, pre-commit or pull requestRuntime behavior and deployed configuration; often reports issues that other controls already block, so results need human triagePW.7.2
Software composition analysis (SCA)Third-party and open-source components, known vulnerabilities and licensesCode and buildDependency change, build, and on a schedule for released versionsFlaws in your own code; vulnerabilities not yet publishedPW.4.4, RV.1.1
Configuration and infrastructure reviewDefault settings, infrastructure as code and deployed configuration against a baselineBuild and testChange to configuration files; before releaseLogic flaws in application codePW.9.1, PW.9.2
Security feature and regression testsThat security functions work as specified, and that fixed vulnerabilities stay fixedTestEvery build, inside the normal automated suiteWeaknesses nobody wrote a test forPW.8.2
Dynamic analysis (DAST)A running application from outside, as a black boxTest (needs a running build)Nightly or per release candidateCode paths the scan never reaches; no view inside the applicationPW.8.2
Interactive analysis (IAST)A running application instrumented with sensors while tests or people exercise itTestDuring functional or QA test runsCode the accompanying test traffic never exercisesPW.8.2
Fuzz testingParsers, APIs and input handling given malformed or unexpected dataTestContinuous or scheduled, per parser or interfaceBusiness-logic flaws; areas without a fuzz targetPW.8.2
Penetration testA tester attacks the software using the threat model to set prioritiesTest and releaseBefore major releases or after major changes; high-risk systemsEverything outside the agreed scope and time box; point-in-time onlyPW.8.2

Sources for the descriptions: OWASP DevSecOps Guideline pages on static, dynamic, interactive and composition analysis; the OWASP fuzzing page; Microsoft SDL Phase 4: Verification (penetration testing, fuzzing, regression tests); SP 800-218 for the task IDs. The "usual trigger" column is common practice, not a requirement of any of those texts.

What each category can and cannot see

Static analysis "examin[es] the code without executing the program" and finds coding issues, security vulnerabilities and standard violations, according to the OWASP DevSecOps Guideline. The guideline's IAST page notes that static analysis tools "do not take into account the presence of other security countermeasures, and [lack] visibility during runtime." Plan for triage time: SSDF PW.7.2 expects every discovered issue to be "recorded and triaged" in the team's workflow or issue tracker, and example 4 under PW.7.2 pairs a static analysis tool with "a human reviewing the issues reported by the tool."

Composition analysis finds known-vulnerable third-party components and reports license obligations. OWASP advises running it before dynamic and static security testing so that vulnerable libraries do not reach production. It depends on published vulnerability data, so a component with an undisclosed flaw passes. SP 800-218 PW.4.4 asks you to verify that third-party components comply with your requirements "throughout their life cycles", which is why this check also runs on released versions (RV.1.1, example 3).

Dynamic analysis is black-box testing of a running application. OWASP lists input and output validation, authentication issues and server configuration mistakes among the problems it finds, and notes it needs no source code. Because it only sees responses, it cannot tell you where in the code a problem sits.

Interactive analysis places sensor modules inside the application. OWASP describes it as testing "while the app is run by an automated test, human tester, or any activity interacting with the application functionality", with access to code, data flow and configuration. Its coverage equals the coverage of the tests that drive it.

Fuzzing is defined by OWASP as "automatically providing a program with unexpected, malformed, or semi-malformed inputs" to find bugs, vulnerabilities or unexpected behavior. Most fuzzers depend on the protocol or file format they target, so each parser or interface needs its own fuzz target. SP 800-218 PW.8.2 example 5 names it for "issues with input handling."

Penetration testing is, in PW.8.2 example 6, something to do "if resources are available" to "simulate how an attacker might attempt to compromise the software in high-risk scenarios." Microsoft's SDL verification guidance says to use the threat models to set priorities and to hire third-party security firms as appropriate. OWASP SAMM's Security Testing practice makes the same split: automated testing gives a scalable baseline for "low-hanging fruit", which leaves experts time for deeper manual work on high-risk components.

What runs at each stage

  1. Code. Peer review on every change; static analysis in the editor or on the pull request; composition analysis when dependencies change. These are the earliest checks, and SP 800-218 says that in general the earlier security is addressed, the less effort and cost it takes to reach the same level of security (see the code stage).
  2. Build. Composition analysis against the resolved dependency set; configuration and infrastructure checks; the unit and regression tests that include security cases.
  3. Test. A running build in a test environment makes dynamic and interactive analysis possible. Fuzzing runs against parsers and interfaces. SP 800-218 PW.8.2 example 4 asks you to take "the infrastructures and technology stacks that the software will be used with in production" into account in test plans, so test on a configuration close to production.
  4. Release. Confirm that required tests ran, results are triaged and no open finding breaks the release criteria (see the release stage). A penetration test of a major release typically finishes here.
  5. Operate. RV.1.2 asks you to "review, analyze, and/or test the software's code to identify or confirm the presence of previously undetected vulnerabilities", and example 1 says to configure the toolchain to run analysis and testing "on a regular or continuous basis for all supported releases" (see the operate stage).

Tests are not run once. A fixed vulnerability should leave a test behind: PW.8.2 example 3 says to "incorporate tests for previously reported vulnerabilities into the project's test suite to ensure that errors are not reintroduced."

Choosing which tests a project needs

PW.8.1 says to "determine whether executable code testing should be performed to find vulnerabilities not identified by previous reviews, analysis, or testing and, if so, which types of testing should be used." Example 2 adds "choose testing methods based on the stage of the software." So the decision is written down, per project, against what earlier stages already covered.

For example, a team could tier its projects and write the minimum test set per tier in its policy. The tiers and tests below are an illustration, not taken from any standard.

Tier (example)Typical projectMinimum tests (example)
1Internet-facing, handles sensitive data, or widely redistributedEverything in the table above that applies to the technology; penetration test before each major release
2Internal, business-criticalCode review, SAST, SCA, DAST on release candidates, regression tests
3Internal tool, low data sensitivityCode review, SCA, regression tests

Record the tier and the reason in the same place as the other design decisions (SP 800-218 PW.1.2), so a reviewer can see why a project skipped a test.

How long security tests take

Durations depend on code size, scan depth and hardware. Three published figures give the range:

  • OWASP's DevSecOps Guideline page on IAST reports a Forrester estimate that a DAST scan "can take around 5 to 7 days", against real-time results from interactive analysis. Treat it as a reported estimate for one kind of scan, not a benchmark.
  • Microsoft's SDL release guidance says a final security review "can last anywhere from a few days to six weeks" depending on the number of issues.
  • Microsoft's verification guidance sets fuzzing exit criteria by iteration count (for example a minimum of 500,000 iterations for file parsers on some platforms) rather than by clock time.

Set your own budget instead. Measure the median and 95th percentile duration of each test per trigger (metric 12, check run time, in the metric set), then decide what each trigger can afford. For example, a team might require that pull request checks finish in time for a reviewer to wait for them, and move slower scans to nightly or release-candidate runs. Where a slow test blocks, the gate design matters more than the tool: see security gates.

What each test run should leave behind

PW.8.2 asks you to "scope the testing, design the tests, perform the testing, and document the results, including recording and triaging all discovered issues and recommended remediations in the development team's workflow or issue tracking system." In practice an auditor or customer reviewer looks for:

  • the test plan or policy that says which tests apply to which project (PW.8.1);
  • the run record: tool or method category, version, scope, date and the build tested (PW.8.2);
  • each finding in the issue tracker with severity, owner and status (PW.7.2, PW.8.2);
  • the identified root cause for findings that matter (PW.8.2 example 7, RV.3.1);
  • the regression test added after a fix (PW.8.2 example 3);
  • for a penetration test, the scope, the report and the remediation record.

SP 800-218 PO.4.2 adds that the information gathered to support security criteria should be safeguarded, with access limited to authorized personnel and protection against alteration or deletion.

Questions people ask

Why is security testing important in the SDLC?

Testing is the only activity that checks the running software, which is what attackers meet. SP 800-218 PW.8 states its purpose as identifying vulnerabilities so they can be corrected before release, and Microsoft's SDL verification guidance says the testing process determines whether a product is secure in the real world.

Does SAST replace DAST?

No. Static analysis reads source code and cannot see runtime behavior or deployed configuration, while dynamic analysis tests a running application from outside and cannot see inside it. SP 800-218 PW.8.1 asks you to choose executable-code tests for vulnerabilities that earlier reviews and analysis did not find.

Is a penetration test required by the SSDF?

No. PW.8.2 example 6 says to use penetration testing "if resources are available" to simulate an attacker in high-risk scenarios. It is an example under the task, not a requirement.

Sources

  1. NIST SP 800-218, Secure Software Development Framework (SSDF) Version 1.1, read November 19, 2026
  2. Security Testing, OWASP SAMM, read November 19, 2026
  3. Microsoft SDL Phase 4: Verification, read November 19, 2026
  4. Microsoft SDL Phase Five: Release, read November 19, 2026
  5. Static Application Security Testing, OWASP DevSecOps Guideline, read November 19, 2026
  6. Dynamic Application Security Testing, OWASP DevSecOps Guideline, read November 19, 2026
  7. Interactive Application Security Testing, OWASP DevSecOps Guideline, read November 19, 2026
  8. Software Composition Analysis, OWASP DevSecOps Guideline, read November 19, 2026
  9. Fuzzing, OWASP Foundation, read November 19, 2026

Last reviewed November 19, 2026