this repository demonstrates software supply chain security practices using sigstore for artifact signing and verification.
it includes steps to create, sign, and verify software artifacts, along with verifying their inclusion in a merkle tree transparency log.
the workflow implemented here helps ensure:
- integrity of published artifacts
- provenance tracking of software releases
- prevention of supply chain attacks
| file / folder | description |
|---|---|
artifact.md |
initial sample artifact file to sign |
artifact.bundle |
signed bundle generated by sigstore for artifact.md |
artifact_2.md |
second sample artifact |
artifact_2.bundle |
signed bundle for artifact_2.md |
main.py |
core verification script (inclusion & consistency checks) |
merkle_proof.py |
utilities for working with merkle tree proofs |
util.py |
helper functions used across scripts |
demo.png |
visual demo of signing and verification steps |
__pycache__/ |
compiled python cache files |
.gitignore |
ignored files for git |
the overall process is divided into three steps:
generate an artifact and sign it with sigstore:
echo "hello world!" > artifact_2.md
python -m sigstore sign --bundle artifact_2.bundle artifact_2.mdthis generates:
- the signed bundle
artifact_2.bundle - transparency log entry metadata (e.g.,
logIndex,logID)
extract important fields from the bundle:
cat artifact_2.bundle | jq '.' | tail -n 5example output:
"logIndex": 482833136,
"logID": "c0d23d6ad406973f9559f3ba2d1ca01f84147d8ffc5b8445c224f98b9591801d"
check the current checkpoint of the merkle tree:
python3 main.py -cpython main.py --inclusion 482833136 --artifact artifact_2.mdoutput will confirm:
- signature validity
- offline root hash calculation
- inclusion proof verification
python3 main.py --consistency \
--tree-id 1193050959916656506 \
--tree-size 360933865 \
--root-hash 141a3c752daec75b527dd79101d859a33c38d94b4721e54328a9427a5a50c271- python 3.8+
sigstorecli tooljqfor json parsingpip install -r requirements.txt(if present)
this setup is ideal for:
- securing ci/cd pipelines
- ensuring integrity of open-source releases
- validating provenance of dependencies
aaditya rengarajan <ar9668>
assignment for software supply chain security
[] review test-cases written with ai-assistance
