By NHI Mgmt Group Editorial TeamDomain: Cyber SecuritySource: EquixlyPublished April 20, 2026

TL;DR: API security is widely present in CI/CD pipelines, but most organisations still scan weekly or daily rather than on every commit, according to Equixly’s analysis of current DevSecOps practice. The security gap is not awareness, but inconsistent control application across access, secrets, policy, and runtime validation.


At a glance

What this is: This is a DevSecOps playbook on building API security into CI/CD, with the central finding that most teams under-apply controls across the pipeline even when they claim to have adopted them.

Why it matters: It matters because CI/CD now governs how APIs, identities, and secrets reach production, so weak pipeline controls can turn routine deployment into a credential and authorisation risk for both human and non-human identities.

By the numbers:

👉 Read Equixly's guide to API security in CI/CD pipelines


Context

API security in CI/CD is about controlling how authentication logic, secrets, and deployment changes move from code to production. The article argues that many organisations have adopted the idea of shift-left security but still leave the pipeline unevenly protected, which creates an operational gap between intent and enforcement.

That gap matters to IAM and NHI practitioners because CI runners, service accounts, tokens, and deployment identities often carry the permissions that make API changes real. When those identities are over-scoped or when secrets leak into pipeline artefacts, the pipeline becomes part of the attack surface rather than a control point. The pattern described here is common in modern DevSecOps programmes, not an edge case.


Key questions

Q: How should security teams implement API security testing in CI/CD pipelines?

A: Start by automating the endpoints that carry privileged actions, sensitive data, or access decisions. Combine authentication checks, authorization validation, and negative testing so the pipeline can prove whether a caller can only do what its identity should allow. Keep the tests repeatable, fast, and tied to release gates so failures are seen while code context still exists.

Q: When does a CI/CD pipeline become a security risk?

A: A CI/CD pipeline becomes a security risk when it can accept unverified code, expose signing keys, or promote artifacts without strong controls on who approved the change. In that state, the pipeline can be used to distribute malicious software at scale. Teams should inspect identity, secrets, and approvals together.

Q: What breaks when API security testing stops at build time?

A: You miss stateful flaws that only appear when real users, roles, and request sequences interact with the live service. That is where broken authorisation, token replay, and unexpected access paths emerge, so build-time checks need runtime corroboration to be reliable.

Q: Who is accountable when API access controls fail?

A: Accountability should sit with the team that owns the API lifecycle, including design, deployment, access scope, and retirement. Security may set policy, but engineering and product owners must own the data and behaviour exposed by each interface. Without explicit ownership, APIs tend to outlive their controls and inherit stale permissions.


Technical breakdown

Access control in CI/CD pipelines

Access control in a CI/CD pipeline means every runner, service account, gateway, and deployment target gets only the permissions needed for its specific task. In practice, this is where identity governance meets software delivery, because pipeline components behave like non-human identities with real authority. Over-permissioned GitHub Actions workflows, misconfigured cloud roles, and broad deployment privileges create a wide blast radius if a single step is compromised. Least privilege is not enough if permissions are inherited too broadly or never re-reviewed.

Practical implication: map pipeline identities to explicit roles and remove standing privilege from build and deployment paths.

Secrets management for API delivery pipelines

Secrets management in CI/CD is about keeping API keys, tokens, and passwords out of source files, logs, and reusable workflows. The article’s important point is that the vault is not the whole control. Credentials often leak around it through repository commits, printed logs, or machine identities that were never meant to see them. That makes lifecycle discipline, runtime injection, and revocation more important than storage alone. In identity terms, a secret is only secure if its exposure window and audience are tightly governed.

Practical implication: inject credentials at runtime, block secrets in code review, and revoke anything that appears in a pipeline artefact.

Policy-as-code and runtime observability

Policy-as-code tools check configuration before deployment, but API security does not end at the gate. Runtime observability is needed to see whether authentication behaves as expected, whether traffic patterns are normal, and whether token replay or privilege misuse is happening after release. This is where API security aligns with NIST-style continuous monitoring and with identity controls that verify actual use, not just approved design. Without runtime visibility, a secure build can still produce an exposed service.

Practical implication: combine pre-deploy policy checks with post-deploy telemetry on authentication, request sequences, and abuse patterns.


Threat narrative

Attacker objective: The objective is to turn the CI/CD pipeline into a path to production API access, then use that access to steal data, abuse privileged workflows, or persist through trusted automation.

  1. Entry occurs through hardcoded API keys, exposed tokens, or overly permissive pipeline identities that allow an attacker or malicious workflow to reach deployment assets.
  2. Escalation follows when the attacker abuses standing permissions, reuses leaked secrets, or moves from a single pipeline component into broader cloud or API access.
  3. Impact comes from unauthorized API exposure, broken object-level authorisation, token replay, or production changes that widen access and expose sensitive data.

NHI Mgmt Group analysis

API security in CI/CD is now an identity governance problem, not just a testing problem. The article’s core message is that pipeline controls fail when teams treat scans as the control rather than the signal. CI runners, service accounts, and deployment tokens are non-human identities with authority, so their scope, rotation, and observability must be governed like any other privileged identity. The practitioner conclusion is simple: if the pipeline can deploy code, it can also deploy risk.

Pipeline secret exposure is a lifecycle failure, not a vault failure. The article correctly notes that credentials often leak in commits, logs, or third-party actions even when a vault exists. That aligns with the broader NHI problem of unmanaged exposure windows, where the control objective is not storage but containment across creation, use, and revocation. The practitioner conclusion is to govern the full secret lifecycle, not just the secret store.

Runtime validation is the missing control in most DevSecOps programmes. Build-time checks can confirm that code matches policy, but they cannot prove that a live API enforces authorisation correctly under real traffic and role transitions. This creates a detection-response latency problem: vulnerabilities that only appear in stateful workflows remain invisible until production use. The practitioner conclusion is to treat runtime API behaviour as an identity and access control signal, not just an application security concern.

CI/CD pipeline identities are becoming the new privileged workload layer. As organisations automate more of the software supply chain, the authority embedded in build systems increasingly resembles PAM scope without the same governance discipline. That means the strongest programmes will fuse CI/CD security, NHI governance, and least-privilege policy into a single control model. The practitioner conclusion is to review pipeline identities with the same scrutiny used for production admin access.

Shadow APIs and zombie endpoints create a governance blind spot that security teams still underestimate. The article’s discussion of undiscovered and deprecated APIs shows that contract visibility is not equivalent to real service visibility. This is the kind of drift that creates policy gaps in both IAM and application controls, because access decisions are made against an incomplete inventory. The practitioner conclusion is to align API discovery with access governance, not with documentation alone.

What this signals

Pipeline security is converging with NHI governance. As CI/CD becomes the place where APIs, credentials, and deployment authority are assembled, the distinction between application security and identity security gets thinner. Teams should expect more scrutiny of service accounts, workflow tokens, and runtime secrets as part of release governance, not as separate IAM hygiene.

Secret exposure windows matter more than secret storage. The practical lesson from API delivery pipelines is that a secret is only as safe as its shortest uncontrolled path from creation to use. That is why lifecycle management, rotation, and revocation need to be instrumented alongside scanning and policy enforcement, especially in systems that use NHI lifecycle governance.

Shadow APIs create an identity blind spot. If the inventory is incomplete, access policy is being enforced against partial reality. Security teams should align API discovery with identity and access reviews so deprecated endpoints, undocumented routes, and orphaned workflows do not remain implicitly trusted.


For practitioners

  • Implement commit-level secret scanning Run secrets detection on every commit, not on a weekly schedule, and fail the pipeline when credentials appear in source, logs, or generated files. Pair detection with automatic revocation so exposed tokens do not remain usable after discovery.
  • Scope pipeline identities to single-purpose roles Review CI runners, deployment service accounts, and workflow identities as non-human identities with narrowly defined permissions. Remove inherited broad access and require explicit approval for any role that can deploy, modify, or read sensitive secrets.
  • Use policy-as-code gates before deployment Apply checks for insecure YAML, exposed tokens, weak authentication patterns, and overly permissive infrastructure definitions before code reaches staging or production. Treat those policies as enforcement points, not documentation.
  • Add runtime API telemetry and abuse detection Monitor authentication events, anomalous request sequences, replay patterns, and traffic spikes after release so stateful authorisation failures become visible. Feed those signals into incident response instead of leaving them in application logs.

Key takeaways

  • API security in CI/CD fails when teams confuse scanning with governance, leaving identities, secrets, and release paths under-controlled.
  • The evidence points to a wide implementation gap, with most organisations not validating every commit even after adopting pipeline security.
  • Practitioners need to treat CI/CD components as privileged identities and pair pre-deploy checks with runtime authorisation monitoring.

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 and MITRE ATT&CK address the attack and risk surface, while NIST CSF 2.0, NIST SP 800-53 Rev 5 and CIS Controls v8 set the governance and control requirements practitioners need to meet.

FrameworkControl / ReferenceRelevance
OWASP Non-Human Identity Top 10NHI-03Pipeline secrets and lifecycle exposure map directly to NHI credential control gaps.
MITRE ATT&CKTA0006 , Credential Access; TA0008 , Lateral MovementLeaked tokens and over-scoped runners create classic credential access and movement paths.
NIST CSF 2.0PR.AC-4Least-privilege access for pipeline identities is a direct CSF access control issue.
NIST SP 800-53 Rev 5AC-6The article centres on scope reduction for build and deployment identities.
CIS Controls v8CIS-5 , Account ManagementPipeline service accounts and workflow identities need lifecycle control and review.

Tie pipeline monitoring to credential access and lateral movement techniques, then prioritise containment gaps.


Key terms

  • CI/CD Pipeline Identity: The machine identity used by continuous integration and deployment systems to authenticate to code repositories, registries, and cloud environments during automated build and deployment.
  • Policy as Code: Policy as code stores authorization logic in version control and evaluates it through testable, reviewable rules. For agent governance, it makes runtime decisions reproducible and measurable, which is critical when actions can be triggered by untrusted content and executed at machine speed.
  • Runtime API Validation: Runtime API validation is the act of testing a live API to confirm its real authentication and authorisation behaviour under current traffic and state. It catches logic flaws and exposure changes that static checks cannot see because they only exist in execution, not in code.
  • Shadow API: An API endpoint that exists in production but is not fully known, reviewed, or governed by the security programme. Shadow APIs often emerge through fast delivery, copy-paste development, or overlooked internal routes, and they create untracked exposure because they sit outside inventory, policy, and ownership processes.

What's in the full article

Equixly's full blog post covers the operational detail this post intentionally leaves for the source:

  • Stage-by-stage implementation guidance for SAST, SCA, SBOM, IaC scanning, and API testing in the pipeline
  • How to wire deployment gates to severity thresholds without blocking every release
  • Runtime monitoring patterns for authentication, abuse detection, and post-release validation
  • Practical examples of how Equixly fits into preview, staging, and production environments

👉 The full Equixly post covers stage-by-stage controls, deployment gates, and production monitoring detail.

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 helps IAM, PAM, and security teams bring identity discipline into automation-heavy environments.
NHIMG Editorial Note
Published by the NHIMG editorial team on August 19, 2026.
NHI Mgmt Group — the independent authority on Non-Human Identity, IAM, and Agentic AI security. nhimg.org