PBOM Command
The pbom command generates a Pipeline Bill of Materials (PBOM) that inventories all container images and CI include references used in a GitLab project’s CI/CD pipeline. Use it to audit supply chain dependencies in your pipelines.
Basic Usage
Section titled “Basic Usage”gogatoz pbom --project <path-or-id> [options]Authentication:
export GITLAB_TOKEN=glpat_xxxexport GITLAB_URL=https://gitlab.com # optional, defaults to https://gitlab.comYou can also pass –token and –gitlab-url flags explicitly.
Options
Section titled “Options”Project selection:
--projectProject ID or path-with-namespace (required)--refGit ref to scan (default: project default branch)
Output:
-f, --formatOutput format:jsonorcyclonedx(default:json)-o, --outputOutput file path (default: stdout)
Include resolution:
--follow-includesResolve includes transitively (default: true)--include-depthDepth for include resolution (default: 2)--allow-remote-includesAllow resolving remote includes (default: false)--remote-allowlistComma-separated host allowlist for remote includes--remote-max-bytesMax bytes per remote include (default: 1048576 / 1 MiB)--remote-timeoutTimeout per remote include fetch (default: 10s)
Global flags (–token, –gitlab-url, –verbose, –insecure-skip-tls-verify, –ca-cert, rate/HTTP tuning) apply as usual.
Examples
Section titled “Examples”Generate PBOM in native JSON format
Section titled “Generate PBOM in native JSON format”gogatoz pbom --project root/my-projectCycloneDX 1.5 SBOM format
Section titled “CycloneDX 1.5 SBOM format”gogatoz pbom --project root/my-project --format cyclonedxSave to file
Section titled “Save to file”gogatoz pbom --project root/my-project --format cyclonedx -o pipeline-sbom.jsonScan a specific branch
Section titled “Scan a specific branch”gogatoz pbom --project root/my-project --ref developIntegrate with vulnerability scanners
Section titled “Integrate with vulnerability scanners”# Generate CycloneDX SBOM and scan with Grypegogatoz pbom --project root/my-project --format cyclonedx -o sbom.jsongrype sbom:sbom.jsonWhat’s in a PBOM
Section titled “What’s in a PBOM”The PBOM inventories:
- Container images – every
image:reference in the pipeline, with registry, tag, and digest information. Flags mutable tags (:latest,:stable) and unpinned images. - CI includes – all
include:references: local files, project refs, remote URLs, templates, and components. Shows the full include tree with transitive resolution. - External scripts – remote script references executed via
curl | bashor similar patterns.
CycloneDX Integration
Section titled “CycloneDX Integration”The --format cyclonedx output produces a valid CycloneDX 1.5 SBOM that integrates with:
- Dependency-Track for vulnerability monitoring
- Grype/Trivy for image vulnerability scanning
- OWASP toolchain for supply chain security
- The PBOM command only reads pipeline configuration; it does not trigger any pipelines or modify projects.
- Include resolution uses the same engine as enumerate, with the same guardrails (allowlist, size/time limits).
- The CycloneDX output follows the 1.5 specification and can be validated with the CycloneDX CLI tool.