| title | Verify SLSA provenance on a @hulumi/* tarball |
|---|---|
| description | Confirm a published @hulumi/* tarball was built from this repo's HEAD by GitHub Actions, before installing it. |
Your supply-chain policy requires you to verify provenance before consuming
third-party packages. From v1.0 every @hulumi/* package publishes with
"provenance": true via npm trusted publishing (OIDC-backed; no NPM_TOKEN
long-lived credential lives in this repo). Current releases are attested by
the reusable .github/workflows/sign-and-publish.yml workflow; you can verify
the SLSA Build L3 attestation locally with gh attestation verify.
- GitHub CLI
gh≥ 2.49 (the version that shipsgh attestation verify). - A signed-in
gh auth loginsession against thekerberosmansour/hulumirepo's read-permitted user (the repo is public, so any logged-in user works). - npm CLI installed and able to fetch from the public registry.
npm pack @hulumi/baseline@1.3.2 --pack-destination /tmp --json
# -> [{"filename":"hulumi-baseline-1.3.2.tgz","files":[...]}]Repeat for every @hulumi/* package you intend to install. The release:verify-attestations script in the root package.json does all six published packages in one shot:
pnpm run release:verify-attestationsgh attestation verify /tmp/hulumi-baseline-1.3.2.tgz --repo kerberosmansour/hulumiExpected output (paraphrased):
Loaded digest sha256:... for file:///tmp/hulumi-baseline-1.3.2.tgz
Loaded 1 attestation from GitHub API
✓ Verification succeeded!
The attestation was generated by https://github.com/kerberosmansour/hulumi
The attestation was generated for sha256:…
The attestation was generated by workflow .github/workflows/sign-and-publish.yml@<sha>
If verification fails, stop. A failed verification means either:
- The tarball was tampered with after publish (treat as compromise; don't install).
- The package was published from a fork or a non-canonical workflow (open an issue; see SECURITY.md for typosquat reporting).
- Your
ghsession is signed into a user without read access to the repo's attestations API.
{
"dependencies": {
"@hulumi/baseline": "1.3.2",
"@hulumi/policies": "1.3.2",
"@hulumi/drift": "1.3.2",
"@hulumi/k8s-baseline": "1.3.2",
"@hulumi/cloudflare-baseline": "1.3.2",
"@hulumi/platform-patterns": "1.3.2"
}
}For deeper supply-chain discipline, capture the pnpm-lock.yaml integrity hash as the source of truth — that pins exact bytes, not just version labels. The Hulumi repo itself does this for @pulumi/* via scripts/exact-pin-guard.mjs; you can extend the same pattern in your own consumer repo.
gh attestation verifyreturnsVerification succeeded!for each package you intend to install.- The attesting workflow path is
.github/workflows/sign-and-publish.yml— anything else is suspicious for current releases. - The attesting repo is
kerberosmansour/hulumi, not a fork.
gh attestation verify complains about a missing PEM bundle. Older gh versions don't ship attestation. Upgrade: brew upgrade gh or grab a newer release from https://github.com/cli/cli/releases.
Tarball SHA doesn't match what npm pack produced. npm pack is deterministic on a given Node + npm version pair. If you're packing on a different Node major than the publish workflow used, the in-tarball line endings / metadata can differ. Re-run on Node 22.14.0 to match the release signing workflow's setup-node config.
You forked the repo and want to verify your fork's attestations. Pass --repo <your-fork> instead of kerberosmansour/hulumi. Note that npm trusted publishing only works from the canonical repo by default — forks need their own npm package and trusted publisher set up.
You want to verify in CI before install. Wrap gh attestation verify in your CI's prerequisites. The Hulumi repo runs its own release-shape BDD and dry-run attestation checks in CI — that's the upstream provenance gate, but consumer-side verification is independent.
- SECURITY.md — canonical install paths and typosquat reporting.
- .github/workflows/release.yml — the workflow that builds release artifacts.
- .github/workflows/sign-and-publish.yml — the reusable workflow that signs, publishes, and creates the GitHub release.
- CHANGELOG.md § Security — the v1.0 supply-chain commitments.
- SLSA Build L3 requirements — what L3 actually guarantees.