Join our Newsletter — 33% off our NHI Course
Home FAQ Cyber Security How should security teams detect indicators of compromise…
Cyber Security

How should security teams detect indicators of compromise in CI/CD pipelines before malicious code reaches production?

← Back to all FAQ
By NHI Mgmt Group Editorial Team Updated September 1, 2026 Domain: Cyber Security

Security teams should treat CI/CD as a primary attack surface, not just a delivery system. The strongest approach is layered detection: scan dependencies, review lockfile diffs, flag obfuscated or packed code, inspect pipeline configuration changes, and monitor build logs for unusual network calls or unexpected processes. Secret scanning and integrity checks should be enforced automatically to catch tampering early.

Why This Matters for Security Teams

CI/CD compromise is dangerous because it turns a trusted delivery path into an attacker-controlled distribution channel. When pipeline code, build steps, or dependencies are altered before production, the result can be malicious functionality that arrives with the organisation’s own release process and inheritance of trust. Security teams therefore need to treat build and release systems as high-value assets, not just engineering tooling. NIST Cybersecurity Framework 2.0 is useful here because it frames pipeline security as a governance, protect, detect, and recover problem rather than a single scanner problem, and the control logic in NIST Cybersecurity Framework 2.0 maps well to prevention plus early detection. The practical mistake is assuming that once code passes tests, it is safe. Attackers often target the gaps between source control, build runners, artifact stores, and deployment automation. That means indicators of compromise can appear in dependency changes, build scripts, environment variables, runner behaviour, or signed artifacts that no longer match expected content. In practice, many security teams encounter CI/CD compromise only after a release has already been promoted, rather than through intentional build-path monitoring.

How It Works in Practice

Effective detection depends on correlating signals across the pipeline, not relying on a single control. Teams should baseline normal repository, runner, and artifact behaviour, then alert on deviations that suggest tampering or execution abuse. Source control events, pipeline configuration updates, and dependency changes should be watched together because malicious activity often starts with a small change that looks routine in isolation. A workable detection stack usually includes:
  • Dependency and lockfile comparison to catch unexpected version drift or new transitive packages.
  • Secret scanning in commits, build logs, and artifact outputs to identify exposed tokens or injected credentials.
  • File integrity checks for pipeline definitions, build scripts, and release artifacts.
  • Runtime telemetry from build agents to spot unusual child processes, shell invocation, or outbound connections.
  • Policy checks for unsigned artifacts, suspicious privilege use, and changes to release approvals.
Security teams should also preserve evidence from build logs and runner telemetry so that a suspected compromise can be reconstructed quickly. Control selection should align with the organisation’s baseline hardening and logging requirements, and NIST SP 800-53 Rev 5 Security and Privacy Controls provides a strong reference point for audit logging, configuration management, and integrity monitoring. Where pipelines include AI-assisted code generation or automated remediation, the risk surface expands further because the pipeline may be ingesting or executing machine-generated content that deserves extra validation. These controls tend to break down when build runners are highly ephemeral and logs are not centrally retained, because the compromise signal disappears before analysts can correlate it.

Common Variations and Edge Cases

Tighter pipeline monitoring often increases developer friction and alert volume, requiring organisations to balance release speed against tamper visibility. That tradeoff is real, especially in fast-moving environments where frequent changes are normal and false positives can quickly become ignored. Best practice is evolving for teams using reusable workflows, self-hosted runners, or software supply chain automation across multiple repositories. In those environments, a single compromised template can affect many builds at once, so the question is not just whether a specific job is suspicious, but whether a trusted control point has been altered. Current guidance suggests treating shared pipeline components as privileged assets with stronger review, change control, and integrity validation than ordinary application code. Edge cases also matter. In container-heavy workflows, malicious code may not appear as a traditional binary but as a small script inside a build image layer, a package post-install hook, or a dependency pulled from a compromised registry. For organisations adopting agentic AI in the delivery chain, additional scrutiny is warranted for tool-using agents that can modify code, open pull requests, or trigger deployments. The line between automation and compromise is not always obvious, so teams need clear approval boundaries and strong provenance checks. A useful recent warning on attacker tradecraft in AI-enabled operations is the Anthropic — first AI-orchestrated cyber espionage campaign report, which reinforces how quickly automation can be turned against defenders when guardrails are weak.

Standards & Framework Alignment

This section maps relevant standards and security frameworks to the operational risks and controls described in this guidance.

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.

FrameworkControl / ReferenceRelevance
NIST CSF 2.0DE.CM-8Pipeline telemetry and build integrity monitoring are central to this detection question.
NIST AI RMFAI-assisted development and automation add governance and monitoring risk to CI/CD.
OWASP Agentic AI Top 10Agentic tools in delivery pipelines can alter code or trigger actions with execution authority.

Collect and correlate pipeline telemetry so suspicious build and release activity is detected early.

Deepen Your Knowledge

Sign up to our weekly newsletter — get 33% off our NHI Foundation Level Course

    NHIMG Editorial Note
    Reviewed and updated by the NHIMG editorial team on September 1, 2026.
    NHI Mgmt Group — the #1 independent authority on Non-Human Identity, IAM, and Agentic AI security. nhimg.org