Updated 19 October 2026. This guide was first published in June 2023. It has been rewritten for GitLab 19.5, the current release at the time of writing, and for the CI/CD security problems teams are working through now.
When your team runs GitLab CI/CD today, the pipeline does a lot more than build and test code. It holds credentials that reach production, it pulls templates, images, and packages written by people outside your organization, and in DORA’s 2025 survey, 90% of respondents reported using AI at work (Harvey and DeBellis, 2025). That puts the pipeline among the most valuable systems you operate, and recent supply chain incidents have gone after it directly.
Most of the advice from the first version of this guide still holds. Short-lived branches, code review, automated tests, and pipeline as code are as useful as they were. What has changed is the threat model and GitLab itself. Several features the old list relied on have been deprecated or removed, and GitLab has shipped much better tools for identity, secrets, and reuse.
The incidents since 2025 show where the pressure is. In March 2025, attackers rewrote version tags on the tj-actions/changed-files GitHub Action so they pointed at a malicious commit that printed CI/CD secrets into build logs (Sharma, 2025), and CISA warned that the compromise exposed secrets including valid access keys (CISA, 2025a). In September 2025, the self-replicating “Shai-Hulud” worm compromised hundreds of npm packages and targeted developer and cloud credentials (CISA, 2025b), and in November 2025 GitLab’s own security research team reported what appears to be an evolved version of the malware in an active campaign (Abeles and Henriksen, 2025). In March 2026, 76 of 77 version tags in aquasecurity/trivy-action were force-pushed to credential-stealing code (Aqua Security, 2026). These incidents hit GitHub Actions and npm, but the same mechanics apply to GitLab: mutable references to third-party code, and long-lived tokens sitting in CI jobs.
This guide follows the path a change takes, from branch to production. Figure 1 shows that path as a sequence of hand-offs, with the controls in place.

What changed since 2023
If you have a pipeline built from the 2023 version of this guide, these are the changes most likely to affect it:
onlyandexceptare deprecated in favor ofrules(GitLab, n.d.a).- CI/CD components and the CI/CD Catalog became generally available in GitLab 17.0 (GitLab, n.d.b), and pipelines themselves can now take typed inputs, introduced in 17.11 (GitLab, n.d.c).
CI_JOB_JWTandCI_JOB_JWT_V2were removed in GitLab 17.0; jobs request OIDC tokens with theid_tokenskeyword instead (GitLab, n.d.d). From 18.7, the token’ssubclaim can include fields such asref_protected, configured per project through the projects API (GitLab, n.d.e), which helps where a cloud provider only checkssub.- GitLab Secrets Manager, built on OpenBao, became generally available in GitLab 19.5 for Premium and Ultimate (GitLab, n.d.f).
- Fine-grained permissions for CI/CD job tokens became generally available in 18.3 (GitLab, 2025a), and job tokens use the JWT standard by default from 19.0 (GitLab, n.d.g).
- The Docker Machine executor is deprecated and scheduled for removal in GitLab 20.0, with the GitLab Runner Autoscaler as the replacement (GitLab, n.d.h).
- The CodeClimate-based Code Quality scanning was deprecated in 17.3; check the Code Quality page for its current status (GitLab, n.d.i). The Prometheus metrics dashboards the 2023 list pointed to were removed in GitLab 16.0 (GitLab, 2023).
- GitLab’s AI features now run inside pipelines: the Fix CI/CD Pipeline Flow is generally available (GitLab, n.d.j), and agent flows execute on your runners (GitLab, n.d.k).
On the regulatory side, the EU Cyber Resilience Act’s reporting obligations now apply, and in the US the federal secure software attestation requirement has been relaxed. Both are covered near the end.
Where to start
Twenty-four practices is a lot to take on at once. If you are updating an existing GitLab setup, Table 1 is an order that tends to give the most protection for the least disruption. Take a baseline first (median pipeline duration, time from merge request to merge, and change failure rate from your incident log), so you can show whether each step slowed the team down.
| Step | What to do | Practices | Tier | Who notices |
|---|---|---|---|---|
| 0 | On self-managed, get onto a patched release | 20 | All | Platform owners |
| 1 | Tighten settings: protected branch and tag rules, token expiry, who can set pipeline variables, and the job token allowlist. Each can break an existing workflow, so list what depends on them first | 3, 16, 17, 18 | All | Anyone who runs pipelines with variables or calls other projects |
| 2 | Split runners into untrusted, deploy, and agent flow pools, and move cloud deployments to id_tokens | 14, 19, 23 | All; binding to a protected environment needs Premium or Ultimate | Owners of deploy scripts |
| 3 | Turn on an update bot, then pin references and add the pin audit, warning only at first | 11 | All | Every developer, through update merge requests |
| 4 | Add workflow:rules, needs, and test reports, replace only/except, and move copied YAML into components as you touch each file | 6, 7, 8, 9, 10 | All | Pipeline authors |
| 5 | Move secrets out of CI/CD variables | 15 | Premium, Ultimate for the secrets keyword | Owners of deploy scripts |
| 6 | Add approval rules, deployment approvals, and merge trains | 4, 5, 21 | Premium, Ultimate | Reviewers and approvers |
| 7 | Add provenance, scanning, and shared policies | 12, 13, 22 | Mixed; dependency scanning, secret push protection, and pipeline execution policies need Ultimate | Platform and security teams |
Table 1. A suggested rollout order, with the GitLab tier each step needs.
Workflow: small changes and short-lived branches
1. Keep branches short-lived
The 2023 guide suggested GitFlow. For most teams shipping a service, it is no longer the right starting point. GitLab’s own branching guidance now says to “avoid creating long-lived branches, unless you have contractual obligations to use them” (GitLab, n.d.l), and research from DORA (DevOps Research and Assessment) describes the trunk-based pattern as each developer merging into trunk at least once a day (DORA, n.d.). Merging that often usually means shipping unfinished work behind feature flags. Long-lived develop and release branches still make sense when you support several released versions of a product at once. For a service with one production version, they mostly add merge work.
2. Keep commits and merge requests small, including AI-assisted ones
Atomic commits, each with one purpose, make review and rollback easier. This matters more now that assistants can produce a lot of code quickly. DORA’s 2024 report found that as AI adoption increased, it was “accompanied by … an estimated reduction in delivery stability by 7.2%” (Harvey and DeBellis, 2024), and the 2025 report found AI adoption still has a negative relationship with stability, even as it now shows a positive relationship with throughput (Harvey and DeBellis, 2025). A short team agreement helps: the person who opens a merge request owns every line in it however it was produced, merge requests above an agreed size get split, and assistant-proposed changes to pipeline files go through the same review as any other change. DORA’s 2025 report puts it as AI amplifying what a team already has (Harvey and DeBellis, 2025), which makes these habits worth settling before AI use grows.
3. Protect the default branch and release tags
Several controls later in this guide depend on who can push to protected branches and tags: protected variables, protected runners, and the ref_protected claim in ID tokens all trust that boundary. Protect the default branch and your release tags, turn off force-push, and keep the list of people allowed to push and merge short. When several protection rules match a branch, the most permissive one applies (GitLab, n.d.m), so check wildcard rules too. GitLab recommends configuring default branch protection at the group level so new projects start protected (GitLab, n.d.n).
4. Review with CODEOWNERS and approval rules
Merge request review is still the main quality gate. On Premium and Ultimate, a CODEOWNERS file routes changes to the people responsible for each path, and Code Owner approval can be required on protected branches (GitLab, n.d.o). Approval rules exclude merge request authors from approving their own changes by default, but people who add commits can approve unless you turn on “Prevent approvals by users who add commits” (GitLab, n.d.p; n.d.q). For GitLab Duo flows, commits come from a service account but the merge request is attributed to the person who triggered the flow (GitLab, n.d.r), so the author rule already excludes them. Agents that push under a developer’s own account or a separate bot account are not covered by that, so for merge requests with agent or bot commits, turn on the committer setting and require a Code Owner who took no part in the change. Teams that pair or push fix-ups to each other’s branches may find the committer setting leaves too few eligible approvers, so test it before enforcing it.
Put .gitlab-ci.yml and your CI component projects under Code Owners too, since a change to the pipeline is a change to what runs with your credentials. On a team without a platform group, name at least two Code Owners for pipeline files and agree a review turnaround, or one person becomes the bottleneck for every change.
5. Test the merged result before it lands
Merged results pipelines test the source and target branches combined (GitLab, n.d.s), and merge trains queue merge requests so each one is tested against the changes ahead of it (GitLab, n.d.t). Both are Premium and Ultimate features. On a busy default branch they cut down the “green on my branch, red on main” cycle. They have a cost: when a merge request fails on the train, the ones queued behind it rerun their pipelines. Merge trains pay off once the merge request pipeline is reasonably quick and flaky tests are under control, so work on practices 6 to 9 first.
Pipeline configuration that stays fast
6. Use rules and workflow:rules, and avoid duplicate pipelines
rules replaces only and except, which GitLab keeps for backward compatibility but now marks as deprecated (GitLab, n.d.a). A common problem in older configurations is duplicate pipelines: a push to a branch with an open merge request starts both a branch pipeline and a merge request pipeline. GitLab documents a three-rule workflow block that prevents this (GitLab, n.d.u), shown at the top of Listing 1 with a fourth rule added so tag pipelines still run.
YAML
workflow:
rules:
- if: $CI_PIPELINE_SOURCE == "merge_request_event"
- if: $CI_COMMIT_BRANCH && $CI_OPEN_MERGE_REQUESTS
when: never
- if: $CI_COMMIT_BRANCH
- if: $CI_COMMIT_TAG
auto_cancel:
on_new_commit: interruptible
variables:
PIP_CACHE_DIR: $CI_PROJECT_DIR/.cache/pip
default:
image: python:3.13-slim@sha256:<digest>
interruptible: true # deploy jobs set interruptible: false
cache:
key:
files: [requirements.lock]
paths: [.cache/pip]
stages: [build, test, deploy]
build:
stage: build
script:
- pip install --require-hashes -r requirements.lock
- pip wheel --no-deps --no-build-isolation --wheel-dir dist .
artifacts:
paths: [dist/]
expire_in: 1 week
lint:
stage: test
needs: []
script:
- pip install --require-hashes -r requirements.lock
- ruff check .
unit-tests:
stage: test
needs: [build]
script:
- pip install --require-hashes -r requirements.lock
- pip install --no-deps dist/*.whl
- pytest --junitxml=report.xml
artifacts:
when: always
reports:
junit: report.xmlListing 1. One pipeline per change, interruptible jobs, needs (lint starts at once with needs: []), and separate cache and artifacts. Image digests are placeholders, and requirements.lock is a hash-pinned lock file that includes ruff, pytest, and the build backend.
Setting jobs as interruptible with auto_cancel: on_new_commit: interruptible lets GitLab cancel work that a newer commit has made redundant (GitLab, n.d.v). Deploy jobs should stay non-interruptible, as in Listing 4. artifacts: when: always keeps the test report when tests fail, which is when you need it; the default uploads artifacts only when the job succeeds (GitLab, n.d.v).
7. Model dependencies with needs, and skip work that does not apply
Stage ordering is the simplest pipeline layout, and GitLab’s pipeline efficiency guidance notes it is also the slowest in most cases (GitLab, n.d.w). needs lets a job start as soon as the jobs it depends on finish. Use parallel to split a long test job into smaller jobs that run at the same time (GitLab, n.d.x), order jobs so errors surface early (GitLab, n.d.w), and use rules:changes so jobs run only when the files they depend on have changed (GitLab, n.d.y), for example skipping backend tests when only frontend code changed (GitLab, n.d.w).
8. Use cache for dependencies and artifacts for results
These two are often mixed up. GitLab’s guidance is to use cache for dependencies downloaded from the internet and artifacts to pass build results between stages, and it warns that caching “isn’t guaranteed to always work” (GitLab, n.d.z). Key caches on lock files, as in Listing 1, and set expire_in on artifacts so storage does not grow without limit. If expire_in is not set, the instance default applies, and artifacts from the most recent successful pipeline on each ref are kept by default (GitLab, n.d.aa).
9. Keep tests and quality checks in the pipeline
Unit tests, test reports, and linting still belong in every merge request pipeline. If a test is flaky, fix or quarantine it; automatic retries are best kept for infrastructure failures, because retrying test failures hides the flakiness the team needs to see. With Code Quality scanning deprecated, GitLab recommends integrating results from a supported tool directly (GitLab, n.d.i), so run your linter of choice and publish its report. Accessibility testing with Pa11y is still documented as a CI/CD template (GitLab, n.d.ab).
10. Reuse pipeline code through components and inputs
Copy-pasted YAML and loosely versioned include: templates were the norm in 2023. CI/CD components are versioned, reusable units that you can publish to the CI/CD Catalog, and spec:inputs gives them typed parameters with defaults, options, and regex validation (GitLab, n.d.b; n.d.c). GitLab now recommends inputs over pipeline variables for values set when a pipeline runs (GitLab, n.d.c). A small set of shared build, scan, and deploy components gives projects a common set of controls, and a fix reaches each project when its pin is bumped, which an update bot can raise as a merge request (practice 11). If you have no platform team, a product team can own the components, but it needs a named maintainer, semantic version tags with release notes, and Code Owners on the component project.
Supply chain: pin what you pull
11. Pin components, includes, and images to immutable references
Most of the incidents in the introduction depended on a reference that could be moved, or on a version range that accepted whatever was published next. GitLab’s documentation is direct about it: “Pin CI/CD components to a specific commit SHA (preferred) or release version tag”, “Only use release tags if you trust the component maintainer”, and “Avoid using latest” (GitLab, n.d.b). The pipeline security page adds “Always use SHA digests for Docker images” and “Avoid versionless includes” (GitLab, n.d.ac). For include:remote, GitLab 17.9 added an integrity keyword that checks a SHA256 hash of the included file (GitLab, n.d.v).
A tiered policy keeps this practical. Pin third-party components, remote includes, and anything in a deploy or release path to a commit SHA or image digest. For components your own platform team publishes from protected tags, an exact release version is a reasonable trade-off. Write images as tag plus digest (python:3.13-slim@sha256:...) so people can still read which version they are on, and keep the version in a trailing comment next to a component SHA.
Pinning is easier to sustain when updating the pins is cheap. Renovate’s GitLab CI manager can update image references and CI/CD component references in .gitlab-ci.yml (Renovate, n.d.a), and its minimum release age setting makes it wait before proposing a new version, which gives the community time to spot a malicious release (Renovate, n.d.b). With SHA-pinned references, a moved tag shows up as a digest update in the bot’s merge request instead of reaching your pipeline directly. The release-age wait, and a reviewer who asks why a digest changed without a version change, give you a chance to catch it there. Check how your bot applies the wait to digest updates, since a re-pointed tag may not carry a new release timestamp. Grouping updates into a weekly batch keeps them from crowding out feature review.
Then check the pins in the pipeline. Listing 2 is a small audit that flags components and project includes not pinned to a commit SHA (with an allowlist for your own components on exact versions), remote includes without an integrity hash, images and services not pinned by digest, and leftover only/except. Listing 3 runs it as an early job that warns on merge requests while you migrate and blocks on the default branch.
Python
import re
import sys
import yaml
SHA = re.compile(r"^[0-9a-f]{40}$")
DIGEST = re.compile(r"@sha256:[0-9a-f]{64}$")
EXACT = re.compile(r"^\d+\.\d+\.\d+$")
# Components your own platform team publishes from protected tags can use an
# exact release version; everything else is pinned to a commit SHA.
TRUSTED = ("$CI_SERVER_FQDN/platform/",)
KEYWORDS = {"default", "include", "stages", "variables", "workflow", "spec", "image", "services"}
# !reference [job, key] reuses another job's value; this check skips it.
REFERENCE = re.compile(r"!reference\s*\[[^\]]*\]")
def image_name(value):
if isinstance(value, dict):
value = value.get("name")
return value if isinstance(value, str) else None
def audit_include(inc):
if isinstance(inc, str): # a string include is local unless it is a URL
inc = {"remote": inc} if inc.startswith(("http://", "https://")) else {"local": inc}
if not isinstance(inc, dict):
return []
comp = inc.get("component")
if isinstance(comp, str):
ref = comp.rsplit("@", 1)[-1] if "@" in comp else ""
if not (SHA.match(ref) or (comp.startswith(TRUSTED) and EXACT.match(ref))):
return [f"component '{comp}': pin to a commit SHA"]
elif "project" in inc and not SHA.match(str(inc.get("ref", ""))):
return [f"project include '{inc['project']}': pin ref to a commit SHA"]
elif "remote" in inc and "integrity" not in inc:
return [f"remote include '{inc['remote']}': add an integrity hash"]
return [] # local: and template: includes come from your repo or GitLab
def audit(text):
findings = []
# Component and pipeline files can start with a spec: header document.
for doc in yaml.safe_load_all(REFERENCE.sub("null", text)):
if not isinstance(doc, dict):
continue
includes = doc.get("include", [])
for inc in includes if isinstance(includes, list) else [includes]:
findings += audit_include(inc)
jobs = {"(top level)": {k: doc[k] for k in ("image", "services") if k in doc}}
jobs["default"] = doc.get("default", {})
jobs.update({k: v for k, v in doc.items() if k not in KEYWORDS})
for name, job in jobs.items():
if not isinstance(job, dict):
continue
images = [job.get("image")] + list(job.get("services") or [])
for img in filter(None, map(image_name, images)):
if not DIGEST.search(img):
findings.append(f"{name}: image '{img}' is not pinned by digest")
if "only" in job or "except" in job:
findings.append(f"{name}: replace only/except with rules")
return findings
if __name__ == "__main__":
with open(sys.argv[1], encoding="utf-8") as f:
problems = audit(f.read())
print("\n".join(problems) or "no findings")
sys.exit(1 if problems else 0)Rust
// Cargo.toml: regex = "1", yaml-rust2 = "0.13"
use regex::Regex;
use std::{env, fs, process};
use yaml_rust2::{Yaml, YamlLoader};
const KEYWORDS: [&str; 8] =
["default", "include", "stages", "variables", "workflow", "spec", "image", "services"];
// Components your own platform team publishes from protected tags can use an
// exact release version; everything else is pinned to a commit SHA.
const TRUSTED: [&str; 1] = ["$CI_SERVER_FQDN/platform/"];
// !reference [job, key] reuses another job's value; this check skips it.
const REFERENCE: &str = r"!reference\s*\[[^\]]*\]";
struct Rules {
sha: Regex,
digest: Regex,
exact: Regex,
}
fn image_name(v: &Yaml) -> Option<&str> {
match v {
Yaml::String(s) => Some(s),
Yaml::Hash(_) => v["name"].as_str(),
_ => None,
}
}
fn audit_include(inc: &Yaml, r: &Rules) -> Option<String> {
if let Some(s) = inc.as_str() {
// A string include is local unless it is a URL.
let remote = s.starts_with("http://") || s.starts_with("https://");
return remote.then(|| format!("remote include '{s}': add an integrity hash"));
}
if let Some(c) = inc["component"].as_str() {
let rf = c.rsplit_once('@').map(|(_, v)| v).unwrap_or("");
let trusted = TRUSTED.iter().any(|p| c.starts_with(p)) && r.exact.is_match(rf);
if !(r.sha.is_match(rf) || trusted) {
return Some(format!("component '{c}': pin to a commit SHA"));
}
} else if let Some(p) = inc["project"].as_str() {
// An unquoted all-digit SHA parses as a number, so compare its text.
let rf = match &inc["ref"] {
Yaml::String(v) | Yaml::Real(v) => v.clone(),
Yaml::Integer(i) => i.to_string(),
_ => String::new(),
};
if !r.sha.is_match(&rf) {
return Some(format!("project include '{p}': pin ref to a commit SHA"));
}
} else if let Some(u) = inc["remote"].as_str().filter(|_| inc["integrity"].is_badvalue()) {
return Some(format!("remote include '{u}': add an integrity hash"));
}
None // local: and template: includes come from your repo or GitLab
}
// yaml-rust2 does not apply YAML merge keys (<<: *anchor), so merge them here,
// including anchors that merge other anchors.
fn merged(job: &Yaml) -> Yaml {
let Yaml::Hash(h) = job else { return job.clone() };
let mut out = h.clone();
let bases = match h.get(&Yaml::String("<<".into())) {
Some(Yaml::Array(a)) => a.clone(),
Some(b) => vec![b.clone()],
None => vec![],
};
for base in bases {
if let Yaml::Hash(bh) = merged(&base) {
for (k, v) in bh {
if !out.contains_key(&k) {
out.insert(k, v);
}
}
}
}
Yaml::Hash(out)
}
fn audit_job(name: &str, image: &Yaml, services: &Yaml, job: &Yaml, r: &Rules) -> Vec<String> {
let mut findings = Vec::new();
let mut images = vec![image];
if let Some(svcs) = services.as_vec() {
images.extend(svcs.iter());
}
for img in images.into_iter().filter_map(image_name) {
if !r.digest.is_match(img) {
findings.push(format!("{name}: image '{img}' is not pinned by digest"));
}
}
if !job["only"].is_badvalue() || !job["except"].is_badvalue() {
findings.push(format!("{name}: replace only/except with rules"));
}
findings
}
fn audit(text: &str) -> Vec<String> {
let r = Rules {
sha: Regex::new(r"^[0-9a-f]{40}$").unwrap(),
digest: Regex::new(r"@sha256:[0-9a-f]{64}$").unwrap(),
exact: Regex::new(r"^\d+\.\d+\.\d+$").unwrap(),
};
let text = Regex::new(REFERENCE).unwrap().replace_all(text, "null");
let mut findings = Vec::new();
// Component and pipeline files can start with a spec: header document.
for doc in YamlLoader::load_from_str(&text).expect("valid YAML") {
let Some(map) = doc.as_hash() else { continue };
match &doc["include"] {
Yaml::Array(items) => findings.extend(items.iter().filter_map(|i| audit_include(i, &r))),
Yaml::BadValue => {}
single => findings.extend(audit_include(single, &r)),
}
findings.extend(audit_job("(top level)", &doc["image"], &doc["services"], &Yaml::Null, &r));
let d = merged(&doc["default"]);
findings.extend(audit_job("default", &d["image"], &d["services"], &d, &r));
for (k, job) in map {
let name = k.as_str().unwrap_or("");
if KEYWORDS.contains(&name) || job.as_hash().is_none() {
continue;
}
let job = merged(job);
findings.extend(audit_job(name, &job["image"], &job["services"], &job, &r));
}
}
findings
}
fn main() {
let path = env::args().nth(1).expect("usage: ci_pin_audit <.gitlab-ci.yml>");
let findings = audit(&fs::read_to_string(path).expect("readable file"));
if findings.is_empty() {
println!("no findings");
} else {
println!("{}", findings.join("\n"));
process::exit(1);
}
}Listing 2. An audit for unpinned references in .gitlab-ci.yml. It exits non-zero when it finds something. It checks one file, skips !reference values, local: and template: includes, and does not resolve nested includes, extends, or child pipelines; images set through variables are reported for review.
YAML
pin-audit:
stage: .pre
image: python:3.13-slim@sha256:<digest>
script:
- pip install --require-hashes -r ci/audit-requirements.txt
- python ci/ci_pin_audit.py .gitlab-ci.yml
rules:
- if: $CI_PIPELINE_SOURCE == "merge_request_event"
allow_failure: true
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCHListing 3. Running the audit as an early job. ci/audit-requirements.txt pins PyYAML with a hash.
Because the job lives in the file it audits, a merge request can delete it, so Code Owners on .gitlab-ci.yml and ci/ (practice 4) or a pipeline execution policy (practice 22) is what makes the audit stick. Once existing findings are cleared, remove allow_failure: true so merge request pipelines block before merge. Agree an exception route first, such as a time-boxed allowlist entry with an owner, so a blocked release has a way forward.
12. Scan for secrets, code issues, and vulnerable dependencies
SAST and pipeline secret detection run in every GitLab tier, though their merge request reports and vulnerability management need Ultimate (GitLab, n.d.ad; n.d.ae). Secret push protection, which blocks pushes containing secrets such as keys and API tokens, is an Ultimate feature (GitLab, n.d.af). Push protection addresses a different leak from the incidents above, credentials committed to the repository, a separate and frequently reported way keys leak.
Dependency scanning is Ultimate. Its newer analyzer, which works from an SBOM, became generally available in GitLab 19.0 (GitLab, n.d.ag), and the older Gemnasium-based analyzer is deprecated (GitLab, n.d.ah). If your pipelines still use the Gemnasium template, plan the move to Dependency-Scanning.v2.gitlab-ci.yml. GitLab’s own advice after the November 2025 npm campaign was to run dependency scanning in pipelines (Abeles and Henriksen, 2025). Scanning finds versions already known to be vulnerable or malicious; for versions nobody has flagged yet, pinning, lock files, and a minimum release age help limit exposure.
13. Record build provenance
SLSA describes provenance as verifiable information about how, when, and where software artifacts were produced (SLSA, n.d.). GitLab Runner can generate provenance metadata in the SLSA 1.0 provenance format when you set RUNNER_GENERATE_ARTIFACTS_METADATA to true (GitLab, n.d.ai). On GitLab.com, Cosign can use GitLab ID tokens for keyless signing with Sigstore; self-managed instances need their own Sigstore setup (GitLab, n.d.aj). Build release artifacts from the merged commit on the default branch, as Figure 1 shows, so the provenance describes what you deploy. Keep an SBOM with each release artifact as well; GitLab’s newer dependency scanning analyzer works from one (practice 12), and open-source tools such as Syft can generate one on any tier. The postmortem from the August 2025 Nx package compromise shows the limit: the malicious packages lacked provenance, but that did not stop them being installed (Strumpflohner, 2025). If something downstream is going to rely on provenance, sign it, for example with Cosign, and check it at deploy or install time.
Identity and secrets
14. Replace stored cloud keys with OIDC
This is the change with the largest payoff for most teams. With the id_tokens keyword, a job requests an OIDC token, and AWS, Azure, Google Cloud, or HashiCorp Vault exchanges it for temporary credentials (GitLab, n.d.d). The cloud keys no longer sit in a CI/CD variable waiting to be printed to a log. Anything the job fetches with the resulting credentials can still leak from the job, so prefer short-lived or dynamic credentials on the target side where you can.
The value depends on how tightly the cloud side trusts the token. The rules, environment, and runner tags in .gitlab-ci.yml can be edited on any branch, so the controls that matter are the ones a branch cannot change: protected branches and runners, protected environments, and the trust condition on the cloud or Vault side. Protected environments limit who can deploy, not from which ref (GitLab, n.d.ak), so the trust condition is where the ref and environment get checked together. Bind that condition to stable identifiers rather than paths, which change on rename: project_id stays the same for the project’s lifetime, and namespace_id stays the same while the project remains in its namespace (GitLab, n.d.e). For production roles, match the exact ref and ref_type, plus ref_protected, and require the environment claims your provider can see: environment and environment_protected on Vault and Google Cloud, or environment_protected and deployment_tier through sub on AWS and Azure (GitLab, n.d.e; n.d.d). Without the environment claims, any job on the default branch that asks for the right audience can use the role, including agent flows (practice 23). For a fork merge request run in the parent project, the token’s project_id is the source project’s (GitLab, n.d.e), so a binding on your own project_id should reject it.
Which claims you can match depends on the provider. On AWS, only the GitLab.com identity provider exposes extra condition keys such as project_id, namespace_id, and ref_protected, none of which covers the environment, and GitLab Self-Managed and Dedicated support only sub and aud (GitLab, n.d.al). The ref, and the environment’s protection status and tier, can be matched only through sub. Azure federated credentials match the subject exactly, with a limit of 20 credentials per identity, and flexible credentials with pattern matching are in preview (Microsoft, n.d.); if you use them, keep wildcards out of the ref segment for any identity with production access. For both, from 18.7 the sub claim can include ref_protected, and for jobs with an environment environment_protected and deployment_tier, with the components set per project through the projects API setting ci_id_token_sub_claim_components (GitLab, n.d.e); the environment name itself is not a documented sub component. On these providers the environment binding rests on environment_protected and deployment_tier, and the job declares its own tier with the deployment_tier keyword (GitLab, n.d.am), so anyone who can deploy to another protected environment in the project may be able to match a production subject. Keep production in its own project, or keep every protected environment’s deployer list as narrow as production’s. Put project_id first rather than a path component, and update every trust policy to the new subject format. Without that change, sub carries the project path. GitLab blocks ID token issuance when a path in sub was previously used by a different project, which stops a new project inheriting an old project’s trust, but deploys on a path-based subject can then fail after a rename or path reuse (GitLab, n.d.e). Putting project_id first avoids both. For GitLab.com, Google requires an attribute condition that limits access to tokens issued by your GitLab group, for example assertion.namespace_id=='<group id>', and its examples show the same condition narrowed to an environment (Google Cloud, n.d.). On its own, a group condition admits every job in the group. For production, map project_id, ref, ref_protected, and environment as attributes, since only mapped attributes can be used to grant access (GitLab, n.d.an), and either give production its own provider whose condition checks them all or grant the production service account to a principal set on those attributes rather than to the whole pool. For a project in a subgroup, namespace_id is the namespace of the project running the job (GitLab, n.d.e), so check which group ID you are matching.
A few smaller habits help. Give each relying party and environment its own aud, which limits where a leaked token can be replayed; the job chooses its own aud, so the ref and environment bindings still carry the protection. Keep deploy job timeouts tight: the ID token expires at the job’s timeout if the job sets one, or after 5 minutes if not (GitLab, n.d.e), so a long timeout also means a longer-lived token. Cap the lifetime of what the token buys as well, with a short session duration on the cloud role and a token_explicit_max_ttl on the Vault role, which sets a hard cap on the Vault token’s lifetime (HashiCorp, n.d.). And use a separate cloud role or service account per environment, so a staging trust mistake does not reach production. These conditions also depend on GitLab computing the claims correctly; a 2025 security fix closed an issue that let users with Developer access obtain ID tokens for protected branches under certain circumstances (GitLab, 2025b), which is another reason to keep patching (practice 20).
YAML
deploy-production:
stage: deploy
environment: production
resource_group: production
tags: [production-deploy]
interruptible: false
timeout: 15m
cache: []
rules:
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
variables:
VAULT_SERVER_URL: https://vault.example.com
VAULT_AUTH_ROLE: myapp-production
id_tokens:
VAULT_ID_TOKEN:
aud: https://vault.example.com
secrets:
DATABASE_PASSWORD:
vault: production/db/password@ops
token: $VAULT_ID_TOKEN
script:
- ./deploy.sh --db-password-file "$DATABASE_PASSWORD"Listing 4. A deploy job that authenticates to Vault with a job-scoped ID token and targets a protected environment. The job chooses VAULT_AUTH_ROLE, so the role's bound claims do the work: the production role should set bound_audiences to the same aud and bind project_id, ref_type, ref, ref_protected, environment, and environment_protected, and every other role on the mount, including any default role, should be bound to your project or group and carry policies that cannot read production paths. Bound claim values are strings, for example the string true for ref_protected.
15. Move secrets out of CI/CD variables
GitLab’s variables documentation says .gitlab-ci.yml should hold only non-sensitive configuration and recommends an external secrets provider, and it warns that masking “is not a guaranteed way to prevent malicious users from accessing variable values” (GitLab, n.d.ao). The secrets keyword (Premium and Ultimate) integrates with HashiCorp Vault, Google Cloud Secret Manager, Azure Key Vault, and AWS Secrets Manager, using ID tokens to authenticate (GitLab, n.d.ap). With the Vault integration, the secret arrives as a path to a temporary file by default, as in Listing 4, and file: false puts the value in the variable instead (GitLab, n.d.aq). Scripts that read the variable as a value will break when you switch, so check them first.
There is now a native option too. GitLab Secrets Manager, built on OpenBao, became generally available in GitLab 19.5 for Premium and Ultimate on GitLab.com and self-managed, consumes GitLab Credits, and needs GitLab Runner 19.0 or later (GitLab, n.d.f). OpenBao is a community fork of HashiCorp Vault managed by the Linux Foundation’s OpenSSF (OpenBao, n.d.). Which option fits depends on what you already run: if your organization operates Vault or a cloud secret manager, the secrets integrations keep one source of truth; if secrets currently live in project variables, the native manager is a shorter step.
Where values do stay in variables, mark them protected so they reach only pipelines on protected branches and tags, and use hidden variables (generally available since 17.6) so values are not shown in the UI after creation (GitLab, n.d.ao). Merge request pipelines can optionally be given access to protected variables and runners through the “Allow merge request pipelines to access protected variables and runners” setting, so check it. It applies only when both branches are protected and in the same project, and fork merge request pipelines cannot reach these protected resources (GitLab, n.d.ar). Restrict CI_DEBUG_TRACE as well: GitLab warns that debug logging “exposes all variables and secrets available to the job” (GitLab, n.d.as).
16. Restrict who can set pipeline variables
Pipeline variables let anyone who can run a pipeline override configuration at run time. GitLab added a setting for the minimum role allowed to use them; new projects in new namespaces on GitLab.com default to no_one_allowed from 17.7, while self-managed and Dedicated default to maintainer when nothing is set (GitLab, n.d.ao). Locking this down breaks the “run pipeline with DEBUG=1” habit, so move those uses to typed pipeline inputs first, then change the setting on older projects and self-managed instances.
17. Scope the CI/CD job token
Every job gets a CI_JOB_TOKEN. Its allowlist controls which other groups and projects can use their job tokens to reach this project’s resources, and by default it includes only the project itself (GitLab, n.d.g). Add a project or group only when its pipelines need to read from or write to this one. Fine-grained job token permissions, generally available since 18.3, go further by limiting which API endpoints a job token can use; they are opt-in per project (GitLab, 2025a), and a small set of endpoints stays reachable whatever you grant, including listing and deleting container registry repositories and tags, some package registry metadata endpoints, and the endpoints that exchange job tokens (GitLab, n.d.at). List which jobs call other projects before you turn them on, because those calls fail until you grant them.
18. Put expiry on every token, and review what is connected
By default, new personal access tokens must have an expiry date no more than 365 days out, and an administrator who turns off that requirement allows tokens that never expire (GitLab, n.d.au). Keep the requirement on. Inside pipelines, prefer the job token (practice 17). For automation outside a job, use service accounts so nothing depends on a person’s token that leaves with them (GitLab, n.d.av), and confirm that token expiry is required on your instance, because service account tokens are created with no expiry date when it is not (GitLab, n.d.av). While you are reviewing tokens, review the OAuth applications, integrations, and webhooks connected to your groups too; they hold access that does not show up in pipeline configuration.
Runners and the platform
19. Treat runners as part of your security boundary
Register runners with authentication tokens, recognizable by their glrt- prefix. The legacy registration token workflow is “not recommended”, and from GitLab 17.0 administrators and group owners can disable it (GitLab, n.d.aw).
GitLab’s runner security guidance advises against running containers in privileged mode, describes it as effectively disabling the container’s security mechanisms, and says privileged containers belong only on isolated, ephemeral virtual machines. It also says to use the shell executor only for trusted builds and, for runners that need privileged mode, to run jobs only on protected branches (GitLab, n.d.ax). In practice, that means:
- Separate runners for untrusted work and for deployments. Protected runners limit which refs can use them, and tags only route jobs; any job on a protected branch can request a deploy runner’s tag. Register deploy runners at project level or on a narrow group, mark them protected, turn off “Run untagged jobs” (GitLab, n.d.ai), leave the project setting that gives merge request pipelines access to protected runners and variables off (GitLab, n.d.ar), and rely on the protected environment and the cloud trust condition (practice 14) as the actual gate.
- Fork merge requests. Their pipelines run in the fork by default. A parent-project member can choose to run one in the parent project, and GitLab warns that fork code “can contain malicious code that tries to steal secrets in the parent project” (GitLab, n.d.ar). Review the diff, especially
.gitlab-ci.yml, before accepting that warning. - No privileged containers or shared Docker sockets for untrusted code. GitLab warns that sharing the host’s Docker daemon exposes the host to privilege escalation and container breakout, and lists rootless BuildKit and Buildah as alternatives for building images (GitLab, n.d.ay).
- Ephemeral runners, where each job gets a fresh machine, wherever you can afford them. On GitLab.com, GitLab-hosted runners already work this way, deleting each VM after its job (GitLab, n.d.az), so the runner work there is mostly about your own deploy runners. A long-lived self-managed runner shared across projects is the one to fix first.
- A plan for the Docker Machine executor, which is deprecated and scheduled for removal in GitLab 20.0. GitLab recommends the GitLab Runner Autoscaler for AWS, Azure, and Google Cloud (GitLab, n.d.h).
20. Patch GitLab itself
Pipeline controls depend on the GitLab instance that enforces them. GitLab’s security releases regularly include CI/CD fixes; the critical patch release in September 2026, for example, fixed two critical issues where a crafted regular expression in CI/CD configuration could let an authenticated user run code on the GitLab server (GitLab, 2026). Self-managed instances need a patching routine that keeps pace with these releases.
Deployments and policy
21. Use protected environments with deployment approvals
Deployment approvals on protected environments (Premium and Ultimate) block a deployment until the required approvals are in, and by default the person who triggered the deployment pipeline cannot also approve it (GitLab, n.d.ba). Make sure enough approvers are available across time zones and on-call rotations, or approvals turn into a deployment freeze.
Listing 4 uses resource_group so only one production deploy runs at a time. By default a resource group does not guarantee order, so an older pipeline’s deploy can run after a newer one; the process mode, such as newest_ready_first, can be changed only through the API (GitLab, n.d.bb). The “Prevent outdated deployment jobs” setting stops older deployment jobs running once a newer one has started (GitLab, n.d.bc). Retrying a previous deployment job for rollback is enabled by default, and GitLab suggests turning job retries off in sensitive projects (GitLab, n.d.bc), in which case a rollback means running a new pipeline from an earlier commit; with Listing 4’s rules, that usually means a revert merged to the default branch.
22. Enforce shared jobs with pipeline execution policies
If you need certain jobs, such as security scans, to run in every project whatever the project’s own .gitlab-ci.yml says, pipeline execution policies are the current mechanism (Ultimate, generally available since 17.3), and compliance pipelines, the older approach, are deprecated (GitLab, n.d.bd). Scan execution policies cover the narrower case of enforcing GitLab’s security scanners (GitLab, n.d.be).
AI in the pipeline
23. Give AI agents least-privilege access
AI touches the pipeline in two ways. The first is through code: assistants can produce CI configuration with deprecated keywords, unpinned images, or habits from other CI systems, and an agent asked to “make the pipeline green” may add allow_failure: true or remove a failing job. CI Lint (GitLab, n.d.bf) and an audit like Listing 2 catch the syntax and pinning problems; a weakened or deleted job is caught by a Code Owner reading the diff, or prevented outright for jobs you enforce through a pipeline execution policy (practice 22).
The second is agents running inside GitLab. The Fix CI/CD Pipeline Flow diagnoses failed pipelines and proposes fixes (GitLab, n.d.j), and Duo Agent Platform flows run on runners with the gitlab--duo tag. They need a Docker-capable executor, and GitLab documents privileged = true as one way to meet the sandbox requirements, though it does not guarantee the sandbox starts; if it cannot, the flow runs without the sandbox and the job log says so (GitLab, n.d.k). If you use privileged mode for flow runners, they fall into the case GitLab’s runner guidance describes: privileged containers belong only on isolated, ephemeral virtual machines (GitLab, n.d.ax). Keep that pool separate from deploy runners and keep the job token allowlist narrow. A flow job receives the ID tokens declared in .gitlab/duo/agent-config.yml on the default branch, and its setup script runs outside the sandbox and can see the triggering user’s OAuth token (GitLab, n.d.k). Put that file under Code Owners, give flow tokens their own audiences, and require the protected environment claims on production roles (practice 14), since flow jobs are unlikely to declare a protected environment.
GitLab’s guidance on agent security lists CI token exfiltration from a flow running on a runner as an example threat, with prompt injection through content the agent reads as the usual route in, and recommends applying “the principle of least privilege to agents, just as you would for human team members” (GitLab, n.d.bg). Treat issue and merge request text that a flow reads as untrusted input.
Visibility
24. Measure the pipeline, and send runtime monitoring elsewhere
CI/CD analytics, available on every tier, shows pipeline duration and success rates (GitLab, n.d.bh), and DORA metrics (deployment frequency, lead time for changes, time to restore service, and change failure rate) are available on Ultimate (GitLab, n.d.bi). On Free and Premium, the baseline from Table 1 and your incident log can stand in. With the Prometheus metrics dashboards gone (see “What changed since 2023”), runtime monitoring belongs in your observability platform, with deployments annotated from the pipeline. Send GitLab audit events to your security monitoring as well, since that is where token creation, runner registration, and settings changes show up. Streaming them is an Ultimate feature (GitLab, n.d.bj).
Regulation: the same evidence for the EU and the US
A pipeline built along these lines produces records that regulators and customers increasingly ask about: who approved a change, what was in the build, which dependencies it used, and where it was deployed.
In the EU, if you place products with digital elements on the market, the Cyber Resilience Act’s reporting obligations have applied since 11 September 2026, and its main obligations apply from 11 December 2027 (European Commission, n.d.; European Parliament and Council, 2024). SBOMs, vulnerability handling, and build records are likely to feed into that work.
In the US, the direction has moved from mandate toward guidance. Executive Order 14306 struck subsections 2(a) and 2(b) of Executive Order 14144 (Executive Office of the President, 2025b), the part of that order that directed OMB to recommend contract language requiring machine-readable secure software development attestations (Executive Office of the President, 2025a), and OMB memorandum M-26-05 rescinded M-22-18 and M-23-16, leaving agencies free to use the secure software attestation form and to request SBOMs (Office of Management and Budget, 2026). The NIST Secure Software Development Framework remains the main reference; version 1.2 was released as an initial public draft in December 2025 (Booth et al., 2025), and NIST SP 800-204D covers software supply chain security in CI/CD pipelines specifically (Chandramouli, Kautz and Torres-Arias, 2024).
The OWASP Top 10 CI/CD Security Risks is a useful checklist across both (OWASP Foundation, n.d.). Table 2 maps the security-relevant practices in this guide to it.
| OWASP CI/CD risk | Practices in this guide |
|---|---|
| CICD-SEC-1 Insufficient Flow Control Mechanisms | 3, 4, 5, 21, 22 |
| CICD-SEC-2 Inadequate Identity and Access Management | 16, 17, 18 |
| CICD-SEC-3 Dependency Chain Abuse | 10, 11, 12 |
| CICD-SEC-4 Poisoned Pipeline Execution (PPE) | 3, 4, 14, 15, 19, 23 |
| CICD-SEC-5 Insufficient PBAC (Pipeline-Based Access Controls) | 14, 15, 17, 19 |
| CICD-SEC-6 Insufficient Credential Hygiene | 14, 15, 18 |
| CICD-SEC-7 Insecure System Configuration | 19, 20 |
| CICD-SEC-8 Ungoverned Usage of 3rd Party Services | 18, 23 |
| CICD-SEC-9 Improper Artifact Integrity Validation | 11, 13 |
| CICD-SEC-10 Insufficient Logging and Visibility | 24 |
Table 2. The practices above mapped to the OWASP Top 10 CI/CD Security Risks.
Working with Sakura Sky
Sakura Sky has been a GitLab partner since 2023, and pipeline security is a large part of our security work. If you are reviewing a GitLab setup against the practices above, or moving to OIDC, components, and protected runners, talk to us.
Disclosure: Andrew Stevens, Sakura Sky’s co-founder and CTO, is a lifetime member of the OWASP Foundation. This article reflects an independent reading of public OWASP material and does not represent the views of the Foundation.
Disclosure: Sakura Sky is a GitLab partner. GitLab features and tier requirements in this article are taken from GitLab’s public documentation.
References
Abeles, D. and Henriksen, M., 2025. GitLab discovers widespread npm supply chain attack. GitLab Blog, 24 November. Available at: https://about.gitlab.com/blog/gitlab-discovers-widespread-npm-supply-chain-attack/ [Accessed 19 October 2026]
Aqua Security, 2026. Trivy ecosystem supply chain temporarily compromised (GHSA-69fq-xp46-6x23). GitHub Security Advisory, 21 March. Available at: https://github.com/aquasecurity/trivy/security/advisories/GHSA-69fq-xp46-6x23 [Accessed 19 October 2026]
Booth, H., Ogata, M., Kent, K., Souppaya, M. and Dodson, D., 2025. Secure Software Development Framework (SSDF) Version 1.2: Recommendations for Mitigating the Risk of Software Vulnerabilities. NIST SP 800-218 Rev. 1 (Initial Public Draft). National Institute of Standards and Technology, 17 December. Available at: https://csrc.nist.gov/pubs/sp/800/218/r1/ipd [Accessed 19 October 2026]
Chandramouli, R., Kautz, F. and Torres-Arias, S., 2024. Strategies for the Integration of Software Supply Chain Security in DevSecOps CI/CD Pipelines. NIST SP 800-204D. National Institute of Standards and Technology, February. Available at: https://csrc.nist.gov/pubs/sp/800/204/d/final [Accessed 19 October 2026]
CISA, 2025a. Supply Chain Compromise of Third-Party tj-actions/changed-files (CVE-2025-30066) and reviewdog/action-setup@v1 (CVE-2025-30154). Cybersecurity and Infrastructure Security Agency, 18 March. Available at: https://www.cisa.gov/news-events/alerts/2025/03/18/supply-chain-compromise-third-party-github-action-cve-2025-30066 [Accessed 19 October 2026]
CISA, 2025b. Widespread Supply Chain Compromise Impacting npm Ecosystem. Cybersecurity and Infrastructure Security Agency, 23 September. Available at: https://www.cisa.gov/news-events/alerts/2025/09/23/widespread-supply-chain-compromise-impacting-npm-ecosystem [Accessed 19 October 2026]
DORA, n.d. Capabilities: Trunk-based development. Available at: https://dora.dev/capabilities/trunk-based-development/ [Accessed 19 October 2026]
European Commission, n.d. Cyber Resilience Act. Shaping Europe’s digital future. Available at: https://digital-strategy.ec.europa.eu/en/policies/cyber-resilience-act [Accessed 19 October 2026]
European Parliament and Council, 2024. Regulation (EU) 2024/2847 of the European Parliament and of the Council of 23 October 2024 on horizontal cybersecurity requirements for products with digital elements and amending Regulations (EU) No 168/2013 and (EU) 2019/1020 and Directive (EU) 2020/1828 (Cyber Resilience Act). Official Journal of the European Union, L 2024/2847, 20 November. Available at: https://eur-lex.europa.eu/eli/reg/2024/2847/oj [Accessed 19 October 2026]
Executive Office of the President, 2025a. Executive Order 14144: Strengthening and Promoting Innovation in the Nation’s Cybersecurity. Federal Register, 90 FR 6755, 17 January. Available at: https://www.govinfo.gov/content/pkg/FR-2025-01-17/html/2025-01470.htm [Accessed 19 October 2026]
Executive Office of the President, 2025b. Executive Order 14306: Sustaining Select Efforts To Strengthen the Nation’s Cybersecurity and Amending Executive Order 13694 and Executive Order 14144. Federal Register, 90 FR 24723, 11 June. Available at: https://www.govinfo.gov/content/pkg/FR-2025-06-11/html/2025-10804.htm [Accessed 19 October 2026]
GitLab, 2023. Removals by version (GitLab 16.0 documentation archive). Available at: https://archives.docs.gitlab.com/16.0/ee/update/removals.html [Accessed 19 October 2026]
GitLab, 2025a. Fine-grained permissions for job tokens is now GA. GitLab Blog, 26 August. Available at: https://about.gitlab.com/blog/fine-grained-job-tokens-ga/ [Accessed 19 October 2026]
GitLab, 2025b. GitLab Patch Release: 18.2.2, 18.1.4, 18.0.6. GitLab Docs, 13 August. Available at: https://docs.gitlab.com/releases/patches/patch-release-gitlab-18-2-2-released/ [Accessed 19 October 2026]
GitLab, 2026. GitLab Critical Patch Release: 19.4.1, 19.3.3, 19.2.7. GitLab Docs, 23 September. Available at: https://docs.gitlab.com/releases/patches/patch-release-gitlab-19-4-1-released/ [Accessed 19 October 2026]
GitLab, n.d.a. Deprecated keywords. GitLab Docs. Available at: https://docs.gitlab.com/ci/yaml/deprecated_keywords/ [Accessed 19 October 2026]
GitLab, n.d.b. CI/CD components. GitLab Docs. Available at: https://docs.gitlab.com/ci/components/ [Accessed 19 October 2026]
GitLab, n.d.c. CI/CD inputs. GitLab Docs. Available at: https://docs.gitlab.com/ci/inputs/ [Accessed 19 October 2026]
GitLab, n.d.d. Connect to cloud services. GitLab Docs. Available at: https://docs.gitlab.com/ci/cloud_services/ [Accessed 19 October 2026]
GitLab, n.d.e. OpenID Connect (OIDC) Authentication Using ID Tokens. GitLab Docs. Available at: https://docs.gitlab.com/ci/secrets/id_token_authentication/ [Accessed 19 October 2026]
GitLab, n.d.f. GitLab Secrets Manager. GitLab Docs. Available at: https://docs.gitlab.com/ci/secrets/secrets_manager/ [Accessed 19 October 2026]
GitLab, n.d.g. CI/CD job token. GitLab Docs. Available at: https://docs.gitlab.com/ci/jobs/ci_job_token/ [Accessed 19 October 2026]
GitLab, n.d.h. Install and register GitLab Runner for autoscaling with Docker Machine. GitLab Docs. Available at: https://docs.gitlab.com/runner/executors/docker_machine/ [Accessed 19 October 2026]
GitLab, n.d.i. Code Quality. GitLab Docs. Available at: https://docs.gitlab.com/ci/testing/code_quality/ [Accessed 19 October 2026]
GitLab, n.d.j. Fix CI/CD Pipeline Flow. GitLab Docs. Available at: https://docs.gitlab.com/ci/pipelines/fix_pipeline/ [Accessed 19 October 2026]
GitLab, n.d.k. Configure flow execution. GitLab Docs. Available at: https://docs.gitlab.com/user/duo_agent_platform/flows/execution/ [Accessed 19 October 2026]
GitLab, n.d.l. Branching strategies. GitLab Docs. Available at: https://docs.gitlab.com/user/project/repository/branches/strategies/ [Accessed 19 October 2026]
GitLab, n.d.m. Protected branches. GitLab Docs. Available at: https://docs.gitlab.com/user/project/repository/branches/protected/ [Accessed 19 October 2026]
GitLab, n.d.n. Protect your repository. GitLab Docs. Available at: https://docs.gitlab.com/user/project/repository/protect/ [Accessed 19 October 2026]
GitLab, n.d.o. Code Owners. GitLab Docs. Available at: https://docs.gitlab.com/user/project/codeowners/ [Accessed 19 October 2026]
GitLab, n.d.p. Merge request approval rules. GitLab Docs. Available at: https://docs.gitlab.com/user/project/merge_requests/approvals/rules/ [Accessed 19 October 2026]
GitLab, n.d.q. Merge request approval settings. GitLab Docs. Available at: https://docs.gitlab.com/user/project/merge_requests/approvals/settings/ [Accessed 19 October 2026]
GitLab, n.d.r. Composite identity. GitLab Docs. Available at: https://docs.gitlab.com/user/duo_agent_platform/composite_identity/ [Accessed 19 October 2026]
GitLab, n.d.s. Merged results pipelines. GitLab Docs. Available at: https://docs.gitlab.com/ci/pipelines/merged_results_pipelines/ [Accessed 19 October 2026]
GitLab, n.d.t. Merge trains. GitLab Docs. Available at: https://docs.gitlab.com/ci/pipelines/merge_trains/ [Accessed 19 October 2026]
GitLab, n.d.u. workflow keyword. GitLab Docs. Available at: https://docs.gitlab.com/ci/yaml/workflow/ [Accessed 19 October 2026]
GitLab, n.d.v. CI/CD YAML syntax reference. GitLab Docs. Available at: https://docs.gitlab.com/ci/yaml/ [Accessed 19 October 2026]
GitLab, n.d.w. Pipeline efficiency. GitLab Docs. Available at: https://docs.gitlab.com/ci/pipelines/pipeline_efficiency/ [Accessed 19 October 2026]
GitLab, n.d.x. Control how jobs run. GitLab Docs. Available at: https://docs.gitlab.com/ci/jobs/job_control/ [Accessed 19 October 2026]
GitLab, n.d.y. Specify when jobs run with rules. GitLab Docs. Available at: https://docs.gitlab.com/ci/jobs/job_rules/ [Accessed 19 October 2026]
GitLab, n.d.z. Caching in GitLab CI/CD. GitLab Docs. Available at: https://docs.gitlab.com/ci/caching/ [Accessed 19 October 2026]
GitLab, n.d.aa. Job artifacts. GitLab Docs. Available at: https://docs.gitlab.com/ci/jobs/job_artifacts/ [Accessed 19 October 2026]
GitLab, n.d.ab. Accessibility testing. GitLab Docs. Available at: https://docs.gitlab.com/ci/testing/accessibility_testing/ [Accessed 19 October 2026]
GitLab, n.d.ac. Pipeline security. GitLab Docs. Available at: https://docs.gitlab.com/ci/pipeline_security/ [Accessed 19 October 2026]
GitLab, n.d.ad. Static application security testing (SAST). GitLab Docs. Available at: https://docs.gitlab.com/user/application_security/sast/ [Accessed 19 October 2026]
GitLab, n.d.ae. Pipeline secret detection. GitLab Docs. Available at: https://docs.gitlab.com/user/application_security/secret_detection/pipeline/ [Accessed 19 October 2026]
GitLab, n.d.af. Secret push protection. GitLab Docs. Available at: https://docs.gitlab.com/user/application_security/secret_detection/secret_push_protection/ [Accessed 19 October 2026]
GitLab, n.d.ag. Dependency scanning by using SBOM. GitLab Docs. Available at: https://docs.gitlab.com/user/application_security/dependency_scanning/dependency_scanning_sbom/ [Accessed 19 October 2026]
GitLab, n.d.ah. Dependency scanning. GitLab Docs. Available at: https://docs.gitlab.com/user/application_security/dependency_scanning/ [Accessed 19 October 2026]
GitLab, n.d.ai. Configuring runners. GitLab Docs. Available at: https://docs.gitlab.com/ci/runners/configure_runners/ [Accessed 19 October 2026]
GitLab, n.d.aj. Use Sigstore for keyless signing and verification. GitLab Docs. Available at: https://docs.gitlab.com/ci/yaml/signing_examples/ [Accessed 19 October 2026]
GitLab, n.d.ak. Protected environments. GitLab Docs. Available at: https://docs.gitlab.com/ci/environments/protected_environments/ [Accessed 19 October 2026]
GitLab, n.d.al. Configure OpenID Connect in AWS to retrieve temporary credentials. GitLab Docs. Available at: https://docs.gitlab.com/ci/cloud_services/aws/ [Accessed 19 October 2026]
GitLab, n.d.am. Environments. GitLab Docs. Available at: https://docs.gitlab.com/ci/environments/ [Accessed 19 October 2026]
GitLab, n.d.an. Configure OpenID Connect with GCP Workload Identity Federation. GitLab Docs. Available at: https://docs.gitlab.com/ci/cloud_services/google_cloud/ [Accessed 19 October 2026]
GitLab, n.d.ao. CI/CD variables. GitLab Docs. Available at: https://docs.gitlab.com/ci/variables/ [Accessed 19 October 2026]
GitLab, n.d.ap. Use external secrets in CI/CD. GitLab Docs. Available at: https://docs.gitlab.com/ci/secrets/ [Accessed 19 October 2026]
GitLab, n.d.aq. Use HashiCorp Vault secrets in GitLab CI/CD. GitLab Docs. Available at: https://docs.gitlab.com/ci/secrets/hashicorp_vault/ [Accessed 19 October 2026]
GitLab, n.d.ar. Merge request pipelines. GitLab Docs. Available at: https://docs.gitlab.com/ci/pipelines/merge_request_pipelines/ [Accessed 19 October 2026]
GitLab, n.d.as. Troubleshooting CI/CD variables. GitLab Docs. Available at: https://docs.gitlab.com/ci/variables/variables_troubleshooting/ [Accessed 19 October 2026]
GitLab, n.d.at. Fine-grained permissions for CI/CD job tokens. GitLab Docs. Available at: https://docs.gitlab.com/ci/jobs/fine_grained_permissions/ [Accessed 19 October 2026]
GitLab, n.d.au. Personal access tokens. GitLab Docs. Available at: https://docs.gitlab.com/user/profile/personal_access_tokens/ [Accessed 19 October 2026]
GitLab, n.d.av. Service accounts. GitLab Docs. Available at: https://docs.gitlab.com/user/profile/service_accounts/ [Accessed 19 October 2026]
GitLab, n.d.aw. Migrating to the new runner registration workflow. GitLab Docs. Available at: https://docs.gitlab.com/ci/runners/new_creation_workflow/ [Accessed 19 October 2026]
GitLab, n.d.ax. Security for self-managed runners. GitLab Docs. Available at: https://docs.gitlab.com/runner/security/ [Accessed 19 October 2026]
GitLab, n.d.ay. Use Docker to build Docker images. GitLab Docs. Available at: https://docs.gitlab.com/ci/docker/using_docker_build/ [Accessed 19 October 2026]
GitLab, n.d.az. GitLab-hosted runners. GitLab Docs. Available at: https://docs.gitlab.com/ci/runners/hosted_runners/ [Accessed 19 October 2026]
GitLab, n.d.ba. Deployment approvals. GitLab Docs. Available at: https://docs.gitlab.com/ci/environments/deployment_approvals/ [Accessed 19 October 2026]
GitLab, n.d.bb. Resource group. GitLab Docs. Available at: https://docs.gitlab.com/ci/resource_groups/ [Accessed 19 October 2026]
GitLab, n.d.bc. Deployment safety. GitLab Docs. Available at: https://docs.gitlab.com/ci/environments/deployment_safety/ [Accessed 19 October 2026]
GitLab, n.d.bd. Pipeline execution policies. GitLab Docs. Available at: https://docs.gitlab.com/user/application_security/policies/pipeline_execution_policies/ [Accessed 19 October 2026]
GitLab, n.d.be. Scan execution policies. GitLab Docs. Available at: https://docs.gitlab.com/user/application_security/policies/scan_execution_policies/ [Accessed 19 October 2026]
GitLab, n.d.bf. Validate GitLab CI/CD configuration. GitLab Docs. Available at: https://docs.gitlab.com/ci/yaml/lint/ [Accessed 19 October 2026]
GitLab, n.d.bg. Security threats in agentic systems. GitLab Docs. Available at: https://docs.gitlab.com/user/duo_agent_platform/security_threats/ [Accessed 19 October 2026]
GitLab, n.d.bh. CI/CD analytics. GitLab Docs. Available at: https://docs.gitlab.com/user/analytics/ci_cd_analytics/ [Accessed 19 October 2026]
GitLab, n.d.bi. DevOps Research and Assessment (DORA) metrics. GitLab Docs. Available at: https://docs.gitlab.com/user/analytics/dora_metrics/ [Accessed 19 October 2026]
GitLab, n.d.bj. Audit event streaming for top-level groups. GitLab Docs. Available at: https://docs.gitlab.com/user/compliance/audit_event_streaming/ [Accessed 19 October 2026]
Google Cloud, n.d. Configure Workload Identity Federation with deployment pipelines. Google Cloud documentation. Available at: https://docs.cloud.google.com/iam/docs/workload-identity-federation-with-deployment-pipelines [Accessed 19 October 2026]
Harvey, N. and DeBellis, D., 2024. Announcing the 2024 DORA report. Google Cloud Blog, 22 October. Available at: https://cloud.google.com/blog/products/devops-sre/announcing-the-2024-dora-report [Accessed 19 October 2026]
Harvey, N. and DeBellis, D., 2025. Announcing the 2025 DORA Report: State of AI-Assisted Software Development. Google Cloud Blog, 23 September. Available at: https://cloud.google.com/blog/products/ai-machine-learning/announcing-the-2025-dora-report [Accessed 19 October 2026]
HashiCorp, n.d. JWT/OIDC auth method (API). Vault documentation. Available at: https://developer.hashicorp.com/vault/api-docs/auth/jwt [Accessed 19 October 2026]
Microsoft, n.d. Flexible federated identity credentials (preview). Microsoft Learn. Available at: https://learn.microsoft.com/en-us/entra/workload-id/workload-identities-flexible-federated-identity-credentials [Accessed 19 October 2026]
Office of Management and Budget, 2026. M-26-05: Adopting a Risk-based Approach to Software and Hardware Security. Executive Office of the President, 23 January. Available at: https://www.whitehouse.gov/wp-content/uploads/2026/01/M-26-05-Adopting-a-Risk-based-Approach-to-Software-and-Hardware-Security.pdf [Accessed 19 October 2026]
OpenBao, n.d. OpenBao. Available at: https://openbao.org/ [Accessed 19 October 2026]
OWASP Foundation, n.d. OWASP Top 10 CI/CD Security Risks. Available at: https://owasp.org/www-project-top-10-ci-cd-security-risks/ [Accessed 19 October 2026]
Renovate, n.d.a. Automated Dependency Updates for GitLab CI/CD. Renovate Docs. Available at: https://docs.renovatebot.com/modules/manager/gitlabci/ [Accessed 19 October 2026]
Renovate, n.d.b. Minimum Release Age. Renovate Docs. Available at: https://docs.renovatebot.com/key-concepts/minimum-release-age/ [Accessed 19 October 2026]
Sharma, V., 2025. Harden-Runner detection: tj-actions/changed-files action is compromised. StepSecurity Blog, 14 March. Available at: https://www.stepsecurity.io/blog/harden-runner-detection-tj-actions-changed-files-action-is-compromised [Accessed 19 October 2026]
SLSA, n.d. Provenance (SLSA specification v1.0). Available at: https://slsa.dev/spec/v1.0/provenance [Accessed 19 October 2026]
Strumpflohner, J., 2025. S1ngularity - What Happened, How We Responded, What We Learned. Nx Blog, 5 September. Available at: https://nx.dev/blog/s1ngularity-postmortem [Accessed 19 October 2026]

