Security testing in a developer workflow
Put security tests at useful points in development, CI, release, and operations. Combine fast automated checks with focused manual review, proportionate gates, clear ownership, and verification of fixes.
Security testing in a developer workflow
Security testing is not a single inspection reserved for release day. Place checks where they can find risk, from design and code changes to staging and operations. Automate fast repeatable checks in development and pull requests; examine running applications and complex business logic more deeply in controlled environments or before major releases. Connect findings to an owner, a decision, a fix, and a regression check.
This guide is for web development teams working with application security partners. It does not teach one scanner or unauthorized penetration testing.
Why one test is not enough
Static application security testing (SAST) analyzes code without running it. Software composition analysis (SCA) compares third-party packages with known advisories. Secret scanning looks for credentials committed to source control. Infrastructure and container checks inspect deployment settings. Dynamic application security testing (DAST) sends requests to a running app and examines responses. Manual review and penetration testing explore authorization combinations, business logic, and trust boundaries that automated tools may not understand.
The methods complement one another. A SAST alert needs review; it is not automatically a confirmed exploitable flaw. Tools can produce false positives and miss real issues. DAST needs a reachable test app, suitable accounts, and safe data, and may not understand every workflow. Manual testing is deeper but harder to repeat for every change. A result describes what was checked in a defined scope and time; it does not prove that a system is secure.
What belongs at each workflow point?
| Point | Suitable checks | Purpose and limits |
|---|---|---|
| IDE or local work | Linting, secure API rules, quick SAST, unit tests | Fast feedback after a change; keep shared rules consistent. |
| Commit or PR | Secret scanning, SAST, SCA, security unit tests, changed IaC checks | Find issues close to the change; consider blocking only on policy-defined, high-confidence new findings or failed security requirements. |
| Build or staging | Integration and authorization tests, container/IaC checks, authenticated DAST, API abuse cases | Check the built app and configuration using reproducible artifacts, test accounts, and seeded data. |
| Major release or high-risk feature | Threat-model review, manual business-logic review, scoped penetration test | Examine new trust boundaries, payment/admin functions, or sensitive-data flows; decide what to fix or accept before release. |
| Operations and periodic review | Vulnerability rescans, configuration review, alert handling, incident regression tests | Respond to new disclosures and drift; test live systems only with approved scope and impact controls. |
OWASP describes testing across requirements, design, IDE, CI/CD, staging, and operations rather than as one fixed sequence. Adapt the cadence to the release model; a PR scanner does not replace design review or operational checks.
What should block a pull request?
“Fail every build if any tool reports anything” may be too broad; making every result informational can bury important issues. Define gates using policy, severity, confidence, attack path, service impact, and remediation options. A newly detected secret might block merging while the team checks exposure and revokes or replaces it. A high-confidence remote-code-execution path may need security review before merge. An old baseline warning or unconfirmed low-risk alert can be tracked with an owner, due date, and rationale. These are examples, not universal thresholds.
For each finding, identify a reviewer; evidence for impact and reachability; a decision to fix, mitigate, accept, or mark false positive; a review date for exceptions; and a retest or regression check to confirm closure. A tool label alone is not proof of a vulnerability.
Example: a file-upload feature
Suppose, hypothetically, a web app lets users upload documents for teammates to preview. At design time, define file types and size limits, who may upload, view, or delete files, and where files are stored. Consider cross-tenant access, unsafe rendering, and storage exhaustion.
In the PR, test ownership and authorization, filename and type handling, and run secret, SAST, and dependency checks. In staging, inspect storage permissions, response content types and headers, and size limits. Use DAST or API tests only with authorized accounts and disposable files. Before a major release, review how parsers and previews handle content; expand manual review if a new converter is added. In production, monitor storage and unusual access, and add a regression test after a confirmed incident. This example is illustrative, not a test of a real product.
How should automation and manual testing fit together?
Automation suits repeatable checks such as vulnerable packages, committed secrets, common code patterns, configuration errors, and security regressions. Run these often enough to catch issues close to the change that introduced them.
Manual review suits questions requiring business and system context: which roles can combine actions, whether one service can expose another tenant’s data, or whether invitation, refund, or recovery flows can be abused. Automation can handle recurring findings so specialists can focus on complex attack paths and high-risk changes.
How can a team start?
Choose one important user flow and close the largest gap first.
Select a feature with clear assets, data, and permission boundaries.
Write testable requirements, such as “a regular member cannot read or delete another organization’s file.”
Separate fast repeatable checks from checks needing human judgment.
Pilot tools in advisory mode, review noise, then gate well-understood high-risk results.
Assign an owner and due date to every finding; document exceptions with expiry or review conditions and compensating controls.
Retest fixes, add regression coverage, and feed recurring causes into requirements and review rules.
Measure whether important findings have owners, decisions, and verified fixes—not how many tools are installed. Testing production requires explicit authorization, agreed scope and timing, impact controls, and a contact and stop procedure.
References
NIST, [SP 800-218: SSDF v1.1](https://csrc.nist.gov/pubs/sp/800/218/final) — integrating security practices with development.
NIST, [SP 800-115](https://csrc.nist.gov/pubs/sp/800/115/final) — planning tests, analyzing findings, and considering technique limits.
OWASP, [Web Security Testing Guide](https://owasp.org/www-project-web-security-testing-guide/) — adaptable testing across development and operations.
OWASP, [SAMM: Security Testing](https://owaspsamm.org/model/verification/security-testing/) — combining automation with risk-focused manual testing.
OWASP Developer Guide, [SAST](https://devguide.owasp.org/en/05-implementation/05-static-analysis/) — timing, review, limitations, and complementary methods.