Dependency and model provenance
Quick answer
Model provenance records how an artifact was produced, including its source, data, dependencies and builder. A signed manifest binds these claims to a signer; a trusted public key and release policy determine whether to accept the artifact. Examples use small inert synthetic inputs and standard-library Python. No real endpoints. ByteMind execution is unverified.
Dependency inventory comparison
approved = {"runtime":"1.0","parser":"2.0"}received = {"runtime":"1.0","parser":"2.1"}print(sorted(k for k in set(approved)|set(received) if approved.get(k)!=received.get(k)))Expected output (locally tested): ['parser']. A version mismatch triggers review; it does not establish exploitation.
How it works
A software bill of materials (SBOM) inventories components and versions. A dependency lock captures resolved versions and ideally integrity hashes; neither alone proves absence of vulnerabilities. An attestation is a claim about an artifact. Verify a signature over exact manifest bytes using a pinned trusted public key, then compare the artifact and dataset digests, allowed builder, dependency policy and version. Review license and security advisories separately. Ed25519 signs with a private key and verifies with a public key. Production private keys belong in controlled signing infrastructure, with rotation and revocation; never embed them in code. The milestone uses a publicly known test seed solely for reproducibility. This simplified manifest is not a SLSA attestation or certification.
Bind artifact digest to metadata
import hashlibartifact = b"fictional model"manifest = {"sha256": hashlib.sha256(artifact).hexdigest()}print(hashlib.sha256(artifact).hexdigest() == manifest["sha256"])Expected output (locally tested): True. Digest binding is separate from signature verification.
Common mistakes
Never trust a public key merely because it arrives alongside an artifact. A checksum alone is not a signature. A verified signature on stale or policy-incompatible metadata must still be rejected.
Practice and next steps
Compare the approved dependency inventory with a received inventory. Explain the effect of a revoked signer and a signed old model version. Next: serving input controls.
Check Your Understanding
Solidify your learning with the interactive assessment directly below this lesson.
Concept Quiz & Questions
Dependency and model provenance — knowledge check
Apply dependency and model provenance to small examples and debugging scenarios.
What must anchor signature trust?
What is an SBOM?
What does a valid signature establish?
What should happen to a signed stale version?
Where should production signing keys reside?