Repository navigation
Software Supply Chain Tooling Lab
Last reviewed: 2026-11-28 (26 of 26 cases passed in CI run 46226817429; synthetic, illustrative fixtures only)
Prerequisites: Software supply-chain assessment ยท Container security index ยท Linux with unshare and Python 3.12 for a local run.
Important
Scope & safety: every case runs a pinned tool against synthetic, illustrative fixtures committed in this folder: a one-line Python requirements.txt in a vulnerable and a patched version, a generated one-layer OCI image, a short text artifact and two sample workflow files. The tools run inside unshare -rn, a network namespace with no interfaces up, and the first case checks that a connection to the RFC 5737 address 192.0.2.1 fails there. Signing uses throwaway key pairs created in a temporary directory and a signing config with no transparency log, so nothing is written to Rekor or Fulcio. The only data download is the Grype vulnerability database, fetched by the CI workflow before the tools run. URLs in the fixtures use example.test. Scan only projects, images and repositories you are authorized to assess.
Record what five pinned supply-chain tools actually do on known inputs, so the guidance in the assessment workflow can point at observed exit codes and output instead of documentation alone:
- Syft builds SPDX and CycloneDX SBOMs from a source directory and from an OCI image archive.
-
Grype matches one published advisory, GHSA-8q59-q68h-6hv4 (CVE-2020-14343, PyYAML
< 5.4, critical), against a vulnerable pin and a patched pin. - Cosign signs and verifies a blob with a key pair, and attests SLSA provenance for it, with no transparency log.
- zizmor and actionlint lint a deliberately unsafe and a hardened GitHub Actions workflow sample.
run_lab.py reads manifest.json and runs each case with the real tool. It compares the exit code and the parsed output with the case's expectation, then writes an evidence manifest. The manifest holds the tool versions, the SHA-256 of every input, the expected and observed result per case, and the Grype database status. The runner exits non-zero on any mismatch, tool error, input hash mismatch or tool version that differs from the pin. With --require-complete, a case that did not run also fails.
install_tools.py downloads the pinned Syft, Grype, Cosign and actionlint release assets from GitHub. It checks each asset against the SHA-256 in manifest.json before unpacking, and refuses any mismatch. zizmor is installed from PyPI with pip --require-hashes through requirements-supply-chain.txt.
| Path | Content |
|---|---|
fixtures/python-vulnerable/requirements.txt |
PyYAML==5.3.1, affected by GHSA-8q59-q68h-6hv4 |
fixtures/python-patched/requirements.txt |
PyYAML==5.4.1; 5.4 is the advisory's first patched version |
fixtures/signing/artifact.txt |
The blob that is signed and attested |
fixtures/signing/slsa-provenance-predicate.json |
A SLSA v1 provenance predicate with the Build L1 required fields (buildDefinition.buildType, externalParameters, runDetails.builder.id), all on example.test
|
fixtures/workflows/bad-workflow.yml |
Unsafe sample: pull_request_target, checkout of the PR head, job-level permissions: write-all, actions/checkout@v4 by tag, and ${{ github.event.pull_request.title }} inside run:
|
fixtures/workflows/good-workflow.yml |
Hardened sample: pull_request, contents: read, SHA-pinned checkout with persist-credentials: false, title passed through env:
|
manifest.json |
Tool pins with asset SHA-256, the advisory, the OCI fixture spec and its expected digests, 26 cases, and the SHA-256 table |
run_lab.py |
Stdlib runner. It also generates the OCI image archive byte-for-byte deterministically |
install_tools.py |
Stdlib downloader with SHA-256 checks; --from-dir installs from assets you already downloaded |
evidence/ci-run-<id>.json |
Evidence downloaded from a CI run, named by run ID |
The sample workflows live here, not in .github/workflows, so GitHub never runs them.
| Tool | Version | Asset & SHA-256 | Source |
|---|---|---|---|
| Syft | 1.57.2 |
syft_1.57.2_linux_amd64.tar.gz ad92bd3eโฆ2706b
|
Release asset, matches syft_1.57.2_checksums.txt
|
| Grype | 0.122.1 |
grype_0.122.1_linux_amd64.tar.gz f1ba7e29โฆ37538
|
Release asset, matches grype_0.122.1_checksums.txt
|
| Cosign | 3.1.6 |
cosign-linux-amd64 318a99adโฆa94c6
|
Release asset, matches cosign_checksums.txt
|
| actionlint | 1.7.12 |
actionlint_1.7.12_linux_amd64.tar.gz 8aca8db9โฆ49a3d8
|
Release asset, matches actionlint_1.7.12_checksums.txt
|
| zizmor | 1.33.1 |
zizmor-1.33.1-py3-none-manylinux_2_28_x86_64.whl 49eb92a9โฆe151
|
PyPI JSON API |
The Syft, Grype and Cosign releases also publish a Sigstore bundle for their checksums file (*_checksums.txt.sigstore.json). The actionlint 1.7.12 release has no such bundle, only actionlint_1.7.12_checksums.txt. Verifying the bundles needs the public Sigstore TUF repository, so this lab pins the asset hashes instead and does not verify any signatures.
.github/workflows/supply-chain-lab.yml runs on pull requests and pushes that touch this folder, the test module or the workflow, and on workflow_dispatch. Its push trigger has no branch filter, like guide-tests.yml, so a feature branch gets a run before it has a pull request. It has permissions: contents: read, uses no secrets and requests no id-token. On ubuntu-24.04 with Python 3.12 it does the following:
- Run
tools/tests/test_supply_chain_lab.pywithPNWC_SUPPLY_CHAIN_PRODUCING_EVIDENCE=1, which skips only the stale-evidence check. - Install the pinned binaries with
install_tools.py, and zizmor withpip --require-hashes --only-binary=:all:. - Allow unprivileged user namespaces (Ubuntu 24.04 restricts them through AppArmor) and check that
unshare -rn trueworks. - Download the Grype database with
grype db updateinto$RUNNER_TEMP/grype-db. - Run
run_lab.py --require-complete, then uploadsupply-chain-evidence.jsonas the artifactsupply-chain-evidence-<run id>.
guide-tests.yml runs the same test module without the skip, so committed evidence that no longer matches the inputs fails there. It runs on every pull request, but on push only when tools/** changes: a push that touches only this folder does not trigger it, and the stale-evidence check for this lab has not yet run in CI.
python3 -B ContainerSecurity/labs/supply-chain/install_tools.py --dest /tmp/sc-bin
python3 -m venv /tmp/sc-venv
/tmp/sc-venv/bin/pip install --require-hashes --only-binary=:all: \
-r ContainerSecurity/labs/supply-chain/requirements-supply-chain.txt
# Optional and network-using: GRYPE_DB_CACHE_DIR=/tmp/sc-grype-db /tmp/sc-bin/grype db update
python3 -B ContainerSecurity/labs/supply-chain/run_lab.py --bin-dir /tmp/sc-bin \
--zizmor /tmp/sc-venv/bin/zizmor --grype-db-dir /tmp/sc-grype-db \
--evidence /tmp/supply-chain-evidence.json
python3 -B -m unittest tools/tests/test_supply_chain_lab.py -vWithout a downloaded database, the three database-backed vuln cases fail, as they should. Use --kinds sbom,signing,attestation,lint to leave them out. A local run writes evidence_origin: local-observed, and only CI output (ci-observed) is committed.
These are the expectations in manifest.json, not observations. The table below them is filled in only from committed CI evidence.
| Case | Kind | Expectation |
|---|---|---|
isolation-probe |
isolation | Connecting to 192.0.2.1:443 fails with ENETUNREACH inside the sandbox |
sbom-dir-vulnerable |
sbom |
syft scan dir: writes SPDX SPDX-2.3 (creator Tool: syft-1.57.2) and CycloneDX 1.7; the only purl is pkg:pypi/pyyaml@5.3.1
|
sbom-dir-patched |
sbom | CycloneDX lists exactly pkg:pypi/pyyaml@5.4.1
|
sbom-oci-archive |
sbom |
syft scan oci-archive: finds zlib1g 1:1.2.13.dfsg-1 from the dpkg status file; the CycloneDX metadata component is a container whose version is the generated manifest digest |
negative-sbom-oci-dot-entry |
sbom | An archive whose first member is ./ (what tar -C dir -cf x.tar . produces) is refused with exit 1 and "potential path traversal" |
vuln-db-status |
vuln |
grype db status -o json reports valid: true
|
vuln-positive-pyyaml-5.3.1 |
vuln | GHSA-8q59-q68h-6hv4 is reported for pyyaml 5.3.1, and --fail-on critical exits 2 |
vuln-negative-pyyaml-5.4.1 |
vuln | GHSA-8q59-q68h-6hv4 is not reported for pyyaml 5.4.1, and --fail-on critical exits 0 |
negative-vuln-no-db |
vuln | With an empty database cache and auto-update off, Grype exits 1 with "database does not exist": a tool error, not a clean scan |
signing-config-no-tlog |
signing |
cosign signing-config create with no services gives empty rekorTlogConfig and tsaConfig
|
signing-generate-key-pairs |
signing | Two encrypted key pairs (ENCRYPTED SIGSTORE PRIVATE KEY) |
signing-sign-blob-no-tlog |
signing |
sign-blob --key --signing-config writes a v0.3 bundle whose verificationMaterial holds only publicKey, with no tlog entry |
signing-verify-blob |
signing |
verify-blob --key --insecure-ignore-tlog=true prints "Verified OK" |
negative-verify-tampered-blob |
signing | One appended line makes verification fail with "invalid signature" |
negative-verify-wrong-key |
signing | An unrelated public key fails with "failed to verify signature" |
negative-sign-wrong-password |
signing | A wrong COSIGN_PASSWORD fails with "decryption failed" |
documented-sign-default-needs-sigstore |
signing | With no signing config, sign-blob tries to fetch the public TUF signing config (which includes Rekor) and fails offline. Runs only if isolation-probe passed |
documented-verify-default-needs-sigstore |
signing | Without --insecure-ignore-tlog, verify-blob needs the public trusted root and fails offline. Runs only if isolation-probe passed |
attest-blob-slsa-provenance |
attestation |
attest-blob --type slsaprovenance1 writes a DSSE envelope (application/vnd.in-toto+json). The Statement is https://in-toto.io/Statement/v0.1 with predicate type https://slsa.dev/provenance/v1 and the artifact's SHA-256 as subject |
attest-verify |
attestation |
verify-blob-attestation --type slsaprovenance1 prints "Verified OK" |
negative-attest-wrong-type |
attestation |
--type spdxjson fails with "invalid predicate type" |
negative-attest-tampered-blob |
attestation | A changed artifact fails with "provided artifact digests do not match digests in statement" |
lint-zizmor-bad-workflow |
lint |
zizmor --offline reports artipacked, dangerous-triggers, excessive-permissions, template-injection and unpinned-uses, and exits 14 (highest finding high) |
lint-zizmor-good-workflow |
lint | No findings, exit 0 |
lint-actionlint-bad-workflow |
lint |
"github.event.pull_request.title" is potentially untrusted ... [expression], exit 1 |
lint-actionlint-good-workflow |
lint | No output, exit 0 |
Evidence: evidence/ci-run-46226817429.json, downloaded from the supply-chain-evidence-46226817429 artifact of CI run 46226817429 (commit 711221d).
-
Runner: Python 3.12.16 on
Linux-7.0.0-1020-azure-x86_64-with-glibc2.39, tools sandboxed withunshare -rn. - Tools: Syft 1.57.2, Grype 0.122.1, Cosign 3.1.6, zizmor 1.33.1 and actionlint 1.7.12, all matching the pins.
-
Grype database: schema
v6.1.10, built2026-11-28T06:20:09Z, downloaded fromgrype.anchore.iobygrype db updatewith checksumsha256:20e87ecaโฆcc99a7(fromgrype db status). - Summary: 26 of 26 cases passed, with input hashes and tool versions matching the manifest.
| Case | Kind | Observed output | Observed |
|---|---|---|---|
isolation-probe |
isolation | rc 0, isolated: ENETUNREACH
|
observed pass |
sbom-dir-vulnerable |
sbom | rc 0, SPDX-2.3 + CycloneDX 1.7, pkg:pypi/pyyaml@5.3.1
|
observed pass |
sbom-dir-patched |
sbom | rc 0, pkg:pypi/pyyaml@5.4.1
|
observed pass |
sbom-oci-archive |
sbom | rc 0, zlib1g deb purl; container at sha256:f31c486fโฆ61bf3
|
observed pass |
negative-sbom-oci-dot-entry |
sbom | rc 1, potential path traversal attack with entry: "./"
|
observed pass |
vuln-db-status |
vuln | rc 0, schema v6.1.10, built 2026-11-28T06:20:09Z, valid: true
|
observed pass |
vuln-positive-pyyaml-5.3.1 |
vuln | rc 2, GHSA-8q59-q68h-6hv4 Critical on pyyaml 5.3.1, fix 5.4 | observed pass |
vuln-negative-pyyaml-5.4.1 |
vuln | rc 0, no matches | observed pass |
negative-vuln-no-db |
vuln | rc 1, failed to load vulnerability db: database does not exist
|
observed pass |
signing-config-no-tlog |
signing | rc 0, empty rekorTlogConfig and tsaConfig
|
observed pass |
signing-generate-key-pairs |
signing | rc 0, two encrypted key pairs | observed pass |
signing-sign-blob-no-tlog |
signing | rc 0, v0.3 bundle, verificationMaterial = publicKey only |
observed pass |
signing-verify-blob |
signing | rc 0, Verified OK
|
observed pass |
negative-verify-tampered-blob |
signing | rc 1, invalid signature when validating ASN.1 encoded signature
|
observed pass |
negative-verify-wrong-key |
signing | rc 1, same invalid signature error |
observed pass |
negative-sign-wrong-password |
signing | rc 1, reading key: decrypt: encrypted: decryption failed
|
observed pass |
documented-sign-default-needs-sigstore |
signing | rc 1, TUF fetch of tuf-repo-cdn.sigstore.dev failed: network is unreachable
|
observed pass |
documented-verify-default-needs-sigstore |
signing | rc 1, getting trusted root from TUF for new bundle verification
|
observed pass |
attest-blob-slsa-provenance |
attestation | rc 0, Statement v0.1, https://slsa.dev/provenance/v1, subject artifact.txt sha256 2cc1e694โฆ119cb
|
observed pass |
attest-verify |
attestation | rc 0, Verified OK
|
observed pass |
negative-attest-wrong-type |
attestation | rc 1, invalid predicate type, expected spdxjson got https://slsa.dev/provenance/v1
|
observed pass |
negative-attest-tampered-blob |
attestation | rc 1, provided artifact digests do not match digests in statement
|
observed pass |
lint-zizmor-bad-workflow |
lint | rc 14, the five planted audits | observed pass |
lint-zizmor-good-workflow |
lint | rc 0, []
|
observed pass |
lint-actionlint-bad-workflow |
lint | rc 1, potentially untrusted ... [expression]
|
observed pass |
lint-actionlint-good-workflow |
lint | rc 0, no output | observed pass |
- An
sbompass means the pinned Syft release produced documents with the stated format versions and exactly the listed package URLs. A one-linerequirements.txtis the simplest case Syft handles. It says nothing about how complete an SBOM of a real project would be. - A
vulnpass depends on the Grype database recorded in the evidence (grype_db). A later database can add or withdraw matches. The patched case only shows that this one advisory is absent. - A
signingorattestationpass shows key-based signatures and DSSE attestations that verify, and that tampering is caught.--insecure-ignore-tlog=trueskips the transparency-log check on purpose. Keyless signing (Fulcio certificates bound to an OIDC identity) and Rekor inclusion proofs were not exercised. - The attestation carries a SLSA provenance predicate written by hand. A valid signature on it does not mean any SLSA Build level was met: that depends on who generated the provenance and how, which a verifier must check separately.
- A
lintpass means the tools reported exactly the planted findings on the samples. zizmor's online audits (impostor-commit,known-vulnerable-actions,ref-confusion,stale-action-refs) were not run.
-
No real images or registries. The OCI image is a generated two-file layer with a hand-written dpkg status entry.
docker:,registry:anddocker-archive:sources were not exercised. -
Grype database is not pinned. It is the latest one
grype db updatedownloaded during the run. Its status is recorded in the evidence, but a rerun can see a different database. -
No keyless or transparency-log path.
slsa-verifierand keylesscosign verifyneed the public Sigstore TUF repository and Rekor, so they are left out. The twodocumented-*-needs-sigstorecases show that the default commands do try to reach those services. -
In-toto Statement version.
cosign attest-blob --predicateproduced ahttps://in-toto.io/Statement/v0.1Statement. Whether--statementwith a v1 Statement changes that was not tested. -
Deprecations. Cosign v3 deprecates
--tlog-uploadin favour of a signing config without transparency-log services. This lab uses only the signing-config form. -
Persona. zizmor ran with its default
regularpersona. A workflow-levelpermissions: write-allon a single-job workflow is reported only underpedantic, which is why the sample sets it at job level.
- Software supply-chain assessment: the engagement workflow these tools support
- Container security: image review, digest pinning and provenance
- Conditional access & workload identities: cloud-side trust for GitHub Actions OIDC
- Identity detections: the CI evidence layout this lab follows
โฌ ๏ธ Container Security index | Master Index | ๐ฏ Role Navigation | Legal Notice
๐ Source: ContainerSecurity/labs/supply-chain/README.md | โ๏ธ Suggest an edit | โฌ
๏ธ Back to Container Security
- ๐บ๏ธ Browse by Topic
- ๐ All Repository Files
- ๐งญ Learning Paths
- ๐ Master Guide
- ๐ค Glossary
- โ๏ธ Legal & Disclaimer
๐ Foundations & Learning
๐ก๏ธ Defense & Investigations
- Incident Response
- Open Source Intelligence (OSINT)
- Reverse Engineering
- Operations Security (OPSEC)
- Compliance
โ๏ธ Platforms & Infrastructure
๐ก Hardware, Wireless & Field Projects
- PNWC Cyberdeck
- Hardware Testing
- Hardware Hacking
- Software-Defined Radio
- Wardriving
- uConsole
- Space Security
๐งฐ Assessment & Field Reference
๐ฆ Downloads & Project Resources
๐๏ธ Additional Topics