A secure delivery pipeline is not a single tool or one approval step. It is a chain of small controls that reduce the chance of leaked secrets, vulnerable dependencies, unsafe deployments, and weak auditability. This checklist is designed as a reusable reference for engineering teams that want practical DevSecOps best practices for CI/CD pipelines. Use it when you build a new pipeline, review an existing one, or update tooling across GitHub Actions, GitLab CI, Jenkins, Kubernetes, or GitOps workflows.
Overview
This article gives you a CI CD security checklist you can return to before changing pipeline logic, onboarding new services, or tightening compliance requirements. The goal is not to add friction for its own sake. The goal is to place security controls where they prevent common failures without blocking normal engineering work.
A secure CI pipeline usually protects five things at once:
- Source integrity: only trusted code and reviewed changes should trigger sensitive actions.
- Build integrity: builds should be reproducible, auditable, and isolated from one another.
- Secrets safety: credentials should be scoped, rotated, and never embedded in repository history or runner images.
- Artifact trust: the output of the pipeline should be traceable, scanned, and suitable for promotion between environments.
- Deployment control: releases should move through clear gates with rollback and incident handling in place.
In practice, the strongest DevSecOps best practices are usually boring and consistent: least privilege, short-lived credentials, branch protection, dependency checks, signed artifacts, environment separation, and clear observability. Teams that do these basics well often reduce avoidable risk faster than teams chasing every new scanner.
If your organization is still maturing, start by documenting your current pipeline stages, identities, secrets, and deployment targets. You cannot secure what you cannot see. For teams standardizing at a broader level, the patterns in Internal Developer Platform Examples: What Mature Platform Teams Standardize are useful when turning one-off practices into platform defaults.
Checklist by scenario
Use these scenario-based checklists to review your pipeline in the order risk usually appears.
1. Repository and change management
Before code reaches a runner, review how changes are introduced.
- Require pull or merge request reviews for protected branches.
- Limit who can modify workflow files, pipeline definitions, and deployment manifests.
- Use branch protection rules for main release branches and infrastructure repositories.
- Require status checks before merge for tests, linting, and relevant security scans.
- Separate trusted internal contributions from untrusted fork-based contributions when secrets or deployment permissions are involved.
- Review automation accounts and bots with the same care as human users.
- Record who approved a production-affecting change and why.
This is one of the most overlooked pipeline security controls. If anyone can modify the workflow that runs privileged jobs, later controls become less meaningful.
2. Runner and build environment security
Runners are high-value targets because they can access code, tokens, artifacts, and deployment paths.
- Prefer ephemeral runners or short-lived build environments where possible.
- Do not reuse mutable build hosts for unrelated projects unless isolation is strong and documented.
- Patch runner images and base build containers on a regular schedule.
- Minimize preinstalled tools to reduce attack surface.
- Restrict outbound network access from runners to required destinations only.
- Disable interactive access to production-capable runners except for controlled break-glass situations.
- Log job execution details, including trigger source, actor, artifact identifiers, and environment target.
If your pipelines build containers or infrastructure images, treat the build environment like production infrastructure. The same hardening mindset used in Terraform Best Practices Checklist for Scalable Infrastructure as Code also applies here: controlled inputs, reviewed changes, and predictable outputs.
3. Identity, access, and secret handling
Many pipeline incidents are identity problems disguised as build problems.
- Use workload identity federation or other short-lived authentication methods instead of long-lived static keys where supported.
- Scope credentials per environment, repository, and job rather than sharing a single broad token.
- Store secrets in a dedicated secrets manager, not directly in source code or plain-text configuration.
- Mask secrets in logs and verify that debug mode does not accidentally print sensitive values.
- Rotate credentials when maintainers change roles, when environments change, or after suspected exposure.
- Separate read-only actions from write or deploy actions.
- Review secret access policies at the same time you review pipeline permissions.
For a deeper comparison of storage and operational tradeoffs, see Secrets Management Tools Compared: Vault vs Cloud-Native Options vs Password Managers.
4. Dependency and supply chain checks
Modern pipelines pull code, packages, images, actions, plugins, and modules from many places. That makes supply chain hygiene part of the secure CI pipeline baseline.
- Scan application dependencies for known vulnerabilities during the build process.
- Review direct and transitive dependencies, not just top-level packages.
- Pin action versions, container tags, and third-party plugins to reduce drift.
- Prefer trusted registries and explicit allowlists for package sources.
- Scan base images before application layers are built on top of them.
- Generate and retain a software bill of materials if your process requires asset traceability.
- Define severity thresholds and exception handling rules so findings do not become noisy and ignored.
The point is not to fail every build on every issue. The point is to create a predictable review path: what blocks, what warns, who approves exceptions, and when those exceptions expire.
5. Code, config, and infrastructure scanning
Shift-left security checklist items should cover more than application code.
- Run static analysis for application code where it adds useful signal.
- Scan infrastructure as code for risky network, identity, storage, and encryption settings.
- Check container definitions for unsafe defaults such as running as root when avoidable.
- Review Kubernetes manifests for privilege escalation, open network paths, and excessive permissions.
- Inspect policy-as-code rules for drift from current platform standards.
- Make scan output visible to developers in pull requests, not only in separate dashboards.
Security findings are most useful when they are close to the work that introduced them. If remediation is delayed until release day, teams often choose speed over cleanup.
6. Artifact integrity and promotion
Once a build passes, the artifact itself becomes the unit of trust.
- Store artifacts in a controlled registry or repository with access logging.
- Promote the same tested artifact between environments instead of rebuilding with different inputs.
- Sign artifacts if your workflow supports it.
- Attach metadata that links artifacts to commit SHA, pipeline run, source repository, and scan results.
- Prevent manual tampering with artifacts outside the approved release process.
- Define retention rules so critical release evidence is available for audit and incident review.
This step matters because many teams secure the build but weaken the handoff. If the production artifact cannot be tied back to a known build, auditability is incomplete.
7. Deployment gates and environment controls
Deployment should be controlled by environment sensitivity, not just pipeline convenience.
- Separate development, staging, and production credentials and approval paths.
- Require explicit approvals for production changes that bypass normal release automation.
- Use protected environments or deployment policies to prevent accidental releases from untrusted branches.
- Limit who can trigger rollback, hotfix, or emergency deploy paths.
- Use progressive delivery where appropriate to reduce blast radius.
- Define clear rollback criteria before production rollout begins.
- Record what changed, who approved it, and how to reverse it.
If you deploy to Kubernetes, release safety should align with your rollout method. The guidance in Kubernetes Deployment Strategies Explained: Rolling, Blue-Green, Canary, and Recreate is helpful when pairing security controls with deployment patterns.
8. GitOps and cluster-side considerations
Teams using GitOps should secure both the repository and the reconciliation path.
- Restrict who can modify the GitOps source of truth.
- Separate application repositories from environment or cluster configuration repositories if that improves control clarity.
- Audit the permissions of the GitOps controller inside the cluster.
- Protect secrets rendering or decryption workflows used during reconciliation.
- Define how policy violations are surfaced before sync to production.
- Review whether sync automation can override emergency operational controls.
Tool choice matters less than control coverage, but operational differences can affect risk. If you are evaluating controllers, Argo CD vs Flux: Which GitOps Tool Fits Your Kubernetes Workflow? can help frame the tradeoffs.
9. Logging, monitoring, and response readiness
A pipeline is only as secure as your ability to detect misuse and respond quickly.
- Log pipeline triggers, approvals, secret access events, deployment attempts, and policy failures.
- Alert on unusual activity such as unexpected branch triggers, repeated failed approvals, or new high-privilege tokens.
- Retain enough pipeline and deployment history to support incident investigation.
- Correlate CI/CD events with infrastructure and application telemetry.
- Define an escalation path for suspected supply chain or credential incidents.
- Test whether responders can quickly answer basic questions: what changed, who triggered it, what artifact was deployed, and where.
Teams that invest in observability often reduce time to answer during incidents. For broader tooling patterns, see Best Observability Tools for Modern DevOps Teams and OpenTelemetry Adoption Checklist for Logs, Metrics, and Traces. For response workflow, keep an operational runbook aligned with Incident Response Checklist for DevOps Teams: Detection, Escalation, and Recovery.
10. Team workflow and onboarding controls
Secure delivery pipelines depend on people understanding the system they are changing.
- Document how developers request new secrets, environments, and pipeline permissions.
- Make secure defaults the easiest path, especially for new repositories.
- Include pipeline security expectations in engineering onboarding.
- Teach developers how to interpret scan output and request temporary exceptions responsibly.
- Review permissions when people change teams or responsibilities.
Operational clarity is a security control. Good onboarding reduces ad hoc workarounds. The process guidance in Developer Onboarding Checklist for Engineering Teams and Engineering Productivity Tools Comparison: Code Review, Collaboration, and Workflow Automation supports this side of pipeline maturity.
What to double-check
Even mature teams benefit from a short pre-release review. These are the questions worth asking before you trust a pipeline change.
- Did workflow permissions expand quietly? Small changes to token scopes, runner groups, or deploy identities often introduce more risk than obvious code changes.
- Can untrusted code reach trusted secrets? Fork-based builds, plugin execution, and dynamic scripts are common blind spots.
- Are policy failures actionable? If all findings are high volume and low context, developers will learn to ignore them.
- Is the production artifact the one that was tested? Rebuilds at release time weaken provenance.
- Can responders reconstruct the release? If you cannot trace an artifact to a commit, approval, and deploy event, auditability is incomplete.
- Do exceptions expire? Temporary bypasses often become permanent unless they are tracked and reviewed.
- Does the emergency path have stronger controls than normal paths? Break-glass access should be narrow, logged, and reviewed after use.
A useful habit is to review one completed production deployment end to end each quarter. Follow the trail from pull request to artifact to deployment event to monitoring signal. That exercise often reveals missing logs, overbroad access, or undocumented manual steps.
Common mistakes
The most common CI CD security checklist failures are not usually caused by a missing enterprise feature. They come from design shortcuts that seem harmless at the time.
- Using one shared deploy token everywhere. This simplifies setup but makes blast radius hard to contain.
- Treating scanner installation as a finished program. Tools without triage rules, owners, and review cycles add noise, not control.
- Allowing mutable shared runners with weak isolation. Convenience can create cross-project exposure.
- Keeping secrets in repository variables forever. Long-lived credentials often survive far beyond their original need.
- Ignoring pipeline definition changes in code review. Workflow files deserve the same scrutiny as application logic.
- Rebuilding for each environment. This breaks confidence in what was actually tested.
- Adding manual approvals without clear ownership. Ambiguous gates create delays while still failing to improve accountability.
- Separating security from developer workflow. If findings live only in a distant dashboard, remediation slows down.
The corrective pattern is usually the same: reduce ambiguity, narrow permissions, improve traceability, and make secure behavior the default path developers encounter every day.
When to revisit
This checklist is most useful when treated as a living review document. Revisit it whenever the underlying inputs change.
Review before seasonal planning cycles so security controls are included in roadmap work instead of added after incidents or audits. Revisit it when workflows or tools change, especially in these situations:
- You migrate from Jenkins to GitHub Actions or GitLab CI.
- You introduce GitOps, new runners, or self-hosted build infrastructure.
- You change secret storage, cloud identity models, or production approval flows.
- You adopt new package registries, base images, or third-party pipeline actions.
- You expand into Kubernetes, multi-cloud, or new regulated environments.
- You experience a credential leak, dependency incident, or unauthorized deployment attempt.
For a practical review cycle, assign an owner and run this five-step process:
- Map the pipeline: source, runners, identities, scans, artifacts, environments, approvals, and telemetry.
- Score current controls: note what is implemented, partial, missing, or undocumented.
- Fix the highest-risk gaps first: start with secrets, permissions, artifact provenance, and deploy controls.
- Turn repeatable controls into templates: secure defaults scale better than one-off exceptions.
- Set a review date: tie it to quarterly engineering planning, major tool migration, or post-incident follow-up.
If you want this checklist to stick, do not frame it as a special security exercise. Fold it into repository templates, platform standards, onboarding, and release review. That is how DevSecOps best practices become normal engineering practice rather than a separate compliance ritual.