CI/CD Pipeline Audit Checklist: What to Review Before You Trust Your Deployments
Audit a CI/CD pipeline across source control, build, tests, security, credentials, deployment, environments and operations, with baseline metrics and a federated credentials example.
A delivery pipeline is production infrastructure. It holds the credentials that can change every environment, it decides what code reaches customers, and when it is slow or unreliable the whole engineering organization slows with it. Most pipelines are never reviewed as a system. They grow one job at a time until deployments take an afternoon and nobody is sure a rollback would work.
A CI/CD pipeline audit is a structured review of how a change travels from commit to production. This checklist covers what to measure, the eight areas to inspect, the findings that come up most often, and how to turn the result into a plan. Examples use GitHub Actions and AWS. The questions apply to GitLab, Azure DevOps, Jenkins and any cloud.
Measure before you inspect
Opinions about a pipeline are cheap. Start with four numbers, usually called the DORA metrics, for each service you care about:
| Metric | What it tells you | Where to get it |
|---|---|---|
| Deployment frequency | How often you ship to production | Deploy workflow history |
| Lead time for changes | Time from commit to running in production | Merge timestamp compared with deploy timestamp |
| Change failure rate | Share of deployments that cause a rollback, hotfix or incident | Incident and rollback records |
| Time to restore | How long recovery takes after a failed change | Incident timeline |
For a quick baseline of deployment frequency and duration from GitHub:
gh run list --workflow deploy.yml --branch main --status success \
--limit 200 --json createdAt,updatedAt,headSha \
--jq '.[] | [.createdAt, .updatedAt, .headSha] | @tsv'
Add two pipeline-health numbers the DORA set leaves out: median pipeline duration from push to deployable artifact, and flaky failure rate, the share of failed runs that pass on retry with no code change. Those two explain most developer frustration.
Record the baseline before changing anything. Without it, you cannot show the audit made a difference.
The eight areas to review
1. Source control and change flow
- Is the default branch protected, with required review and required status checks?
- Can anyone, including administrators, push directly to the release branch?
- How long do branches live before merging? Long-lived branches produce large, risky merges.
- Is there one clear path to production, or several that behave differently?
- Are pipeline definitions reviewed with the same care as application code?
2. Build
- Is the build reproducible? The same commit should produce the same artifact.
- Is one artifact built once and promoted through environments, or rebuilt per environment?
- Are dependencies pinned with lockfiles, and are base images pinned by digest?
- Is caching used for dependencies and image layers, and is it actually hitting?
- Where does time go? Break the build into stages and find the slowest two.
3. Tests
- Which test levels run on every change, and which run later?
- How long does the test stage take, and can it run in parallel?
- How many tests are quarantined, skipped or routinely retried?
- Does a failing test block the merge, or can it be overridden?
- Do tests run against production-like dependencies or only mocks?
4. Security checks
- Are secrets scanning, dependency scanning and image scanning in the pipeline, and do high-severity findings block?
- Is infrastructure code scanned before it is applied?
- Are third-party pipeline actions and plugins pinned to an immutable version?
- Who can change the pipeline itself, and is that reviewed?
The DevSecOps guide for SOC 2 covers these controls and the evidence they produce in detail.
5. Credentials and access
This is the area with the most serious findings. Long-lived cloud access keys stored as CI secrets are still common, and they are exactly what an attacker wants.
- Does the pipeline use short-lived, federated credentials, or stored keys?
- Is there a separate role for each environment, with only the permissions that deployment needs?
- Can a pull request from a fork or an unreviewed branch reach production credentials?
- When were stored secrets last rotated, and who can read them?
With GitHub Actions and AWS, OpenID Connect removes stored keys entirely. The trust policy should restrict the role to one repository and one environment:
resource "aws_iam_openid_connect_provider" "github" {
url = "https://token.actions.githubusercontent.com"
client_id_list = ["sts.amazonaws.com"]
}
data "aws_iam_policy_document" "deploy_trust" {
statement {
actions = ["sts:AssumeRoleWithWebIdentity"]
principals {
type = "Federated"
identifiers = [aws_iam_openid_connect_provider.github.arn]
}
condition {
test = "StringEquals"
variable = "token.actions.githubusercontent.com:aud"
values = ["sts.amazonaws.com"]
}
condition {
test = "StringEquals"
variable = "token.actions.githubusercontent.com:sub"
values = ["repo:example-org/payments-api:environment:production"]
}
}
}
resource "aws_iam_role" "deploy" {
name = "payments-api-deploy-production"
assume_role_policy = data.aws_iam_policy_document.deploy_trust.json
}
Older versions of the AWS provider also require a thumbprint list on the provider resource. The workflow then requests a token and assumes the role, with no secret stored anywhere:
name: deploy
on:
push:
branches: [main]
permissions:
id-token: write
contents: read
concurrency:
group: deploy-production
cancel-in-progress: false
jobs:
deploy:
runs-on: ubuntu-latest
environment: production
steps:
- uses: actions/checkout@v4
- uses: aws-actions/configure-aws-credentials@v6
with:
role-to-assume: arn:aws:iam::123456789012:role/payments-api-deploy-production
aws-region: us-east-1
- run: ./scripts/deploy.sh
The version tags above are placeholders. In production, pin every third-party action to a full commit SHA so a moved tag cannot change what runs. The environment: production line matters twice: it lets you require an approval before the job runs, and it is the value the trust policy checks.
6. Deployment and rollback
- What is the deployment strategy: in-place, rolling, blue-green or canary?
- Is there an automated health check after deployment that can stop or reverse a rollout?
- How is a rollback performed, how long does it take, and when was it last done for real?
- Are database migrations backward compatible, so the previous version still runs after a migration?
- Can two deployments to the same environment run at once?
- Are feature flags used to separate deploying code from releasing a feature?
A rollback that has never been exercised is a plan, not a capability. The audit should include performing one in a non-production environment and timing it.
7. Environments and configuration
- How closely does staging match production in versions, topology and data shape?
- Is configuration separated from the artifact and versioned?
- Are environments created from code, or maintained by hand?
- Do temporary preview environments get cleaned up?
8. Pipeline operations and cost
- Who owns the pipeline, and who is paged when it is down?
- Are failures visible, with a clear signal for whether the cause is the change or the pipeline?
- Are logs kept long enough to investigate a deployment from three months ago?
- What does CI cost per month, and which workflows account for most of the runner minutes?
- Are self-hosted runners patched, isolated and short-lived?
Findings that come up most often
| Finding | Why it matters | Typical fix |
|---|---|---|
| Long-lived cloud keys in CI secrets | A leaked key gives lasting access to production | Federated, short-lived credentials scoped per environment |
| Artifact rebuilt for each environment | What was tested is not what is deployed | Build once, promote the same artifact |
| No tested rollback | Recovery is improvised during an incident | Automate rollback and rehearse it |
| Flaky tests retried until green | Real failures are hidden and trust in the pipeline erodes | Quarantine with an owner and a deadline, then fix |
| One slow serial pipeline | Lead time is hours, so changes are batched and riskier | Parallelize, cache, and split by change scope |
| Unpinned third-party actions | A compromised dependency runs with your credentials | Pin to commit SHAs and review updates |
| Manual steps between stages | Deployments depend on one person and their memory | Script the step, then gate it with an approval if needed |
| Staging unlike production | Problems appear only after release | Create both from the same code with different parameters |
Scoring and prioritizing
Score each item in the eight areas as 0 for absent, 1 for partial or 2 for in place. The totals show which areas are weakest, which is more useful than a single overall grade.
Then rank findings by risk and effort, not by area:
- Fix now. Anything that exposes production credentials or allows unreviewed changes to reach production.
- Fix this quarter. Missing rollback, artifact rebuilds, and the largest sources of pipeline delay.
- Plan. Environment parity, deployment strategy changes and test restructuring, which need coordination across teams.
Give each item an owner and a date. Re-measure the six numbers from the baseline after each group of changes.
What an audit should leave behind
- The baseline metrics and the method used to collect them.
- A diagram of the current path from commit to production, including manual steps.
- A findings list with evidence, impact, severity and effort.
- A prioritized roadmap with quick wins separated from projects.
- Working examples for the highest-priority fixes, such as a federated credential setup for one service.
If the audit shows the delay is in handoffs and approvals more than in tooling, the guide to eliminating enterprise deployment bottlenecks covers that side. For how these metrics fit a wider operating model, see the DevOps and SRE operating model.
CloudForge reviews and rebuilds delivery pipelines as part of its CI/CD consulting and DevOps consulting work, from a fixed-scope audit through to implementation alongside your engineers.
Sources
Want your delivery pipeline reviewed or rebuilt?
CloudForge audits and implements CI/CD pipelines with safe deployments, tested rollback and short-lived credentials.
See CI/CD consulting