TL;DR: Running dynamic application security testing in CI/CD lets teams catch security bugs before production, but it also creates trade-offs around scan timing, data consistency, pipeline latency, and failure thresholds, according to StackHawk. The governance issue is not whether to test, but how to make security checks fast enough, repeatable enough, and disruptive enough to matter.
At a glance
What this is: This article explains how to run DAST in CI/CD pipelines and the operational patterns that make scans usable in delivery workflows.
Why it matters: It matters because security teams need testing that fits modern delivery speed without weakening release confidence or creating false pipeline friction.
👉 Read StackHawk's guide to running DAST in CI/CD pipelines
Context
CI/CD security testing becomes difficult when scan design collides with delivery speed, data consistency, and the need to block only the right failures. The core governance question is how to make application security checks repeatable enough for automation without turning every build into a manual exception process.
For identity and access programmes, the same operational logic applies to service accounts, pipeline credentials, and deployment tokens: if the environment is unstable or the checks are too slow, teams stop trusting the control. That makes pipeline design part of security governance, not just engineering convenience.
Key questions
Q: How should security teams implement DAST in CI/CD pipelines?
A: Start by making DAST part of the release workflow, not a separate review process. Connect scans to branches or build stages, require authenticated test coverage, and export results in machine-readable formats so downstream systems can act on them. The key is to block only confirmed, reachable issues while keeping lower-confidence findings visible for follow-up.
Q: Why do ephemeral test environments improve security testing quality?
A: Ephemeral environments improve quality because they start from a known state every time, which makes scanner output more comparable and easier to trust. They also reduce the chance that stale data or prior test mutations distort results. For CI/CD security, repeatability is what turns a scan into evidence rather than noise.
Q: What do security teams get wrong about blocking builds on DAST findings?
A: Teams often think blocking should be all-or-nothing. In practice, the useful model is threshold-based enforcement with clear triage states for false positives, accepted risk, and assigned work. That keeps the pipeline moving while still making security findings visible and actionable across repeated runs.
Q: How do teams know if agentic CI/CD controls are actually working?
A: Look for evidence that the agent cannot reach secrets, cannot mutate protected branches, and cannot execute shell commands outside its declared boundary. If telemetry shows attempted outbound calls, credential access, or policy violations being blocked or alerted on, the control is operating. If you only see clean workflow files, you do not yet know whether runtime guardrails are effective.
Technical breakdown
How DAST behaves inside a CI/CD pipeline
Dynamic application security testing exercises a running application by sending real requests and observing responses, which makes it different from static scanning or code review. In CI/CD, it works best when placed after a build step and before release, so the pipeline can test the exact artefact that would otherwise move forward. The article’s central operational point is that DAST is useful when it becomes part of routine delivery rather than a separate security event. That also means it has to coexist with automated tests, build agents, and pipeline orchestration instead of interrupting them.
Practical implication: place DAST where it can gate release decisions without forcing manual rework on every successful build.
Why data consistency and scan locality matter
DAST probes often create, update, or delete records, so the scanner needs a known starting state to produce comparable results across runs. That is why seed data, database snapshots, and ephemeral test environments matter. Network distance also affects runtime because every request adds latency, and scan time grows quickly when the scanner is separated from the application by extra hops. Large monoliths and static paths add more overhead, so path filtering and scan segmentation are architectural, not cosmetic, decisions.
Practical implication: reset test data and run scans as close to the application as possible to keep results stable and cycle times acceptable.
How failure thresholds change pipeline governance
A failure threshold turns DAST from a reporting tool into a control that can break the build when issues meet a defined severity bar. The article also shows why triage matters: once a finding is marked false positive, accepted, or assigned, the control can stop blocking the same issue repeatedly. That creates a governance pattern where automated enforcement and human review share responsibility. Scheduled scans add another layer because they catch vulnerabilities that emerge even when code does not change, which is important for long-lived applications and reused dependencies.
Practical implication: define blocking thresholds, triage states, and scheduled scan cadences together so the pipeline enforces risk without creating alert fatigue.
NHI Mgmt Group analysis
CI/CD security testing fails when teams treat scan automation as a tooling choice instead of a control design choice. The article shows that DAST only becomes operational when it is aligned to pipeline stages, data resets, and release gates. That is a governance problem, not a scanner problem. For teams running identity-heavy delivery chains, the same applies to build credentials and deployment tokens: control reliability depends on how the pipeline is structured, not just which tool is installed.
Ephemeral environments create a sharper security signal than standing test systems. Fresh environments reduce state drift and make repeated scans more comparable, which matters when build decisions depend on stable evidence. Standing environments can still work, but only if data stores can be reset reliably and the test surface is limited. The broader lesson is that repeatability is the real control objective. Practitioners should treat test-environment design as part of assurance, not a side detail.
Scan latency is a governance issue because slow controls lose political support. If DAST slows delivery too much, teams bypass it or schedule it too rarely to matter. The article’s guidance on locality, path filtering, and parallelisation points to a wider pattern: controls must be tuned to the pace of engineering or they become ceremonial. For identity and access teams, this is familiar from access review fatigue. The control survives only when it fits the operating rhythm.
Failure thresholds are the point where security testing becomes enforceable policy. A pipeline that only reports issues creates visibility, but not discipline. A pipeline that blocks on defined conditions can shape behaviour, provided false positives and accepted risks are tracked cleanly. The practical outcome is better governance of release risk, because teams can separate what must stop delivery from what needs follow-up. That distinction is what keeps automation credible.
What this signals
CI/CD testing is moving from a quality gate to a governance control, which means security teams need to think about reliability, not just coverage. Delivery friction threshold: the point at which a security control becomes too slow or noisy to be trusted, and teams begin working around it instead of through it. That threshold is now as important as the finding itself.
For identity-heavy delivery systems, the real exposure often sits in build identities, deployment tokens, and automation credentials rather than in the application scan alone. Use the guidance in Guide to the Secret Sprawl Challenge to connect pipeline testing to secret handling, and pair it with NIST SP 800-63 Digital Identity Guidelines where authentication assurance is part of the release path.
The operational signal to watch is whether security checks remain frequent enough to shape developer behaviour. If scans are only occasional, or if they run far from the target environment, they will not give practitioners the kind of evidence needed for release governance. The best programme outcome is not more scanning, but more dependable decision-making.
For practitioners
- Place DAST before release, not after deployment Run scans on pull requests, staging branches, or pre-production artefacts so security findings block delivery before production exposure. Keep production scanning separate unless you have a specific, controlled need for live testing.
- Reset test data for every scan run Use database snapshots or seed data to return the application to a known-good state before each scan. Without that reset, probe actions can change results run to run and make triage unreliable.
- Run scanners as close to the app as possible Co-locate scan jobs with the target application, ideally on the same network, cluster, or host. Remove avoidable latency from firewalls, proxies, and VPN paths to keep scan duration under control.
- Break large scans into smaller concurrent jobs Use include and exclude path filters to separate static routes from dynamic ones, then run those subsets in parallel. This shortens build time and makes large applications more practical to test frequently.
- Define a failure threshold and triage states Set a build-breaking threshold for findings, then make false positive, accepted, and assigned states part of the operating process. That keeps enforcement consistent while preventing the same issue from blocking future runs forever.
Key takeaways
- DAST in CI/CD is a control design problem, not just a tooling problem, because scan placement, data state, and latency determine whether the result is trusted.
- Pipeline security only works when failures are actionable, repeatable, and sufficiently fast that teams keep using the control rather than bypassing it.
- For identity and access programmes, delivery pipelines are part of the attack surface, so credentials, test environments, and release gates need the same governance discipline as the application itself.
Standards & Framework Alignment
This section maps relevant standards and security frameworks to the operational risks and controls described in this guidance.
MITRE ATT&CK address the attack and risk surface, while NIST CSF 2.0, NIST SP 800-53 Rev 5, CIS Controls v8 and NIST Zero Trust (SP 800-207) set the governance and control requirements practitioners need to meet.
| Framework | Control / Reference | Relevance |
|---|---|---|
| NIST CSF 2.0 | PR.AC-4 | Pipeline access and control enforcement map to least-privilege delivery governance. |
| NIST SP 800-53 Rev 5 | SI-2 | Frequent testing and remediation workflows align with flaw remediation controls. |
| CIS Controls v8 | CIS-16 , Application Software Security | DAST in delivery pipelines directly supports application security testing discipline. |
| MITRE ATT&CK | TA0001 , Initial Access; TA0006 , Credential Access | Pipeline credentials and exposed app paths are common entry and credential abuse surfaces. |
| NIST Zero Trust (SP 800-207) | Pipeline trust boundaries benefit from explicit verification between build, test, and deploy stages. |
Map CI/CD identities and release gates to PR.AC-4 and restrict build permissions to the minimum needed.
Key terms
- CI/CD security testing: The use of automated security checks inside continuous integration and continuous deployment pipelines. This includes tools that evaluate code, running applications, and interactive behaviour so vulnerabilities can be found and blocked before deployment becomes irreversible.
- Dynamic Application Security Testing: Dynamic Application Security Testing evaluates a running application from the outside to identify weaknesses that only appear under real execution conditions. It is useful for validating authentication, session handling, and API behaviour, especially where configuration and integrations change how the system actually responds to attack.
- Failure threshold: A failure threshold is the rule that decides when a security finding should stop a build or deployment. It turns test output into policy, but only works when teams also define triage states and exceptions clearly.
- Ephemeral Development Environment: A short-lived development workspace created for a specific task and destroyed when the work is complete. In identity terms, it is a temporary execution boundary that should be governed like any other non-human runtime, with clear ownership, limited scope, and traceable teardown.
What's in the full article
StackHawk's full post covers the operational detail this post intentionally leaves for the source:
- Step-by-step patterns for running HawkScan on pull requests, staging branches, and scheduled jobs
- Configuration guidance for failure thresholds, includePaths, excludePaths, and technology flags
- Deployment patterns for Kubernetes jobs, parallel scan segmentation, and ephemeral test environments
- Examples of how to balance scan speed with coverage in large monoliths and multi-service pipelines
👉 The full StackHawk post covers pipeline patterns, scan tuning, and Kubernetes deployment details.
Deepen your knowledge
NHI Foundation Level course, the industry's only accredited NHI security programme, covers NHI governance, machine identity security, and secrets management. It is built for practitioners who need to connect identity controls to real operational environments.
Published by the NHIMG editorial team on August 1, 2026.
NHI Mgmt Group — the independent authority on Non-Human Identity, IAM, and Agentic AI security. nhimg.org