Install
npx skillscat add smouj/provenance-guard-skill Install via the SkillsCat registry.
Provenance Guard
Overview
Provenance Guard verifies the integrity and authenticity of software supply chain artifacts including packages, containers, dependencies, and SBOMs. It detects tampering, validates signatures, and ensures artifacts originate from trusted sources.
Capabilities
- SBOM Verification: Parse and validate SPDX, CycloneDX, and Syft SBOMs
- Signature Validation: Verify in-toto attestations, Sigstore, and GPG signatures
- Dependency Analysis: Cross-reference lockfiles against published vulnerabilities
- Artifact Hashing: Generate and compare SHA256/SHA512/MD5 hashes
- Trust Anchor Management: Configure and maintain root of trust policies
Commands
provenance:verify
Verify artifact integrity against known good hashes.
provenance:verify --artifact <path> --expected-hash <sha256> --source <upstream>
provenance:verify --package npm:lodash@4.17.21 --policy strict
provenance:verify --container myapp:latest --attestation-path ./attestation.jsonlFlags:
--artifact: Path or package reference to verify--expected-hash: Known good SHA256 hash--source: Upstream registry or repository--policy: Verification strictness (strict|relaxed|audit)--attestation-path: Path to in-toto attestation bundle
provenance:attest
Generate or verify attestations for built artifacts.
provenance:attest --generate --artifact ./build/app.bin --subject "app.bin" --predicate-type https://slsa.dev/provenance/v1
provenance:attest --verify --attestation ./attestation.jsonl --public-key ./keys.pubprovenance:sbom
Analyze and validate Software Bill of Materials.
provenance:sbom --analyze --input ./sbom.spdx.json
provenance:sbom --compare --baseline ./baseline.cdx.json --current ./current.cdx.json
provenance:sbom --export --format cyclonedx --output ./bom.xmlprovenance:policy
Manage trust policies and verification rules.
provenance:policy --list
provenance:policy --add --name production-software --require-signature --min-score 8
provenance:policy --apply --env production --policy production-softwareprovenance:audit
Generate supply chain security audit reports.
provenance:audit --output ./audit-report.json --format json
provenance:audit --timeline --days 30 --project myapp
provenance:audit --vulnerabilities --sbom ./sbom.json --db snykReal Use Cases
Use Case 1: Verify CI/CD Artifact Before Deployment
A deployment pipeline builds a container image. Before pushing to production registry, verify the image matches the expected provenance:
provenance:verify \
--artifact registry.internal/myapp:v2.4.1 \
--expected-hash sha256:a1b2c3d4e5f6... \
--policy strictExpected Output:
✓ Hash verification passed
✓ Attestation validated (SLSA v1.0 Build L2)
✓ Signature from trusted builder (github-actions)
✓ Artifact approved for deploymentUse Case 2: Audit Third-Party Dependency Health
Before integrating a new npm package, audit its supply chain health:
provenance:audit --package express@4.18.2 --vulnerabilitiesDetects:
- Known CVEs in dependency tree
- Outdated dependencies with known exploits
- Packages with abandoned maintainers
- Missing or invalid signatures
Use Case 3: Compare SBOMs Pre/Post Update
After updating dependencies, verify no unexpected components were introduced:
provenance:sbom --compare \
--baseline ./sbom-v1.0.0.cdx.json \
--current ./sbom-v1.1.0.cdx.jsonOutput shows:
- Added components (potential new attack surface)
- Removed components
- Version changes
- License changes
Use Case 4: Enforce Policy for Production Deployments
Create and enforce a strict policy requiring signed artifacts:
# Define policy
provenance:policy --add --name production-strict \
--require-signature \
--require-attestation \
--min-slsa-level 3 \
--allowed-sources ghcr.io,docker.io,registry.internal
# Apply to environment
provenance:policy --apply --env production --policy production-strictTroubleshooting
Verification Fails: Hash Mismatch
Problem: HashMismatchError: artifact hash does not match expected
Causes:
- Artifact was modified after signing
- Wrong hash provided
- Corruption during transfer
Resolution:
- Verify hash from original source (e.g., checksum file on release page)
- Re-download artifact
- Check for network corruption:
sha256sum <artifact> - If self-built, regenerate hash:
provenance:attest --generate
Verification Fails: No Attestation Found
Problem: AttestationNotFoundError: no attestations for artifact
Resolution:
- Ensure CI/CD pipeline generates attestations
- Check artifact was built by trusted builder
- For external packages, verify publisher provides attestations
- Fallback to hash-only verification:
--policy relaxed
Policy Violation: Signature Required
Problem: PolicyViolation: artifact not signed by trusted key
Resolution:
- Verify correct public key configured:
provenance:policy --keys list - Request maintainer sign the release
- Temporarily relax policy for audit:
--policy audit - Add exception with justification: `provenance:policy --exception --reason "..."
SBOM Parse Error
Problem: SBOMParseError: unsupported format or malformed JSON
Resolution:
- Verify SBOM format: SPDX, CycloneDX, or Syft JSON
- Validate JSON syntax:
jq . < sbom.json - Convert format:
provenance:sbom --convert --input sbom.json --format cyclonedx
Configuration
Trust Anchors
Store in ~/.openclaw/config/provenance/anchors/:
keys/- Public keys for signature verification (GPG, Cosign, Sigstore)policies/- JSON policy filesattestations/- Cached attestations for offline verification
Environment Variables
PROVENANCE_STRICT=1 # Fail on warnings
PROVENANCE_CACHE_TTL=3600 # Cache verification results (seconds)
PROVENANCE_KEYSERVER=keys.openpgp.org # GPG key lookup
PROVENANCE_SIGSTORE_REKOR=rekor.sigstore.dev # Transparency logExit Codes
| Code | Meaning |
|---|---|
| 0 | Verification passed |
| 1 | General error |
| 2 | Hash mismatch |
| 3 | Signature invalid/missing |
| 4 | Policy violation |
| 5 | SBOM parse error |
See Also