SEC11-BP03 Automate testing throughout the development and release lifecycle
Manual security checks run late and inconsistently, and they depend on a reviewer being available. Automated tests run the same way every time and give builders feedback while the code is still new. Automate security testing across the development and release lifecycle so issues appear early and known flaws do not reach production.
Desired outcome:
-
Your pipelines run security tests automatically at multiple stages, from the code repository through the build.
-
Your builders receive security feedback during development without waiting for a manual review.
-
Your tests cover both functional requirements and non-functional properties such as security and reliability.
-
You track findings to remediation, and each finding links to guidance on how to fix it.
Common anti-patterns:
-
Teams run automated security testing only right before a release.
-
Test cases and results are not shared, so the same issues recur across teams.
-
Teams automate tests for requirements that change constantly, producing noise instead of signal.
-
Findings are reported without any guidance on how to remediate them.
Benefits of establishing this best practice:
-
Fewer security issues reach production because tests catch them earlier in the lifecycle.
-
The time between detecting an issue and fixing it shrinks.
-
Reliance on individual reviewers to judge security properties drops.
-
Recurring findings across teams become visible and can drive organization-wide fixes.
Level of risk exposed if this best practice is not established: Medium
Implementation guidance
Software must satisfy functional requirements (what the application does for the business) and non-functional requirements (how well it does it in terms of reliability, performance, and security). Automated testing checks both of these elements and is the only approach that scales with continuous delivery.
Static application security testing (SAST) analyzes source code without running it. It scans large codebases quickly and points to the exact line of a suspected flaw. SAST cannot see issues that only appear at runtime, and it tends to produce false positives that erode trust if left unmanaged.
Dynamic application security testing (DAST) exercises the running application and catches behavior static analysis misses, such as configuration flaws or how components interact. It runs later and gives less precise locations.
Use both, and place tests at the repository, build, and pipeline
stages so you catch each issue where it is cheapest to fix. The
NIST software quality group
A software bill of materials (SBOM) is a formal record of the components and dependencies that make up your software. Most applications are mostly third-party code, and you cannot respond to a newly disclosed vulnerability without knowing where the affected component runs. Generating an SBOM during the build feeds vulnerability management and makes supply chain risk visible.
Blocking a pipeline on every finding stops delivery and trains teams to disable the check. Notifying without ever blocking lets known-critical issues into your shipped code. Decide per stage and per severity: block on high-confidence critical findings, notify and track the rest. Whatever the policy, route findings into a ticketing system and attach remediation guidance so builders can act on each finding.
Kiro
Review the findings your tools produce and look for patterns. Use them to decide what to automate next, what training to run, and which awareness campaign to prioritize. Pair automated testing with periodic reviews by your security team and address their feedback as part of release readiness.
Implementation steps
-
Standardize tooling across the lifecycle: Adopt consistent development-environment, code review, and pipeline tools that include security testing. This gives every team the same checks and makes findings comparable across workstreams.
-
Add static analysis at commit: Run SAST as code is written and committed. Kiro
hooks can trigger these checks on file save in the developer's environment. For repository-level coverage across application code, dependencies, and IaC templates, connect your source repositories to Amazon Inspector code security. The open-source Automated Security Helper is one example of a scanning tool you can integrate. -
Add dynamic and runtime testing: Complement static analysis with DAST against the running application, and scan deployed artifacts. When you build on serverless functions, use Amazon Inspector to scan the function code.
-
Decide where to block and where to notify: For each stage, choose whether a finding blocks the pipeline or notifies the builder, based on severity and confidence. Document the policy so teams understand why a build stops.
-
Generate an SBOM in the pipeline: Produce an SBOM during the build with the Amazon Inspector SBOM generator to feed vulnerability management and expose dependency risk.
-
Track findings and link remediation: Route findings into a ticketing system, and attach guidance on how to fix each class of issue so builders can act without waiting for a review.
-
Analyze findings to prioritize: Review results on a cadence to spot systemic issues, then use them to decide the next automation, training topic, or awareness effort.
Resources
Related best practices:
Related documents:
Related videos:
Related examples:
Related tools: