Use code review tools for detection and triage, then add runtime testing whenever the issue could depend on live credentials, application state, or cloud permissions. If the answer to exploitability changes when an identity, tenant, or workflow changes, code review alone is not enough. That is the signal to add live testing and control-plane review.
Why This Matters for Security Teams
Code review tools are strong at finding insecure patterns, dependency issues, and policy violations before release, but they often stop short of proving whether a weakness is actually exploitable in a live environment. That distinction matters when access paths depend on cloud roles, ephemeral tokens, tenant boundaries, or workflow state. NIST’s NIST Cybersecurity Framework 2.0 places clear emphasis on identifying, protecting, detecting, responding, and recovering across the full operating environment, not only in source code.
The practical risk is false confidence. A clean pull request may still ship a defect that only appears after deployment, when secrets are mounted, a service account is overprivileged, or a CI job inherits broader permissions than intended. That is why runtime testing is not a separate discipline from review, but a validation layer for questions that code alone cannot answer. Teams that treat both as interchangeable usually miss the difference between “looks risky” and “can be abused right now.” In practice, many security teams encounter the real weakness only after a deployment, permission change, or incident reveals how the system actually behaves.
How It Works in Practice
The decision point is simple: use code review tools when the question is static, and add runtime testing when the question is contextual. Static analysis is best for catching insecure functions, hard-coded secrets, unsafe deserialisation, weak auth checks, or policy drift in infrastructure-as-code. Runtime testing becomes necessary when exploitability depends on live identity, control-plane permissions, stateful workflows, feature flags, or external integrations.
A useful operating model is to separate findings into three buckets:
- Source-level issues that can be verified through review and automated scanning alone.
- Environment-dependent issues that require test credentials, staging tenants, or controlled access to confirm impact.
- Ambiguous issues that need both code inspection and runtime validation before a severity decision.
For the second and third buckets, teams should test in an environment that mirrors identity and permission boundaries closely enough to answer the real exploitability question. That may include replaying API calls with scoped credentials, checking whether a service account can reach unintended resources, or validating whether an application honours tenant isolation under real session state. Guidance from OWASP Web Security Testing Guide remains useful here because it emphasises context-aware verification rather than assuming code findings equal runtime risk.
For cloud and identity-heavy systems, this also means checking the control plane, not just the application path. If an issue changes when IAM policy, token scope, or deployment role changes, runtime testing should be part of triage. That is especially important for secrets exposure, overbroad service accounts, and misconfigured automation. Where teams need a threat-informed lens, MITRE’s MITRE ATT&CK helps map likely abuse paths once a finding has moved beyond code hygiene into actual adversary technique.
These controls tend to break down when test environments do not mirror production identity boundaries because the result can neither prove nor disprove real exploitability.
Common Variations and Edge Cases
Tighter runtime testing often increases operational overhead, requiring organisations to balance faster code feedback against the cost of maintaining realistic test identities, data, and permissions. That tradeoff is usually worth it for high-impact paths, but current guidance suggests teams should not test everything the same way.
For pure logic flaws that do not depend on access state, code review and static analysis may be enough to prioritise remediation. For issues involving secrets, tenant isolation, federated identity, or automation tokens, best practice is evolving toward a hybrid model in which review tools flag candidates and runtime checks confirm whether the control actually fails in practice. There is no universal standard for this yet, but the operational pattern is consistent: the more the issue depends on who is calling, where they are calling from, and what they can reach, the less useful code review alone becomes.
Teams should also be careful with ephemeral environments and synthetic test identities. If staging lacks realistic permissions, the test may produce a false negative. If the environment is too broad, the test may exaggerate risk. For that reason, security teams often pair runtime validation with control-plane review of IAM, secrets management, and deployment roles, then use the result to decide whether a finding is a code defect, a configuration defect, or both. OWASP’s Application Security Verification Standard is a helpful reference when defining what level of verification is appropriate for a given class of issue.
Standards & Framework Alignment
This section maps relevant standards and security frameworks to the operational risks and controls described in this guidance.
MITRE ATT&CK and OWASP Agentic AI Top 10 address the attack and risk surface, while NIST CSF 2.0 and NIST AI RMF set the governance and control requirements practitioners need to meet.
| Framework | Control / Reference | Relevance |
|---|---|---|
| NIST CSF 2.0 | ID.RA-1 | Risk identification should account for whether a finding is exploitable in the live environment. |
| MITRE ATT&CK | T1078 | Valid accounts is relevant when exploitability hinges on real credentials or workflow access. |
| OWASP Agentic AI Top 10 | Agentic systems often need runtime checks because tool use and state change exploitability. | |
| NIST AI RMF | AI risk management supports deciding when static review is insufficient for operational risk. |
Validate agent tool access and state-dependent behaviour in a live or faithful test environment.
Related resources from NHI Mgmt Group
- How should teams decide whether to use generated auth code in production?
- How can teams decide whether to use SQL or natural-language-style tools for agents?
- How do security teams decide whether to keep Cognito-like tools in scope?
- How do teams decide whether existing tools are enough for audit needs?
Deepen Your Knowledge
Reviewed and updated by the NHIMG editorial team on August 18, 2026.
NHI Mgmt Group — the #1 independent authority on Non-Human Identity, IAM, and Agentic AI security. nhimg.org