This is homework1 of CS-GY/UY 3943/9223 SUpply Chain Secrity
set-up:
This entire project is based on the sigstore cosign tools on linux:
curl -O -L "https://github.com/sigstore/cosign/releases/latest/download/cosign-linux-amd64"
sudo mv cosign-linux-amd64 /usr/local/bin/cosign
sudo chmod +x /usr/local/bin/cosign
If you have go or homebrew it would be easier.
Signing an artifact:
- Sign an artifact using cosign tool with your identity using:
cosign sign-blob <file> --bundle cosign.bundle
You can also refer to the official cosign tutorial
After signing an artifact:
commands:
python3 main.py -c
python3 main.py --inclusion <artifact>
# (the last argument can be changed to anything you signed)
python3 main.py --consistency
Important notes:
- This repo runs a Trufflehog
command to scan each latest commit attempt to prevent secret leak,
however, the local repo on linux environment resulted in likely non-functional
pre-commit config. The Docker image of Trufflehog does not support laetst one-
commit scan. For Mac environment, modify
pre-commit-config.yaml, line 7, to:entry: bash -c 'trufflehog git file://. --since-commit HEAD --no-verification --fail --max-depth=1'
notes
The point of this homework is the know-how of cosign tools, i particular the rekor APIs
-
the "security" is implemented as a merkle tree, and in this homework I compare two nodes in the tree: the latest checkpoint provided by Rekor that is just simply literally the latest checkpoint and the checkpoint of my own signed artifact which is retrievable via api call using the log index generated when I signed the artifact.
-
somehow against my simple understanding of the merkle tree implementation, the "treeSize" filed goes backward: If you check the log index 1 on Rekor, the tree size is huge (4163431) while by the point I did this homework and signed a dummy, the size is only 1110000+ ~ish, I wonder what happens when number reaches 0.
-
prof explained in class that this implementation is lighter-weight than actual blockchain but I don't quite see why or how.
reference materials:
Metadata
Release files for hmk1 0.1.5
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| hmk1-0.1.5.tar.gz | 10.1 kB | Without provenance | Details for hmk1-0.1.5.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| hmk1-0.1.5-py3-none-any.whl | Python 3 | none | any | Details for hmk1-0.1.5-py3-none-any.whl |
Total release size: 19.8 kB
Release files / hmk1-0.1.5.tar.gz
| Download URL | hmk1-0.1.5.tar.gz |
|---|---|
| Size | 10.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
818a9244515605ba7068ad8fdacbb2a04319470ecb1188601a46134b9504ba20
|
|
BLAKE2b-256 checksum How to use checksums |
9ada811f110c2dbfce0e21e7724fcb41944d6d5e967e044e985d95ae7cc28d65
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.8.4 CPython/3.10.12 Linux/6.8.0-49-generic
|
Release files / hmk1-0.1.5-py3-none-any.whl
| Download URL | hmk1-0.1.5-py3-none-any.whl |
|---|---|
| Size | 9.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
f4ac3768aaf79bb0cbbb0b2e7f9f25c9b345e12c16a293c51210fb91fcaa1b37
|
|
BLAKE2b-256 checksum How to use checksums |
a66ab96e40bf33245c1e64f7f4665894d7fdbd48086dbd49c3a1600373774ea8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.8.4 CPython/3.10.12 Linux/6.8.0-49-generic
|
Security for hmk1 0.1.5
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.