Skip to content
Français
Sync not enabled: your progress stays in this browser My learning
Select theme
Français

Plumber: securing your GitLab CI and GitHub Actions pipelines

By updated

Improve this page

Logo Plumber

If your GitLab CI/CD pipeline uses unpinned Docker images, includes that track main or a Docker-in-Docker build, or if your GitHub Actions workflows reference third-party actions by mutable tag, you expose your chain to a supply chain attack. Plumber is a pipeline security scanner: it reads your CI configuration, checks it against a series of controls, then returns a score from 0 to 100 (letter A to E) and attack paths to fix. This guide, for beginners and intermediates, starts with the CLI, moves on to the GitLab component and the GitHub action, then covers the PBOM, the reports, the score and Plumber Radar.

What you will learn

  • Install Plumber while verifying its checksum, then run a first scan with a GitLab or GitHub token
  • Read an attack path and the Plumber Score block of a real scan, then understand how the score is computed and detail a code with plumber explain
  • Fix the frequent flaws: unpinned image, action not pinned by SHA, unauthorised source, unprotected branch
  • Configure the controls with an overlay (extends: plumber:default) and validate it
  • Integrate Plumber into CI with the GitLab component or the GitHub action, both pinned
  • Set the threshold of the job (--min-points, --min-score) and interpret the exit codes 0, 1, 2 and 3
  • Export a PBOM, a CycloneDX, a SARIF or GitLab SAST report
  • Check the CI/CD hygiene of a supplier with Plumber Radar

What is Plumber?

Plumber is a security scanner for GitLab CI/CD and GitHub Actions. On the GitLab side, it queries the project API and reads the merged configuration; on the GitHub side, it analyses the files in .github/workflows with the Rego rules engine, then completes its findings through the GitHub API: branch protection, security advisories on actions, archived repositories, workflow states. It flags the most dangerous gaps: untrusted images, mutable tags, actions not pinned by SHA, unauthorised sources, unprotected branches, scripts downloaded without verification, Docker-in-Docker.

A few terms come back throughout the guide. A supply chain attack goes through a dependency you do not control (an action, an image, a template) rather than through your own code. To pin a dependency is to freeze it on an identifier that never changes: the commit SHA for an action, the digest (sha256:…) for a container image. A tag such as v4 or 3.12 stays mutable, because its owner can move it to other content. The provider is the platform being analysed, GitLab or GitHub. Docker-in-Docker (DinD) is a job that starts its own Docker daemon inside a privileged container.

Every problem carries an issue code (ISSUE-XXX) that you detail with plumber explain. What is grouped into an attack path and what stays an individual finding is explained further down, in the score section.

Plumber is open source software, distributed under the MPL 2.0 licence (LICENSE file of the getplumber/plumber repository). The official documentation (getplumber.io/docs/cli) complements this guide for the rarely used options.

Plumber is not alone: zizmor and poutine analyse GitHub workflows in depth, whereas Plumber covers two platforms under one configuration and returns a single score. The hardened CI pipeline lab makes them pass together at zero findings.

Where to start?

Plumber is used in four ways, and the choice mostly changes the order in which you learn it. The CLI shows the raw output and lets you iterate in a few seconds. The GitLab component and the GitHub action save you from writing a full job, but hide part of how it works. The Platform, Plumber's multi-project steering service (presented in the section "When should you move to the Platform?"), answers a governance need, not a discovery one. Find your situation in the left column.

Your situationRecommended entry pointWhy
You are discovering PlumberLocal CLIYou understand what the tool detects and how to read its output
You have a GitLab pipelineGitLab CI/CD componentOne include is enough, the exports are already wired
You have GitHub workflowsGitHub actionOne step, with a SARIF report (a standard exchange format) in the Security tab
You must centralise several projectsPlatformYou move from project-by-project analysis to governance

Prerequisites

Before running your first scan, you need:

  • a Git repository linked to a GitLab or GitHub project;
  • on GitLab: a token with the read_api and read_repository scopes, with the Maintainer role on the project (otherwise branch protection stays out of reach);
  • on GitHub: a token exported in GH_TOKEN or GITHUB_TOKEN (Plumber reads GH_TOKEN first), or a gh auth login session, plus Administration:read to read branch protection and Actions:read to read workflow state (the paragraph "Which GitHub token should you create?" below details the token type);
  • an interactive terminal if you want to use plumber config init.

How do you install Plumber?

Plumber ships as a single binary, with no dependency. The first three methods put the executable on your machine; the Docker variant avoids any installation and suits CI runners. Whatever the channel, pin the version: analysis results are only comparable from one run to the next on the same version.

Terminal window
mise use -g github:getplumber/plumber@0.7.2

Check (mise, Homebrew or binary; with Docker, run docker run --rm <image@digest> version):

Terminal window
plumber version

The output must show three lines: plumber version 0.7.2, the commit hash (620b4de274459229ad4f35041ca8bb48d8241d13) and the build date (2026-10-17T04:18:53Z). There is no --version option: it is the version subcommand.

At the end of an analysis, Plumber also checks whether a newer version exists and prints the upgrade command for your installation channel. Turn this notice off with PLUMBER_NO_UPDATE_CHECK=1.

How do you run a first scan in 5 minutes?

The path is always the same: authenticate, scan, read, fix. Plumber reads your origin remote to detect the provider: a GitLab URL switches to the GitLab API, a GitHub URL to the analysis of local workflows completed by the GitHub API. No .plumber.yaml file is needed to start: without one, Plumber prints No .plumber.yaml found; using Plumber's built-in default configuration. and applies its embedded default configuration.

  1. Authenticate with your provider

    On GitLab, create a token through User Settings -> Access Tokens with read_api and read_repository, then export it:

    Terminal window
    export GITLAB_TOKEN=<your-token>

    On GitHub, export a token (the next paragraph gives its type and permissions) or open a session with the gh CLI:

    Terminal window
    export GH_TOKEN=<your-token>
    # or: gh auth login

    Which GitHub token should you create? A fine-grained token, because it carries the Administration:read permission, needed to read branch protection, without opening anything else. A classic token with the repo scope reads it too, but it grants write access to all your repositories: avoid it. Create the fine-grained token under Settings > Developer settings > Personal access tokens > Fine-grained tokens, with Administration:read and Actions:read. That permission is only granted on a repository you administer: on someone else's repository, the branch protection control stays partial. In the GitHub action, the workflow's GITHUB_TOKEN does not carry this permission: branchMustBeProtected then stays partial (see the action's github-token input). Plumber reads GH_TOKEN, then GITHUB_TOKEN, then the gh session.

  2. Run the analysis

    Terminal window
    cd my-project
    plumber analyze --score-point

    Plumber detects the provider, the URL and the project path from origin. The --score-point option adds the points breakdown under the score, which the CLI prints anyway.

  3. Read the Score block first, then work back up to the detail

    Look first for the letter and the points out of 100 with the status line; the attack paths (Attack paths), which cost the most; the individual findings (Individual findings) with their ISSUE-XXX codes; the job or workflow concerned.

Can you scan a repository without cloning it?

Yes: analyze accepts a positional target, so you do not need to be inside the repository or depend on its remote. The recognised forms are owner/repo (GitHub by default), github.com/owner/repo, https://gitlab.com/group/project, git@host:path.git, with a /tree/<branch> suffix to target a branch. A host other than github.com and gitlab.com is treated as GitLab, unless you add --provider github.

Terminal window
plumber analyze nektos/act --score-point
plumber analyze https://gitlab.com/Bob74/pipeline-craft --branch solution/lab-12 --score-point

If the local repository has no origin remote, or if it points somewhere other than GitLab or GitHub, pass the parameters by hand: --gitlab-url https://gitlab.example.com --project my-group/my-project for a self-hosted GitLab, --github-url https://github.example.com --project my-org/my-project for GitHub Enterprise Server (leave --github-url empty for api.github.com).

What do the exit codes mean?

The exit code is what your CI reads to fail the job. Plumber uses four, and the last one is the one you meet without expecting it.

CodeMeaningExample
0Analysis succeeded, threshold metScore greater than or equal to --min-points
1Threshold not met (gate)Status: FAILED (gate blocks at 100 pts)
2Runtime errorMissing token, invalid configuration, network
3Incomplete analysisPartial data collection: score withheld

Code 3 takes precedence over the threshold: a degraded collection always exits with 3, whatever the score. With --fail-warnings, an unknown configuration key exits with 2 and a "could not verify" control with 3.

Real example: an open source GitLab pipeline

The lab repository Bob74/pipeline-craft, branch solution/lab-12, was scanned on 17 October 2026 with 0.7.2 and a GitLab token. Images not pinned by digest are grouped into attack paths, one per image: each says what an attacker would reach if that image were compromised. Here is the most serious path and the Score block, without the ASCII logo or the separator lines. Paths 2 and 3 are omitted.

MED Attack path 1
Entry docker.io/docker:27 (mutable image tag)
│
└──▶ runs in job `docker-build`
└─▶ reaches secrets Plumber could not list and a step that publishes
So if this image is compromised, an attacker can read the secrets Plumber could not list
and ship a malicious release
Note Plumber could not list the secrets
Note Capped at Medium: it needs a dependency compromise first. Plumber could not read:
secrets Plumber could not list
Fix pin the image by digest
↳ details: run `plumber explain -a 1`
Score
Plumber Score 88 / 100
Status: FAILED (gate blocks at 100 pts)
100 - 12 (attack paths) - 0 (individual findings)
Worst case: if this image is compromised, an attacker can read the secrets Plumber could not
list and ship a malicious release (attack path 1: docker.io/docker:27)
Best fix: pin the image by digest (image docker.io/alpine:3.20), +3 pts, 91 / 100 (A)
medium paths x1 -6
low paths x2 -6

Path 1 is Medium: it reaches "a step that publishes", which would make it a High, but an image on a mutable tag only becomes dangerous after its publisher is compromised, and Plumber caps it at Medium (Note line). The two other paths, that of python:3.12-slim and that of alpine:3.20, are Low, because Plumber could not list the secrets of the jobs concerned: an unproven fact does not raise a path. Total: 6 + 3 + 3 = 12 points lost, 88 points, B. The job still fails, since the default threshold is 100 points.

Real example: an open source GitHub workflow

The nektos/act repository (commit 4f41128) was scanned on 17 October 2026 with 0.7.2, a GitHub token and the default configuration. It illustrates a case where the individual findings weigh heavily and a single High path appears. The outputs below are abridged: the ↳ details, Worst case and (action …) lines of the real output are omitted. The path is shown with its entry, the job concerned and what it reaches:

HIGH Attack path 1
Entry cargo-bins/cargo-binstall@main via `vedantmgoyal2009/winget-releaser@4ffc7888bffd`
(untrusted and mutable external action)
│
└──▶ runs in job `release` from workflow `release.yml`
└─▶ reaches 3 secrets, a token with push access and write access to actions
and a step that publishes
So if this action is compromised or malicious,
an attacker can read 3 secrets of the repository, push in your repository
and ship a malicious release
Note the job runs in environment `release`
Note Capped at High: the source is not authorized, so a compromise is more likely
Fix pin the outermost action to a commit SHA whose definition pins this reference, or
vendor the chain into `./.github/actions/` and pin it there

The winget-releaser action, pinned by SHA, itself embeds a composite action that references cargo-binstall@main: Plumber resolves composite actions and reusable workflows, including those from other repositories, and displays the chain with the word via. The entry is mutable and the owner is outside the authorised sources, so the path is capped at High and not Medium. The resulting Score block:

Score
Plumber Score 55 / 100
Status: FAILED (gate blocks at 100 pts)
100 - 15 (attack paths) - 30 (individual findings)
individual findings count for 30 at most
Best fix: pin the outermost action to a commit SHA whose definition pins this reference,
or vendor the chain into `./.github/actions/` and pin it there, +15 pts, 70 / 100 (C)
ISSUE-307 low x6 -0
ISSUE-713 medium x6 -15
ISSUE-801 medium x6 -15
high paths x1 -15

The reading comes down to three points. The High path costs 15 points. The six ISSUE-713 (action from an unauthorised source, but pinned by SHA, hence Medium) and the six ISSUE-801 (no explicit permissions:) are Medium (5 points each, 60 in theory): the cap on individual findings brings them down to 30 points, which the table splits as 15 per code. The six ISSUE-307 (credentials persisted by actions/checkout) are Low and take nothing off. Result: 100 - 15 - 30 = 55 points, C, and the best fix, pinning the outermost action, would bring back 15 points.

Which errors should you fix first?

Plumber documents 76 issue codes organised in nine families (see the appendix at the end of the guide). On a project that has never been audited, start with four errors that are simple to fix and present whatever the provider. The YAML excerpts that follow are fragments of .plumber.yaml: the section on the overlay shows how to assemble them without losing the other controls.

1. Container images not pinned by digest

In the pipeline-craft lab, these findings are the entries of the attack paths seen above. The problem is not only the use of latest: a version tag such as python:3.12-slim is still mutable. If the registry republishes the image, your pipeline may run something else tomorrow. The code is ISSUE-103 ("Container image is not pinned by digest").

To enable strict mode, the key lives in the containerImageMustNotUseForbiddenTags control, under the provider section:

.plumber.yaml
version: "2.0"
gitlab:
controls:
containerImageMustNotUseForbiddenTags:
enabled: true
containerImagesMustBePinnedByDigest: true

The control also accepts an exemptImages list: an image is only exempted if its registry and name match and its tag appears in tags (the digest is ignored, any other tag is still checked). Exempted images are listed under "Exempted by configuration" in the output.

2. Third-party actions not pinned by SHA (GitHub provider)

This is the first fix to make on the GitHub provider, under the code ISSUE-701 ("Third-party action reference is not pinned by commit SHA"). A step whose uses: points to owner/action@v4 or owner/action@main stays mutable on the maintainer's side. If the action is compromised, like tj-actions/changed-files in March 2025 (CVE-2025-30066), your workflow silently runs the modified code with its secrets. Fix it by pinning on the commit SHA, with the tag as a comment:

.github/workflows/ci.yml
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1

Enable the control in the GitHub section. The option that exempts first-party actions is trustedOwners: it limits the initial signal to the third-party surface, the one GitHub does not maintain. The Pinning actions by SHA guide details the method and its maintenance, and the tj-actions/changed-files incident sheet (in French) tells the real-world scenario.

.plumber.yaml
github:
controls:
actionsMustBePinnedByCommitSha:
enabled: true
trustedOwners:
- actions
- github
- dependabot

3. Includes on main, master or HEAD (GitLab provider)

An include pointing at a mutable branch makes your pipeline hard to reproduce and can break without any change in your repository.

Before
include:
- project: security/templates
file: /pipelines/sast.yml
ref: main
After
include:
- project: security/templates
file: /pipelines/sast.yml
ref: v2.4.1

The associated control is includesMustNotUseForbiddenVersions with ISSUE-404. A tag beats a branch, but it can still be moved: for a complete guarantee, pin the commit SHA and keep the tag as a comment, as the Hardening your pipelines guide shows.

4. Unprotected main branch

If the default branch is not protected, a direct push or an unreviewed change can bypass your review practices. The control exists under both providers and returns ISSUE-501 (unprotected branch, Critical on the default branch, High elsewhere) or ISSUE-505 (non-compliant protection). On GitHub, it reads branch protection and rulesets; without the Administration:read right, it abstains and says so in the partialControls field of the JSON.

Minimal example
gitlab:
controls:
branchMustBeProtected:
enabled: true
defaultMustBeProtected: true
namePatterns:
- main
allowForcePush: false

A fifth very common error: Docker-in-Docker

Plumber also detects jobs that use the docker:dind service, under ISSUE-412 ("Docker-in-Docker service detected"). On shared runners, DinD requires privileged mode, which increases the risk of container escape and lateral movement. To build images without it, two daemonless tools exist, with different requirements on a Docker-executor runner. kaniko, taken from its maintained fork osscontainertools/kaniko (Google's repository has been archived since June 2025), builds with the default security profiles. Buildah fails with those profiles and needs relaxed seccomp and AppArmor filters. The GitLab registries guide gives both jobs and their settings. The control also exists on GitHub as ISSUE-413 (insecure daemon).

Which supply chain protections should you enable next?

Once the four basic errors are fixed, Plumber offers a family of 7XX controls dedicated to third-party actions, a supply chain attack vector that real incidents have demonstrated (tj-actions/changed-files in March 2025). These controls go further than simple pinning and are worth enabling as soon as your pipeline is stable.

Restricting the authorised action sources (ISSUE-713)

Pinning an action by SHA guarantees that it does not change, but not that it comes from a trusted author. The githubActionMustComeFromAuthorizedSources control flags any action whose owner is neither GitHub, nor your organisation, nor on your allow list, nor (if you set minimumStars) above the star threshold. It is the direct defence against repository squatting or an unknown action that would inherit your secrets. This is where trustGithubOfficialActions applies, and not in the pinning control.

.plumber.yaml
github:
controls:
githubActionMustComeFromAuthorizedSources:
enabled: true
trustGithubOfficialActions: true
trustSameOrgActions: true
# Minimum stars threshold (0 = disabled, needs the GitHub API)
minimumStars: 0
trustedGithubActions:
- docker/setup-buildx-action
- docker/login-action
- ossf/scorecard-action

Blocking actions carrying a known CVE (ISSUE-703)

The actionsMustNotCarryKnownCVEs control checks each pinned action against published security advisories. It is one of the rare cases where a dependency can open a Critical path: a published advisory on the pinned version is enough to lift the cap. The complementary actionsMustNotBeArchived control (ISSUE-702) flags actions whose upstream repository is archived. Both query the GitHub API: without a token, they are skipped and the analysis is incomplete.

.plumber.yaml
github:
controls:
actionsMustNotCarryKnownCVEs:
enabled: true
actionsMustNotBeArchived:
enabled: true

Closing the pull_request_target door (ISSUE-804)

The pullRequestTargetMustNotCheckoutHead control detects a workflow triggered by pull_request_target that does a checkout of the pull request HEAD. The unmerged code of an external contributor then runs with the repository secrets. The Securing pull_request_target guide details the safe patterns.

.plumber.yaml
github:
controls:
pullRequestTargetMustNotCheckoutHead:
enabled: true

Never letting an untrusted trigger write the cache (ISSUE-705)

The untrustedTriggersMustNotWriteCache control ("Untrusted trigger granted cache write") flags a job whose cache-mode is write or write-only under an untrusted trigger: pull_request_target, issue_comment or workflow_run. A cache written by such a job can later be restored by a privileged job. The fix is cache-mode: read, set at workflow level or under a job (fragment below). The control accepts two exemption lists: exemptWorkflows (pattern on the file name) and exemptJobs (pattern <workflow>/<job id>).

.github/workflows/ci.yml
on: pull_request_target
cache-mode: read # workflow level; the key can also sit under a job
jobs:
test:
runs-on: ubuntu-24.04

The fragment only shows where the key goes: a full workflow also carries its permissions: and its steps.

How do you write the configuration file?

The v2.0 schema organises the controls per provider: everything about GitLab CI/CD lives under gitlab.controls:, everything about GitHub Actions under github.controls:. The version: "2.0" key is mandatory. The Rego engine is the only evaluation engine, there is no engine: block. The controls reference lists every key.

Overlay or complete configuration?

There are two ways to write .plumber.yaml, and they do not behave the same. An overlay starts with extends: plumber:default and lists only what you change; every absent block inherits the base configuration and the controls added to the base turn on by themselves. A complete configuration, without extends, describes everything: an absent block is not run. The overlay is the normal usage.

Overlay (extends: plumber:default)Complete configuration
Absent blockInherits the baseControl not run
Maps (keys)Merged with the baseAs written
ListsReplace those of the baseAs written
includePlumberDefaultsActive (keeps the base trust lists)No effect

The trap sits on the lists line: writing trustedOwners: [actions] in an overlay replaces the base list instead of extending it. Generate the starting point with --overlay:

Terminal window
plumber config generate --overlay --output .plumber.yaml

The generated file contains the key extends: plumber:default, the version "2.0" and a commented override example. Here is a complete overlay that enables strict mode on digests and exempts an infrastructure image:

.plumber.yaml
extends: plumber:default
version: "2.0"
gitlab:
controls:
containerImageMustNotUseForbiddenTags:
containerImagesMustBePinnedByDigest: true
github:
controls:
githubActionMustComeFromAuthorizedSources:
includePlumberDefaults: true
trustedGithubActions:
- docker/setup-buildx-action

Which commands work around the configuration?

These commands read as three groups: validate and view inspect what Plumber understands of your file; resolve, slim and diff compare it with the base; generate and init create one. Note the --force of generate: without it, the command refuses to overwrite an existing .plumber.yaml.

Terminal window
plumber config validate # typos, unknown keys, schema
plumber config view # configuration as read, without comments
plumber config resolve # EFFECTIVE configuration, after merging with the base
plumber config slim # reduces a complete configuration to a minimal overlay
plumber config diff # differences with the embedded default
plumber config generate --output .plumber.yaml --force # full commented template
plumber config init # interactive wizard (terminal required)

config validate flags typos with a suggestion (Unknown control in gitlab.controls: "branchMustBeProtectd". Did you mean "branchMustBeProtected"?); with --fail-warnings, a warning exits with code 2. config resolve is the command to run when in doubt: it prints what Plumber really runs, with no file or after inheritance. config slim goes the other way, from a complete configuration to an overlay (comments are lost).

How do you migrate a schema v1 configuration?

If your .plumber.yaml is written in schema v1, with a top-level controls:, config validate answers legacy config schema detected and invites you to migrate. plumber config migrate rewrites the file to schema v2.0:

Terminal window
# Creates .plumber.yaml.v2 next to the original file
plumber config migrate
# Or replace in place (the original file goes to .plumber.yaml.bak)
plumber config migrate --in-place

The migration wraps the controls: block under gitlab.controls:, moves version: "1.0" to "2.0" and removes the engine: block, which the v2.0 schema does not have. It is idempotent: on a file already in v2.0, it answers Nothing to do. It also renames the control key releaseWorkflowsMustNotRestoreUntrustedCache to untrustedTriggersMustNotWriteCache.

How do you add Plumber to GitLab CI with the official component?

The official CI/CD component is the right entry point on GitLab (see its documentation). It is published in the catalogue under gitlab.com/getplumber/plumber/plumber and is referenced by the repository's Git tag, @v0.7.2: the @0.7.2 form is refused at resolution ("content not found"). For the strictest option, replace the tag with the commit SHA of the tag, with the version as a comment:

.gitlab-ci.yml
include:
- component: gitlab.com/getplumber/plumber/plumber@d364d54c7c045571d129252e4fb0cf2926c029fa # v0.7.2

First add the GITLAB_TOKEN token in Settings -> CI/CD -> Variables, masking it and limiting its scope to the plumber environment: the component job attaches to that environment, and the token stays invisible to the other jobs of the project. Then use this skeleton:

.gitlab-ci.yml
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
include:
- component: gitlab.com/getplumber/plumber/plumber@v0.7.2

This workflow:rules block avoids creating both a branch pipeline and a merge request pipeline on the same push. The job runs on merge requests, the default branch and tags, and by default uses the component's image, pinned by digest (getplumber/plumber@sha256:14698bde…).

Which settings does the component expose?

The inputs: block overrides the default values. Two settings matter first: stage, which takes the job out of .pre, and min_points (or min_score), the Plumber Score threshold below which the job fails (the score computation is detailed further down). Three groups of inputs complete the set: the target (project_path, branch, server_url, ci_config_path, filled from CI variables), the configuration (config_file, controls, skip_controls, fail_warnings), and the output files.

.gitlab-ci.yml
include:
- component: gitlab.com/getplumber/plumber/plumber@v0.7.2
inputs:
stage: test
min_points: 80 # fails below 80 points out of 100
config_file: .plumber.yaml
score_point: true # points breakdown in the log
environment_name: plumber # environment the token is restricted to

The exports are on by default: output_file (plumber-report.json), pbom_file (plumber-pbom.json), pbom_cyclonedx_file (plumber-cyclonedx-sbom.json) and glsast_file (gl-sast-report.json), the latter already uploaded as the sast report of the Security Dashboard. To turn off an export, give it an empty string. Other inputs exist: allow_failure, verbose, mr_comment, badge, score_push, score_endpoint, platform and platform_allow_http. The score input is a deprecated no-op: use score_point. The component has no input for the score profile (see below).

In which order does the component look for the configuration?

The component looks for the configuration in this order: the config_file input if set, then the .plumber.yaml file at the repository root, then the default configuration embedded in the image.

What if you write a manual job?

Keep this variant for specific needs. The image has ENTRYPOINT /plumber: with a script:, you must therefore neutralise the entrypoint (entrypoint: [""]), otherwise GitLab would run /plumber with your script as an argument.

.gitlab-ci.yml
plumber-scan:
stage: test
image:
name: getplumber/plumber:0.7.2@sha256:14698bde5dbc40fe2b5b9d339b039084b18f3b195e2fba0ceef9ff05ec69654c
entrypoint: [""]
script:
- /plumber analyze --gitlab-url "$CI_SERVER_URL" --project "$CI_PROJECT_PATH" --branch "$CI_COMMIT_REF_NAME" --glsast gl-sast-report.json --score-point
artifacts:
when: always
reports:
sast: gl-sast-report.json

If you want to add --mr-comment and --badge, split them into two jobs: the merge request comment only makes sense in an MR pipeline, and the badge only updates on the default branch.

How do you use the component on a self-hosted GitLab?

A self-hosted GitLab cannot consume the gitlab.com component directly. The vendor documentation offers two methods: import the repository https://gitlab.com/getplumber/plumber.git, or fork it and sync it by mirror (the recommended method, since updates follow). In both cases, enable the CI/CD Catalog in the project, publish a release on an existing tag, then consume the local component:

.gitlab-ci.yml
include:
- component: gitlab.example.com/infrastructure/plumber/plumber@v0.7.2

For a complete guarantee, pin the commit SHA of the mirror (that of tag v0.7.2 on gitlab.com is d364d54c7c045571d129252e4fb0cf2926c029fa) with the version as a comment. The SHAs of the GitLab mirror and of the GitHub repository differ.

How do you add Plumber to GitHub Actions with the official action?

The getplumber/plumber GitHub action (see its documentation) is a composite action: it downloads the binary of the requested version, verifies its checksum and its provenance attestation (SLSA), runs the analysis, uploads the SARIF report to the Security tab and publishes the reports as an artifact. Like any uses:, it is pinned on the release commit SHA, with the tag as a comment.

.github/workflows/plumber.yml
name: plumber
on:
push:
branches: [main]
pull_request:
permissions: {}
jobs:
plumber:
runs-on: ubuntu-24.04
permissions:
contents: read
actions: read
security-events: write
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- uses: getplumber/plumber@ccd274c2abc9f66d7e44051d612d49c8ed1747ac # v0.7.2
with:
min-score: B

The minimal permissions are contents: read (the checkout), actions: read (read the workflow states and one run log to prove the real scope of the GITHUB_TOKEN) and security-events: write (SARIF upload). Add id-token: write only if you publish the score with score-push. On a private repository, the SARIF upload requires GitHub Advanced Security; otherwise turn it off with upload-sarif: false.

The main inputs carry the same names as the CLI options, with hyphens: min-points, min-score, config-file, controls, skip-controls, fail-warnings. Others tune the outputs: upload-sarif, upload-artifacts (30 days retention), output, pbom, pbom-cyclonedx, sarif. The action outputs passed, report and sarif. Three inputs deserve an explanation:

  • github-token: the workflow GITHUB_TOKEN by default. A refused read is never an error: the fact concerned stays unknown in the score;
  • soft-fail: true: code 1 (threshold not met) no longer fails the job, but codes 2 and 3 still fail;
  • score: unlike the GitLab component, the score input of the action does enable the detailed breakdown (--score-point).

The version input defaults to v0.7.2 and verify-attestation to true: leave the verification on.

How do you export a PBOM and analyse it?

The PBOM (Pipeline Bill of Materials) is the inventory of your pipeline's dependencies. On GitLab, it lists the images (image: and services:), components, templates and includes. On GitHub, it lists the containers (container: and services:), the third-party actions (uses: owner/repo@ref) and the reusable workflows. For composite actions and workflows from other repositories, the PBOM keeps the provenance: the nested field marks a dependency found inside another, and via gives the chain.

Terminal window
plumber analyze \
--pbom plumber-pbom.json \
--pbom-cyclonedx plumber-cyclonedx-sbom.json

When should you use each format?

The two files describe the same pipeline, but not for the same reader. The native PBOM keeps Plumber-specific metadata; CycloneDX (version 1.5, JSON) loses that detail in exchange for a format that Trivy, Grype or Dependency-Track consume directly. Nothing stops you from generating both. The vendor presents the PBOM as an early-stage feature, with no recognised standard for pipeline inventories.

FormatWhen to use itWhat it contains
Native PBOMYou want to understand the pipeline in detailRich Plumber metadata, including nested and via
CycloneDXYou want to plug in another toolStandard format for Trivy, Grype or Dependency-Track

To get the inventory alone, without evaluating the controls, add --no-controls: Plumber collects and writes the inventory files (PBOM, JSON, CSV, OCSF) but returns no verdict and no score, and exits with code 0 if the collection is complete. The option is incompatible with --controls and --skip-controls.

Scanning the CycloneDX file with Trivy

The sbom subcommand takes the file as input without re-downloading the images; the --severity filter limits the output to the levels that justify immediate action.

Terminal window
trivy sbom plumber-cyclonedx-sbom.json --severity HIGH,CRITICAL

Scanning the CycloneDX file with Grype

The sbom: prefix tells Grype that the argument is an inventory and not an image, and --fail-on high makes the command exit with a non-zero code, which breaks the CI job as soon as a vulnerability of that level appears.

Terminal window
grype sbom:plumber-cyclonedx-sbom.json --fail-on high

How do you feed the findings into security dashboards?

The PBOM inventories the pipeline; to make the gaps show up in your platforms, Plumber produces standardised findings reports. You generate them by adding a flag to plumber analyze, each writing to a file:

OptionFormatUse
--sarifSARIF 2.1.0GitHub Code Scanning (Security tab)
--glsastGitLab SAST (schema 15.0.4)GitLab Security Dashboard and merge request widget
--csvCSVOne row per control, plus one per failing finding: spreadsheet
--ocsfOCSF 1.8.0 (Compliance Finding)Security observability tools that read OCSF
--outputJSONFull report, readable again with plumber explain --run
Terminal window
plumber analyze --sarif plumber.sarif --glsast gl-sast-report.json --csv plumber.csv

These formats do not replace reading the summary: they serve to keep a history of the findings and to cross-reference them with the other scanners already wired into your dashboards. In a SARIF file, the rule is the issue code, the level follows the contextual severity, and the plumber/baseSeverity property keeps the code's own severity.

How do you understand a code or a path with plumber explain?

plumber explain is the reflex command when facing an unknown ISSUE-XXX: it works offline, without configuration or repository, and the ISSUE- prefix can be omitted.

Terminal window
plumber explain ISSUE-412 # shortcut: plumber explain 412
plumber explain --list # compact list of codes
plumber explain --all # exhaustive reference
plumber explain 701 --json # JSON output you can script

It returns the description, the remediation and the link to the code's documentation. The JSON adds the control name (controlName), the code's role (role), the entry type (entryKind) and, for a nested finding, the remediation to apply to the chain (nestedRemediation).

explain also re-reads an attack path of the last scan, with its claims (see the score section):

Terminal window
plumber explain -a 1 # path number 1 of the last scan
plumber explain -a all # all paths
plumber explain -a 1 --run plumber-report.json # re-reads a CI JSON report
plumber explain -a 1 --project nektos/act --provider github

The -a N option is only valid if the scan has at least N paths: on a run with a single path, explain -a 3 answers with an error (code 2) that states the number of available paths. Each scan keeps its JSON in the user cache (~/.cache/plumber/runs/<provider>/<owner>/<repo>.json, readable only by you), so a path can be re-read without running the analysis again. For a scan done in CI, the --run option reads the JSON report retrieved as an artifact.

Another useful command for third-party tooling: plumber catalog prints the catalogue of controls and issues of your version as JSON.

How does Plumber compute the score?

The Plumber Score (the scoring-v4 profile, the default) starts at 100 points and takes off a fixed price for each attack path, then a lower price for each individual finding, that is a problem no path uses. A path reads in three steps: an entry (an action, an image, a user input injected into a script, an unprotected branch), the job where that code runs, and what it reaches (secrets, write token, publication, deployment). The letter is read from the final points, with fixed thresholds.

LetterPointsWhat the letter means
A90 to 100No notable exposure
B71 to 89Minor exposure
C51 to 70Exposure to fix
D31 to 50Significant accumulated exposure
E0 to 30A Critical attack path remains, or very heavy losses

What is the price of each level?

The level of a path depends on what it reaches, and only proven facts count. It is Critical when a secret or write token is proven, and either a proven change (publication, deployment, write to the repository) or an entry controlled by whoever opens a pull request comes with it. A declared token that can write contents, packages or deployments counts as both a privilege and a change: a contents: write job reached by such an entry, under a privileged trigger such as pull_request_target, is therefore Critical (on pull_request, a fork pull request only gets a read-only token). The path is High when a proven change, or a proven secret or write token, is reached on its own. A pull request entry with no proven secret, write token or change stays Low, like any path where code runs but nothing proven is reached. The table gives the prices.

LevelPrice of an attack pathPrice of an individual finding
Critical3020
High1510
Medium65
Low32

A dependency that is merely badly pinned (mutable tag, action without SHA) is capped at Medium, since its publisher must be compromised first; the cap rises to High when the source is outside your authorised sources. A known bad dependency (published advisory, commit outside the action's repository) has no cap. A finding used by a path costs nothing more: the displayed severity is that of the path, and the JSON keeps the code's own severity in baseSeverity.

How do the limits protect the grade?

Three limits prevent an accumulation of small findings from collapsing the score.

  • Individual findings cost 30 points in total, at most, the most serious first: on their own, they can never push a repository down to E.
  • A nested limit applies to everything that is not Critical: Low items count for 29 points at most, Medium and Low together for 49, High, Medium and Low together for 69. With no Critical at all, a repository therefore keeps at least 31 points (D), at least 51 (C) with no High, at least 71 (B) with nothing above Low.
  • Only a Critical path forces the E: it caps the score at 30 points. An isolated Critical finding costs its 20 points and forces nothing.

What is proven, assumed or unknown?

Every fact a path rests on is a claim that carries a state. proven: all the facts are settled. assumed: it rests on a value taken by default for lack of a signal, for example the GITHUB_TOKEN of a repository whose real write Plumber could not read. unknown: a fact could not be decided (refused read, unresolved reference). Only the proven moves a tier: the assumed and the unknown stay displayed in the path's reach, without changing its level. In the pipeline-craft example, this is what makes the paths Low: the secrets could not be listed.

The Note lines explain the gap: Plumber assumed the token can write: … for an assumed state, Plumber could not read: … for an unknown one, and plumber explain -a N lists all the claims under Claims. Plumber also asks three questions per job: who can trigger it (an outsider, after a maintainer's approval, only this repository), what it holds (secrets by name, token) and whether it runs (a disabled workflow, an always-false if: or a workflow_call never called form no path). A token without a permissions block counts as held, never as a change. The full detail is in the official score documentation.

Can you use another formula?

The scoring-v3 profile awards points by code severity, without attack paths. It is chosen with --score-profile v3 or the variable PLUMBER_ANALYZE_SCORE_PROFILE=v3, and the profileId field of the JSON tells which profile was used. On the nektos/act commit scanned above, this profile gives 28.0 points, E against 55 points, C for the default profile: a profile ranks a repository that accumulates Medium findings more harshly. Only the CLI exposes this option: the GitLab component and the GitHub action have no input for the profile.

How do you choose the threshold that fails the job?

The score is the only exit gate: it drives the return code through --min-points (0-100) or --min-score (letter A to E). The default is --min-points 100, so the slightest finding fails the job (FAILED (gate blocks at 100 pts)). Set a realistic threshold if you accept a residue: --min-points 80 fails below 80, --min-score B fails on C, D and E. Set alone, --min-score decides alone (the 100-point default does not apply); set together, both must pass.

Terminal window
plumber analyze --min-points 80 # fails below 80 points out of 100
plumber analyze --min-score B # fails below a B

Three special cases surprise people. A GitHub repository with no workflow at all passes the threshold if the enabled controls report nothing; it fails if no control was evaluated (configuration with no section for the provider, a filter that discards everything), with Status: NOTHING CHECKED (no control was evaluated). The --threshold option is deprecated. Finally, in Platform mode, the --min-*, --controls and --skip-controls options are ignored with a warning.

How do you target only certain controls?

These two flags expect control names separated by commas, not issue codes, and they exclude each other. They serve to isolate a fix in progress; do not leave them in the CI job, or you stop measuring the discarded controls.

Terminal window
# Only the images and branch protection
plumber analyze --controls containerImageMustNotUseForbiddenTags,branchMustBeProtected
# Everything except branch protection
plumber analyze --skip-controls branchMustBeProtected

Each CLI option has its environment variable counterpart, of the form PLUMBER_ANALYZE_<OPTION> (for example PLUMBER_ANALYZE_MIN_POINTS=80); command-line options take precedence.

Merge request comments and project badges

With the GitLab component, enable them like this:

.gitlab-ci.yml
include:
- component: gitlab.com/getplumber/plumber/plumber@v0.7.2
inputs:
mr_comment: true
badge: true

Plumber Radar: how do you check a supplier's CI/CD hygiene?

Plumber Radar is a public page on getplumber.io that publishes the Plumber Score of open source projects scanned continuously, with the CLI and a study configuration whose YAML can be read on the page. You read it without an account at getplumber.io/radar. Before adding a supplier's action or image to your allow list, you see how that supplier protects its own pipelines. The list can be filtered by provider, by configuration, by activity, and by whether it includes archived repositories and forks.

The most useful view for judging a supplier is the organisation report, which aggregates all its public projects. It opens by clicking an organisation's name, or through a URL of the form https://getplumber.io/radar?q=<organisation>/&provider=github&report=1.

Plumber Radar report for the docker organisation on 14 October 2026: 53 public projects, 21 attack paths including 1 Critical, 8 High and 12 Medium, a grade distribution of 15 A, 19 B, 16 C, 2 D and 1 E, what an attacker could do (read secrets, push code, publish packages) and how they would get in

This report on the docker organisation (screenshot of 14 October 2026) reads from top to bottom. The banner gives the number of attack paths per level, the chart the grade distribution of the 53 projects. The "What an attacker could do" block says what an attacker would reach, and "How they could get in" the entries they would use, each with its level. For a Critical path, the page summarises the risk but withholds the details. The figures move with every scan: only the live page is authoritative.

Three precautions keep you from over-interpreting these figures.

  • It is a dated snapshot: each row shows the date of its last scan, the projects were not all scanned by the same Plumber version, and the grade moves with every commit of the supplier.
  • Radar judges the supplier's pipeline, not its code: for maintenance, review and project governance, cross-check with OpenSSF Scorecard, and for a full third-party assessment approach, with the TPRM guide for technical teams.
  • A good grade does not replace pinning: even an action graded A is pinned by commit SHA in your workflows.

When should you move to the Platform?

The Platform is not the right starting point for a beginner. It becomes relevant when you must track several projects over time, have a centralised dashboard, manage policies shared by several teams and be alerted to drift. With --platform <url> (the platform input of the component and of the action), the CLI pushes the whole result to the Platform through OIDC; this mode takes precedence over --score-push and makes the local thresholds inert.

If your need fits in "I want to understand and secure my pipeline", stay on the CLI, the GitLab component or the GitHub action. If your need becomes "I want to govern a portfolio of projects", look at the Platform.

Appendix: the issue codes by family

Plumber 0.7.2 documents 76 issue codes in nine families, each with a description and a remediation available through plumber explain ISSUE-XXX. The largest family is 4XX (20 codes: jobs, includes, components, Docker-in-Docker, naming), followed by 2XX (14 codes); the 7XX family dedicated to third-party actions has 15. For the exact list of your installation, use plumber explain --list, which prints one line per code, or plumber catalog for the JSON. The online issue index describes them too.

The table gives the reading grid to identify the family of a reported issue:

FamilyRangeCoversExamples
Container imagesISSUE-1XX (3 codes)Sources, tags, digest101 unauthorised source, 102 forbidden tag, 103 image not pinned by digest
Execution and expressionsISSUE-2XX (14 codes)Variables, injection, conditions203 debug trace, 207 expression injection, 209 write to $GITHUB_ENV, 213 toJson(github)
Secrets and tokensISSUE-3XX (8 codes)Leaks, secrets: inherit, tokens302 secrets: inherit, 307 persisted credentials, 309 toJson(secrets)
Jobs, templates and structureISSUE-4XX (20 codes)Jobs, includes, components, DinD, OIDC, naming404 mutable include, 410 weakened security job, 412 DinD, 414 component from unauthorised source, 421 publish with static token instead of OIDC, 422 workflow without name:
Branch protection and reviewISSUE-5XX (6 codes)Branch protection, approval rules501 unprotected branch, 504 no approval rule on protected branches, 505 non-compliant protection
GitLab security policyISSUE-6XX (1 code)Linked security policy project601 security policy project missing or wrong
Third-party actions (supply chain)ISSUE-7XX (15 codes)Pinning, sources, CVEs, archiving, remote code, cache701 action not pinned by SHA, 703 known CVE, 705 untrusted trigger with cache write, 706 FROM not pinned by digest, 713 unauthorised source, 714 mutable remote code
Permissions and triggersISSUE-8XX (4 codes)permissions:, triggers801 no explicit permissions:, 804 booby-trapped pull_request_target
Repository hygieneISSUE-9XX (5 codes)Update tooling, scanners, SECURITY.md903 no update tool, 904 no static scanner, 905 no SECURITY.md

The 7XX family concentrates the supply chain protections against compromised third-party actions. The 8XX and 9XX families are almost exclusively GitHub: they cover risks specific to the Actions ecosystem (GITHUB_TOKEN permissions, update tooling, scanners, SECURITY.md).

Troubleshooting

Before going through the table, keep two points in mind: without a token, the analysis is incomplete (code 3), and the default min-points 100 fails the job on the first finding.

SymptomLikely causeSolution
Status: INCOMPLETE (data collection failed), exit code 3, no scoreToken missing or refused: the API could not read branch protection, environments or workflow statesExport GH_TOKEN or GITLAB_TOKEN (or gh auth login), with the rights listed in the prerequisites
Auth none, running in degraded modeNo token detectedSame: only the controls on workflow content run
Could not verify on actionsEnrichment through the GitHub API skipped (CVEs, archived repository, stars)Provide a token; PLUMBER_METADATA_TOKEN resolves third-party action versions
GITLAB_TOKEN environment variable is required for GitLab analysisVariable missing on the GitLab provider sideExport GITLAB_TOKEN before plumber analyze
401 Unauthorized (GitLab)Incomplete or invalid tokenCheck read_api and read_repository
403 Forbidden on MR comment or on the badgeInsufficient scope or roleUse the api scope (and a Maintainer role for the badge)
Status: FAILED (gate blocks at 100 pts) despite a good letterDefault threshold min-points 100: the slightest finding failsNormal; set --min-points or --min-score if you accept a residue
Status: NOTHING CHECKED (no control was evaluated)No control evaluated (configuration without a section for this provider, a filter that discards them all)Check .plumber.yaml, --controls and --skip-controls
unknown key 'controls' at root or legacy config schema detectedConfiguration in schema v1Run plumber config migrate
Unknown control in gitlab.controls: …Typo in a control nameTake the Did you mean … suggestion; config validate repeats it
Error: the run in …/runs/… has 1 attack path with explain -a 3The scan does not have that many pathsAsk for -a 1, or -a all
--threshold is deprecated warningThreshold expressed as a percentageSwitch to --min-points or --min-score
The component does not runJob in .pre with no other normal stageForce stage: test
Two pipelines on the same pushworkflow:rules missingAdd the quick-start block
The manual job fails at startupEntrypoint /plumber active with a script:Add entrypoint: [""] to the image
The project is not auto-detectedGit remote missing or misnamedCheck origin, pass an owner/repo target or --gitlab-url / --github-url and --project
contextual score unavailable, scoring-v3 used warningPlumber could not establish the pipeline factsThe score follows the points-per-severity profile; the profileId field of the JSON confirms it

Key points

  • Plumber scans the security of your GitLab CI/CD and GitHub Actions pipelines from the same CLI; the GitLab component and the GitHub action share the same version number (0.7.2)
  • A token is required, even on a public repository: without it, the analysis is incomplete, the score is withheld and the exit code is 3
  • The v2.0 schema separates controls by provider; an overlay (extends: plumber:default) lists only your changes, and its lists replace those of the base
  • The job fails through the Plumber Score: --min-points (default 100) or --min-score; exit codes 0 success, 1 threshold not met, 2 error, 3 incomplete analysis
  • Start by fixing unpinned images (ISSUE-103), actions not pinned by SHA (ISSUE-701), mutable includes (ISSUE-404) and unprotected branches (ISSUE-501)
  • Then enable the supply chain protections: authorised sources (ISSUE-713), known CVEs (ISSUE-703), pull_request_target (ISSUE-804) and cache written by an untrusted trigger (ISSUE-705)
  • Pin Plumber itself: image getplumber/plumber:0.7.2@sha256:… with entrypoint: [""], component @v0.7.2, action by commit SHA with # v0.7.2
  • The score is computed by attack paths; only the proven moves a tier, individual findings cost 30 points at most and only a Critical path forces the E
  • The PBOM inventories the pipeline; CycloneDX plugs into Trivy and Grype; --sarif, --glsast, --csv and --ocsf feed your dashboards
  • plumber explain details a code offline and, with -a N, a path of the last scan (valid if the scan has at least N)
  • Plumber Radar shows, without an account, the CI/CD posture of the open source organisations whose actions or images you adopt
  • 76 issue codes in nine families; the exact list always comes from plumber explain --list on your version

Check your understanding

Check that you have absorbed the essentials of this guide. The questions only cover what has just been explained here.

Knowledge check

Check what you have learned with this interactive quiz

6 questions
6 min
70% to pass

How it works

  • The timer starts when you click Start
  • Multiple choice, true/false and short answer questions
  • You can move between questions
  • Detailed results are shown at the end

Starts the quiz and the timer

FAQ: frequent questions

These questions come up systematically before adoption: what the tool does, what it costs, what it brings compared with the scanners already in place, whether it touches your files and how it fails a pipeline.