Security teams should place controls inside the runner, not only at the repository or dependency layer. Runtime protection can observe workflow behavior, detect unexpected network access, and block malicious activity while preserving normal build execution. The goal is to make policy enforcement adaptive to each workflow’s baseline so security is continuous rather than dependent on periodic review.
Why This Matters for Security Teams
runtime protection in CI/CD is not about adding another gate before deployment. It is about detecting what a workflow actually does after it starts, when attacker-controlled dependencies, malicious actions, or poisoned build steps try to use the runner as a launch point. NHI risk shows up here because pipeline tokens, signing keys, cloud credentials, and OAuth grants are all non-human identities that can be overused, stolen, or chained into wider compromise.
The issue is bigger than code review. NHIMG research on the State of Secrets Sprawl 2026 shows how often secrets exposure now intersects with build automation, while the CI/CD pipeline exploitation case study illustrates how compromise can move through runners rather than through source code alone. Security teams that rely only on pre-merge checks often miss runtime abuse entirely, even though the runner is where the real authority lives. Current guidance from the NIST Cybersecurity Framework 2.0 supports continuous monitoring, but the implementation challenge is making that control lightweight enough not to slow delivery.
In practice, many security teams discover runner abuse only after a workflow has already pulled secrets, contacted an unexpected host, or signed an artefact that should never have been trusted.
How It Works in Practice
Effective runtime protection sits inside or immediately beside the runner so it can observe process execution, file access, outbound network calls, and secret use in context. That matters because static repository rules cannot see whether a build step suddenly reaches out to an unknown domain, decodes a payload, or tries to access credentials outside its normal path. A practical design starts with a baseline for each workflow, then applies policy at runtime based on the job, event, branch, environment, and identity of the action being executed.
The most useful controls are usually layered, not monolithic:
- short-lived job credentials issued only for the task being run;
- allowlisted outbound destinations for builds that do not require broad internet access;
- file and process telemetry to flag suspicious post-install or pre-build behavior;
- policy-as-code that can block or quarantine anomalous actions without stopping every build;
- automatic revocation when a job finishes or a threshold is crossed.
For identity and policy design, teams should treat the runner as a workload identity rather than a static service account. That means binding permissions to the workload and its context, not to a long-lived token that quietly accumulates trust. This is where The State of Non-Human Identity Security is relevant: over-privileged and poorly monitored NHI usage is a recurring failure mode, and CI/CD is one of the easiest places for that to turn into impact. For implementation detail, the SPIFFE workload identity model is often cited in current guidance as a strong pattern for proving what the workload is at runtime, while the NIST Cybersecurity Framework 2.0 remains the clearest external baseline for continuous monitoring and response.
These controls tend to break down when runners are highly ephemeral, heavily shared, or forced into broad network access because the telemetry becomes too noisy and the policy exceptions become wider than the protection.
Common Variations and Edge Cases
Tighter runtime controls often increase operational overhead, so organisations have to balance detection depth against build latency and developer friction. That tradeoff is especially sharp in mixed estates where some pipelines run on managed hosted runners, others on self-hosted infrastructure, and some on ephemeral containers that disappear before logs can be collected.
Best practice is evolving, but current guidance suggests using stronger runtime enforcement for high-risk workflows first, such as release pipelines, signing jobs, infrastructure-as-code deployment, and any job that handles secrets or publishes artefacts. Less critical build paths can often use lighter monitoring plus alerting. This tiered approach reduces blast radius without forcing every workflow into the same security posture.
There is also a practical distinction between blocking and observing. In some environments, immediate blocking is appropriate for impossible network destinations or known malicious process chains. In others, especially where pipelines are fragile, teams may need alert-first mode until they understand the workflow baseline. The same applies to secret handling: detection without revocation is weak, and the Guide to the Secret Sprawl Challenge shows why short-lived credentials and automated cleanup matter more than manual review alone.
Runtime protection works best when it is tuned to each pipeline’s actual behavior, because generic controls often generate too much noise to sustain in fast-moving delivery environments.
Standards & Framework Alignment
This section maps relevant standards and security frameworks to the operational risks and controls described in this guidance.
OWASP Non-Human Identity Top 10, OWASP Agentic AI Top 10 and CSA MAESTRO address the attack and risk surface, while NIST AI RMF and NIST CSF 2.0 set the governance and control requirements practitioners need to meet.
| Framework | Control / Reference | Relevance |
|---|---|---|
| OWASP Non-Human Identity Top 10 | NHI-03 | Runtime controls must limit overlong or overbroad NHI credentials in pipelines. |
| OWASP Agentic AI Top 10 | A2 | Autonomous workflow steps can behave unpredictably like agents with tool access. |
| CSA MAESTRO | MAESTRO-3 | MAESTRO addresses runtime monitoring and control for autonomous execution paths. |
| NIST AI RMF | AI RMF helps govern adaptive, context-aware controls without breaking delivery. | |
| NIST CSF 2.0 | DE.CM-1 | Continuous monitoring is central to detecting suspicious runner activity in CI/CD. |
Define governance, monitor outcomes, and adjust runtime controls based on observed pipeline risk.
Related resources from NHI Mgmt Group
- How should security teams implement GPG signature validation in CI/CD pipelines without slowing delivery?
- How should security teams implement CI/CD security without slowing delivery down?
- How should security teams add application security testing into Azure DevOps CI/CD pipelines without slowing delivery?
- How should security teams secure FastAPI applications in CI/CD pipelines without slowing delivery?
Deepen Your Knowledge
Reviewed and updated by the NHIMG editorial team on August 27, 2026.
NHI Mgmt Group — the #1 independent authority on Non-Human Identity, IAM, and Agentic AI security. nhimg.org