Skip to content

Lesson 8 of 10 · 3 min read

CI/CD Pipeline Security and Build Authority

Free lessonReviewed By the AISecurityInterviews editorial team
Reading position
In this lesson

TL;DR: CI/CD security protects the authority to transform source into production artifacts. Keep untrusted contributions away from privileged jobs, bind release identity to reviewed inputs and verify the artifact at promotion.

Before you read

Pick an answer before you read further. The lesson below explains it, and guessing first, right or wrong, helps the explanation stay with you.

  1. 1A pull request passes a source scan. May its job use a production deployment credential?

The pipeline is a privileged application

The assets include signing authority, package-publishing credentials, deployment identities and release artifacts. Contributors can influence source files and build metadata. A compromised dependency or runner can act with the permissions of the job that invokes it. The decisive boundary is where contributor-controlled material enters an execution context that can publish or deploy.

Pipeline scanning therefore inspects workflow definitions and delivery settings as well as source. It asks which events trigger jobs, who may edit those definitions, what tokens jobs receive, whether runners are reused and whether branch or environment protections can be bypassed. A source vulnerability scanner does not answer those questions.

Split untrusted work from release authority

Run contribution checks with narrow permissions and no production secrets. A privileged promotion job must consume a reviewed revision and a verified artifact, not an arbitrary path or artifact label supplied by an earlier untrusted job. Ephemeral runners reduce residual state, but do not make hostile code safe while it is executing. Restrict network access and credentials according to the job's purpose.

Short-lived workload identity reduces the lifetime of a stolen credential. It still needs a trust policy that constrains the expected repository, workflow, branch or environment and token audience. A token with a short expiration can cause substantial harm before it expires. Avoid treating its duration as a substitute for authorization.

SECURITY OPERATIONS
Separate analysis from release authority

Boundary checks

Artifact provenance

  • Match source, builder and output digest.

Destination policy

  • Recheck at the production boundary.
1/4

Contribution

Untrusted source

A result from an unprivileged job is evidence, not a deployment grant.

A pipeline finding needs a path

Consider a fictional agent service whose test job can write to the package registry. Even if the application has no known vulnerabilities, a contributor-controlled test can run with publication authority. The repair is to remove that authority from the contribution path and move publication behind independent review. Adding another application scan leaves the privilege defect intact.

After the change, verify that a harmless contribution cannot obtain a publishing token and that an approved release still succeeds. Also test failure behavior: an unavailable signature service should leave the release pending or rejected, not silently skip verification. Audit the escape hatch and assign an expiry to exceptional releases.

Product context, checked November 2026

Cycode documents pipeline and supply-chain security alongside application testing. OX Security connects development infrastructure into its ASPM workflow. Evaluate the particular workflow systems and settings they inspect; an imported source finding does not demonstrate pipeline coverage.

The existing SLSA and provenance concept explains what a build statement establishes. Use that evidence alongside pipeline configuration review. A signature from an unexpected builder, or one attached to a different digest, does not authorize deployment.

Evidence to keep

Retain a map of triggers to identities, permissions granted per job, runner lifecycle and the artifact promotion rule. Store redacted token claims rather than live tokens. Measure the fraction of release paths with verified inputs and bounded authority, plus unresolved exceptions. Counting successful pipeline scans hides manually triggered releases and forgotten repositories.

For the applied design answer, use CI/CD hardening; for model-driven automation, use AI agents in CI.

Check yourself

Say or write your answer first, then reveal. Explaining it from memory, in your own words, is the skill an interviewer is checking.

  1. 1What does a short-lived token fail to solve?

  2. 2What must promotion verify?

Practise it as an interviewer asks it

Course lessons that teach this

Related lessons