What is CI/CD runtime security?

CI/CD runtime security watches what the jobs in a build pipeline actually execute while they run (the processes they start, the connections they open, the domains they look up) and flags a job that behaves like an attack. It closes the gap that scanners leave open: a lockfile, an SBOM or a .gitlab-ci.yml says what a pipeline declares, not what its jobs do. In short, it is behaviour-based runtime detection: a job is judged by what it does, not by whether its packages appear on a list of known-bad names or CVEs.

The term is written several ways (CI/CD runtime security, CICD runtime security, CI-CD pipeline runtime protection); they mean the same thing.

Why do CI/CD pipelines need runtime security?

A CI runner holds registry credentials, cloud roles and signing keys, often more privilege than the production workloads it builds. And it runs code from many sources on every job: your repository, shared templates, container images and every dependency the build installs.

Most pipeline security looks at that code before it runs. Supply-chain attacks are built to pass those checks: the malicious part only appears when the job executes.

What does CI/CD runtime security catch that scanners miss?

  • Malicious install scripts. A new package version looks clean and carries a postinstall script that downloads a payload and pipes it into a shell, inside the job that holds your credentials.
  • Stolen job tokens and variables. A merge request prints the environment into a request to an unknown host. There is no dependency to scan; the only signal is what the job runs.
  • Poisoned includes and templates. One extra line in a shared template runs an unreviewed step in every project that includes it.
  • Re-pointed images. A tag your jobs pull now points to an image with an extra binary. The pipeline definition has not changed.
  • Cache and artifact poisoning. A privileged job restores and executes a file that a low-privilege job wrote.
  • Dependency confusion. A public package with an internal name gets installed instead of the internal one, and its code runs in the build.

Each of these is described as an attack story on CI/CD runtime security for GitLab.

How is it different from dependency scanning, SBOMs and secret scanning?

Looks atAnswers
Dependency scanning (SCA)Declared packages and known CVEs"Is a known-vulnerable version listed?"
SBOMThe inventory of what was built"What is in this artifact?"
Secret scanningCode and logs"Was a secret committed or printed?"
CI/CD runtime securityWhat each job executes"Did this job do something it should not?"

They complement each other. A malicious package version usually has no CVE when it is published, so scanning cannot flag it yet; its behaviour at install time is visible from the first run.

How is it different from runtime security for production containers?

Production runtime tools watch long-lived services whose normal behaviour is stable. CI jobs are the opposite: short-lived, many per day, each running different code. A useful CI/CD runtime tool therefore attributes every event to a job, and rolls results up to the pipeline and the runner that executed it, so an analyst knows which build and which runner to look at.

What should a CI/CD runtime security tool provide?

  • A result per job, tied to the pipeline and the runner.
  • No pipeline changes: no edits to every .gitlab-ci.yml, nothing added to build images.
  • Findings in your SIEM in a documented, standard format (for example OCSF).
  • A clear data story: where build activity is processed and stored. For regulated teams, a self-hosted option that keeps it in your network.
  • Support for your runner setup (Kubernetes executor, Docker, shell, VM).

Which tools exist?

On GitHub Actions, StepSecurity Harden-Runner is the most established option: it builds a network baseline per workflow and can block outbound calls, as a SaaS. It has started supporting self-hosted GitLab runners in an initial release. See Protet or StepSecurity for GitLab?

Protet is behaviour-based runtime detection designed for GitLab first: a sensor next to self-managed GitLab runners on the Kubernetes executor records each command a job starts, with its arguments, connections and DNS lookups, and sends one OCSF Detection Finding per job to your SIEM, benign jobs included. It runs in your cluster and is built to run air-gapped. See how it works.

FAQ

Does CI/CD runtime security slow down builds or need pipeline changes?
With a node-level sensor, nothing changes in your pipeline definitions or images. The sensor runs beside the jobs, not inside them.

Does build data leave our network?
That depends on the tool. Protet self-hosted processes everything in your cluster; findings go where you configure delivery. See self-hosted.

Does it make us DORA, NIS2 or FINMA compliant?
No tool does that on its own. CI/CD runtime security supplies evidence for controls on build integrity and supply-chain risk; the mapping is on the compliance pages. Not a certification and not legal advice.

Where can I see real malicious packages caught this way?
Protet Intel publishes the npm packages Protet confirmed as malicious, with free feeds.

Last updated: 2 December 2026