A CI/CD security audit should do more than confirm that a pipeline is running. This checklist helps you review secrets, permissions, pull-request triggers, dependencies, build isolation, artifacts, deployment gates, and audit records in a repeatable way. Use it for new repositories, scheduled reviews, incident follow-up, and evidence collection, then record each finding with an owner, severity, and target date.
Overview
A delivery pipeline is part of your application's production infrastructure. It can read source code, install packages, build artifacts, access cloud accounts, publish releases, and change production systems. A weakness in any of those steps can expose credentials or allow an untrusted change to reach a trusted environment.
The goal of a pipeline security audit is not to make every workflow identical. It is to verify that each permission, trigger, dependency, and deployment action has a clear purpose and an appropriate control. Review the pipeline as a chain of trust:
- Source: Who can change workflow files, configuration, and release branches?
- Trigger: Which events start a job, and can untrusted code run with sensitive access?
- Build: What code, packages, tools, and runners are used to produce the artifact?
- Artifact: Can the output be identified, verified, and traced back to a source revision?
- Deployment: Who or what can promote the artifact, and are production actions gated?
- Evidence: Are logs, approvals, scan results, and changes retained well enough to investigate?
Start by creating an inventory. List repositories, workflow files, self-hosted and managed runners, package registries, container registries, deployment targets, cloud roles, signing systems, and external actions or plugins. Include inactive-looking workflows: scheduled jobs, release helpers, migration scripts, and manual emergency workflows are easy to overlook.
What to track
1. Secrets and credentials
Confirm that passwords, API keys, private keys, and tokens are stored in an approved secret manager or platform secret store rather than in source code, workflow files, build output, or issue comments. Search current and historical repository content where your tooling permits it, and check logs for accidental disclosure.
- Record every credential used by the pipeline, its owner, purpose, scope, and environment.
- Prefer short-lived, job-specific identity over long-lived static credentials.
- Separate development, preview, staging, and production access.
- Verify that secrets are not exposed to jobs running untrusted pull-request code.
- Confirm rotation and revocation steps, including an emergency response path.
- Check masking behavior, while remembering that masking does not make unsafe command output acceptable.
For GitHub Actions, GitLab CI, or another provider, review repository, project, group, organization, and environment-level variables separately. A secret inherited from a broad scope may be harder to see and easier to misuse than one attached to a single deployment job.
2. Token permissions and identity
Inspect the default permissions granted to the pipeline token and each cloud identity. Use the narrowest permission set that supports the job. A test job should not be able to publish a release, alter repository settings, or deploy to production.
Pay particular attention to tokens that can write source, create releases, approve pull requests, modify infrastructure, or exchange for cloud credentials. Document why each write permission exists. Where possible, use separate identities for reading dependencies, publishing artifacts, and deploying services.
3. Pull-request and branch triggers
Review every event that can start a job: pushes, pull requests, tags, schedules, manual dispatches, merge queues, and comments. The important question is whether code controlled by an external contributor can execute before review with access to trusted secrets or write permissions.
Keep untrusted validation jobs separate from privileged release jobs. Avoid checking out or executing fork-controlled workflow changes with production credentials. Protect release branches and require review for workflow-file changes, deployment configuration, and reusable pipeline components.
4. Actions, plugins, and build dependencies
Inventory third-party actions, CI plugins, setup scripts, package managers, base images, and downloaded command-line tools. Pin reusable actions and critical build inputs to immutable references where your platform supports that practice. A floating branch or unconstrained version can change without a corresponding review in your repository.
Track package lockfiles and verify that dependency updates are reviewed. Enable appropriate vulnerability checks for the languages and package ecosystems you use, but treat scanner output as a queue for investigation rather than an automatic risk score. Review transitive dependencies, install scripts, abandoned packages, and unexpected changes to lockfiles.
5. Containers, infrastructure, and build isolation
For containerized builds, check base image provenance, image scanning, Dockerfile changes, exposed credentials, and whether the build process needs privileged access. Do not pass host credentials into a container unless the design explicitly requires it. Review whether cached layers or shared caches could expose private files between jobs.
For self-hosted runners, document who administers the host, how it is patched, whether jobs are isolated, and how workspaces are cleaned. Treat a persistent runner as a sensitive system: one compromised job may be able to inspect files, credentials, tools, or caches left by another job. Ephemeral or strongly isolated execution can reduce that risk, but it still needs monitoring and access control.
6. Artifact integrity and release traceability
Define what makes an artifact acceptable for deployment. At minimum, record the source revision, build configuration, dependency state, build result, and destination. Prevent a deployment job from silently rebuilding different code when a previously produced artifact would be safer to promote.
Consider signing artifacts, container images, or provenance statements when your environment supports it. The specific standard and implementation may differ by platform, so document what is signed, where verification occurs, and what happens when verification fails. A signature is useful only when deployment systems actually enforce or record the verification decision.
7. Deployment controls
Check that production deployments require the appropriate review, environment approval, branch condition, or release event. Separate build and deploy permissions, and make rollback available through a known, tested path. Confirm that database migrations, feature flags, infrastructure changes, and application releases have compatible sequencing.
Review emergency access as carefully as the normal path. A break-glass workflow should be rare, logged, time-limited where possible, and followed by credential review and post-incident analysis.
8. Logging and audit evidence
Record workflow changes, permission changes, approvals, deployment identities, failed jobs, scan results, artifact identifiers, and production outcomes. Ensure logs do not contain secrets or sensitive payloads. Confirm retention is long enough for your operational and compliance needs, without assuming that a provider's default retention meets yours.
A useful audit worksheet has these columns: control, observed state, risk, evidence link, owner, due date, and status. This turns a one-time review into a working security backlog.
Cadence and checkpoints
Use a risk-based schedule rather than waiting for an annual audit. A practical baseline is a lightweight monthly review and a deeper quarterly review, supplemented by event-driven checks.
Monthly checkpoint
- Review newly added workflows, actions, plugins, runners, and credentials.
- Check failed scans, expired credentials, unusual deployments, and unexpected permission changes.
- Confirm production identities and environment approvals still match current responsibilities.
- Sample recent deployments and trace each one from source revision to artifact to environment.
Quarterly checkpoint
- Rebuild the pipeline inventory and remove unused jobs, secrets, runners, and integrations.
- Review token scopes, branch protections, reusable workflows, and third-party dependencies.
- Test secret rotation, artifact verification, rollback, and emergency access procedures.
- Review runner isolation, cache behavior, base images, and privileged build requirements.
- Export or link audit evidence so findings can be independently checked.
Event-driven checkpoint
Run a focused audit after a supply-chain incident, credential exposure, major CI provider change, migration to a new cloud platform, addition of a self-hosted runner, new deployment target, significant workflow refactor, or change in repository ownership. Also review a repository when it moves from internal testing to customer-facing production.
Keep a dated record of the audit scope and platform assumptions. GitHub Actions, GitLab CI, package registries, signing tools, and cloud identity controls evolve, so verify current provider behavior before treating an old checklist item as complete.
How to interpret changes
Not every change is a security regression. A new workflow may reduce manual handling, and a new scanner may increase the number of findings without changing the underlying exposure. Interpret changes by asking what changed in trust, reach, reversibility, and evidence.
A useful severity model is:
- Critical: A path can expose production credentials, modify production directly, or publish untrusted code as a trusted release.
- High: A job has broader permissions than needed, untrusted code can reach sensitive services, or artifact origin cannot be established for important deployments.
- Medium: Controls exist but are inconsistent, difficult to verify, or dependent on manual steps that are not regularly tested.
- Low: Documentation, cleanup, alerting, or evidence gaps reduce confidence but do not currently provide a clear route to compromise.
Prioritize findings that combine high privilege with a broad trigger. For example, a scheduled documentation job may be less urgent than a pull-request workflow that can assume a production-capable cloud role. Also prioritize fixes that remove entire classes of risk: narrowing a default token, separating trusted deployment jobs, eliminating a long-lived key, or pinning a critical external action can be more valuable than adding another alert.
When a finding is accepted rather than fixed, record the reason, affected assets, compensating controls, owner, and expiration or review date. Risk acceptance should not become a permanent substitute for remediation.
When to revisit
Schedule the next review before closing the current one. Use a monthly checkpoint for pipeline inventory and exceptions, and a quarterly deep review for permissions, dependencies, runners, artifacts, and deployment controls. Revisit immediately when credentials may have leaked, a workflow or action changes, a new package ecosystem is introduced, or a production deployment behaves unexpectedly.
For a practical next step, choose one representative repository and complete the worksheet end to end. Map its triggers and identities, list every secret and external action, trace a recent artifact into production, and test one rollback or credential-revocation procedure. Then apply the highest-value controls to the remaining repositories through reusable templates or policy checks.
Link the final worksheet to your broader web app production readiness checklist and use the preview environment workflow to review branch-to-production boundaries. If the pipeline deploys APIs or changes databases, pair this audit with the API integration planning template and safe database migration checklist. The result is a repeatable security review that improves with each release instead of a document that becomes obsolete after one audit.