Security Glossary

Definition

Continuous Integration / Continuous Deployment Security

What is CI/CD Security?

CI/CD security means protecting the pipeline itself and the code it ships: securing build credentials and dependencies, pinning what the pipeline trusts, and testing each change before it reaches production rather than months later.

The practice of integrating automated security testing and policy enforcement directly into software build and deployment pipelines. Security gates within CI/CD pipelines can block deployments that introduce new vulnerabilities, enforce dependency hygiene, and verify infrastructure-as-code configurations. This approach ensures security is validated continuously rather than as a periodic manual audit, enabling teams to ship fast without sacrificing security posture.

Two Problems Wearing One Name

CI/CD security covers two distinct jobs that get conflated. The first is securing the pipeline as infrastructure: it holds production credentials, it pulls third-party code, and it can deploy. That makes it one of the highest-value targets you own, and compromising it is more efficient for an attacker than compromising your application.

The second is using the pipeline to secure what you ship: running tests on every change so a security regression is caught at the merge rather than at the annual assessment. Both matter, and a team that has automated the second while leaving the first unpinned has secured the cargo and left the truck unlocked.

Securing the Pipeline Itself

Pin what you trust. Third-party actions, base images and build tools referenced by a mutable tag mean your build runs whatever that tag points at today. Pin to an immutable digest — the 2025 compromise of a widely used GitHub Action reached tens of thousands of repositories precisely through a mutable reference.

Then scope the secrets. A pipeline needs the minimum credential for the job in front of it, ideally short-lived and issued per run through an identity federation rather than a long-lived key sitting in a variable. Audit what build logs print: secrets leak into logs far more often than they leak from storage.

Finally, protect the path to production: required reviews on the branch that deploys, approvals on the deployment step, and logging you cannot edit from inside the pipeline. If a pipeline configuration change can bypass a control, that control is advisory.

Testing in the Pipeline Without Being Ignored

The failure mode is not too little testing, it is a gate nobody respects. Start by blocking on criticals only, on a fast test that finishes in minutes, and expand once the team trusts the signal. A gate that fires on informational findings teaches everyone to use the override, and after that the gate is theatre.

Layer by cost. Static analysis and dependency checks on every commit because they are seconds. Dynamic testing against a deployed preview on merge, because it needs something running. Deeper, slower testing — authenticated multi-role, business logic, attack chains — on a schedule or on release branches. What you must not do is run the slow layer on every push and then disable it when someone complains.

And route findings where the work happens: a comment on the pull request that made the change, with the request that proves the issue. A finding delivered to a dashboard six days later is a finding nobody fixes.

What the Pipeline Cannot Tell You

Automated pipeline checks cover regression well and novelty badly. They confirm that the classes you have taught them about are absent from this change; they do not reason about the new feature's intent, and they cannot decide whether an authorisation model makes sense for your business.

They also see only what runs in the pipeline. Infrastructure changed by hand, a service someone deployed outside the process, a third-party integration configured in a console — none of it passes through your gates. Continuous testing of the running system is what closes that, which is a different control from testing the build.

Questions

What should a CI/CD security pipeline actually run?

Layer by cost: dependency and secret scanning on every commit, static analysis on changed code, dynamic testing against a deployed preview on merge, and deeper authenticated testing on release branches or a schedule. Gate on criticals first and widen only once the team trusts the signal.

How do we stop a pipeline supply-chain attack?

Pin every third-party action, image and tool to an immutable digest rather than a tag; issue short-lived credentials per run instead of storing long-lived keys; and audit what your build logs print. The large 2025 GitHub Action compromise spread through mutable tag references.

Will security testing slow our pipeline down?

Only if you put the slow layer in the wrong place. Fast checks belong on every push and finish in minutes; anything that needs a running application belongs on merge; deep testing belongs on a schedule. Teams that block every push on a 40-minute scan end up disabling it, which is worse than not having it.

Does pipeline testing replace penetration testing?

No. It is excellent at regression — the classes you have already taught it — and blind to novelty, intent and anything deployed outside the pipeline. Continuous testing of the running system and periodic human depth cover what the build cannot.

Related terms

DevSecOps
A cultural and technical philosophy that integrates security practices throughout every phase of the software development lifecycle, rather than treating security as a separate, end-stage review.
Static Application Security Testing (SAST)
A white-box security testing approach that analyzes application source code, bytecode, or compiled binaries for vulnerability patterns without executing the program.
Dynamic Application Security Testing (DAST)
A black-box security testing technique that analyzes a running application from the outside by sending malicious inputs and observing its responses, without access to source code.
Penetration Testing
A structured, authorized simulation of a real-world cyberattack against a system, network, or application with the goal of identifying exploitable vulnerabilities before malicious actors do.