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

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 19 November 2026.

## 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 category | What it examines | Earliest stage | Usual trigger | What it misses | SSDF task |
|---|---|---|---|---|---|
| Peer or expert code review | Source read by a person against secure coding standards and the design | Code | Every pull request; deeper review for high-risk changes | Anything the reviewer does not know to look for; does not scale to every line | PW.7.1, PW.7.2 |
| Static analysis (SAST) | Source code examined without executing it | Code | Editor, pre-commit or pull request | Runtime behavior and deployed configuration; often reports issues that other controls already block, so results need human triage | PW.7.2 |
| Software composition analysis (SCA) | Third-party and open-source components, known vulnerabilities and licenses | Code and build | Dependency change, build, and on a schedule for released versions | Flaws in your own code; vulnerabilities not yet published | PW.4.4, RV.1.1 |
| Configuration and infrastructure review | Default settings, infrastructure as code and deployed configuration against a baseline | Build and test | Change to configuration files; before release | Logic flaws in application code | PW.9.1, PW.9.2 |
| Security feature and regression tests | That security functions work as specified, and that fixed vulnerabilities stay fixed | Test | Every build, inside the normal automated suite | Weaknesses nobody wrote a test for | PW.8.2 |
| Dynamic analysis (DAST) | A running application from outside, as a black box | Test (needs a running build) | Nightly or per release candidate | Code paths the scan never reaches; no view inside the application | PW.8.2 |
| Interactive analysis (IAST) | A running application instrumented with sensors while tests or people exercise it | Test | During functional or QA test runs | Code the accompanying test traffic never exercises | PW.8.2 |
| Fuzz testing | Parsers, APIs and input handling given malformed or unexpected data | Test | Continuous or scheduled, per parser or interface | Business-logic flaws; areas without a fuzz target | PW.8.2 |
| Penetration test | A tester attacks the software using the threat model to set priorities | Test and release | Before major releases or after major changes; high-risk systems | Everything outside the agreed scope and time box; point-in-time only | PW.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](/stages/code/)).
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](/stages/release/)). 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](/stages/operate/)).

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 project | Minimum tests (example) |
|---|---|---|
| 1 | Internet-facing, handles sensitive data, or widely redistributed | Everything in the table above that applies to the technology; penetration test before each major release |
| 2 | Internal, business-critical | Code review, SAST, SCA, DAST on release candidates, regression tests |
| 3 | Internal tool, low data sensitivity | Code 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](/measuring/#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](/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

- [NIST SP 800-218, Secure Software Development Framework (SSDF) Version 1.1](https://nvlpubs.nist.gov/nistpubs/SpecialPublications/NIST.SP.800-218.pdf), read 2026-11-19
- [Security Testing, OWASP SAMM](https://owaspsamm.org/model/verification/security-testing/), read 2026-11-19
- [Microsoft SDL Phase 4: Verification](https://learn.microsoft.com/en-us/previous-versions/windows/desktop/cc307418(v=msdn.10)), read 2026-11-19
- [Microsoft SDL Phase Five: Release](https://learn.microsoft.com/en-us/previous-versions/windows/desktop/cc307420(v=msdn.10)), read 2026-11-19
- [Static Application Security Testing, OWASP DevSecOps Guideline](https://owasp.org/www-project-devsecops-guideline/latest/02a-Static-Application-Security-Testing), read 2026-11-19
- [Dynamic Application Security Testing, OWASP DevSecOps Guideline](https://owasp.org/www-project-devsecops-guideline/latest/02b-Dynamic-Application-Security-Testing), read 2026-11-19
- [Interactive Application Security Testing, OWASP DevSecOps Guideline](https://owasp.org/www-project-devsecops-guideline/latest/02c-Interactive-Application-Security-Testing), read 2026-11-19
- [Software Composition Analysis, OWASP DevSecOps Guideline](https://owasp.org/www-project-devsecops-guideline/latest/02d-Software-Composition-Analysis), read 2026-11-19
- [Fuzzing, OWASP Foundation](https://owasp.org/www-community/Fuzzing), read 2026-11-19

Last reviewed: 2026-11-19

Canonical: https://sdlcsecurity.com/stages/test/
