Code for software supply chain security assignment 1
Project description
SG7569 — CS9223 Assignment 1
A small toolkit and reference implementation for verifying Rekor transparency log entries using Merkle proofs and offline verification. This repository contains the code used for assignment 1 of the CS9223 course (software supply chain security).
Project contents
assignment1/— Primary assignment code and scripts.main.py— Command-line Rekor transparency log verifier (inclusion, checkpoint, consistency).merkle_proof.py,util.py— Helper modules for hashing, proof verification and signature checks.artifact.bundle— Example artifact bundle used by some of the verification helpers.
Requirements & Dependencies
- Python: supported Python versions are >= 3.12 (see
pyproject.toml). - Runtime dependencies (declared in
pyproject.toml):cryptography>=46.0.1requests>=2.32.5
Development tools (optional) are listed under the dev dependency group in
pyproject.toml and include bandit, mypy, pylint, and ruff.
Installation
- Install uv (package manager):
curl -LsSf https://astral.sh/uv/install.sh | sh
- Setup and activate a virtual environment (recommended):
# Create virtual environment and install dependencies
uv venv
source .venv/bin/activate # On Windows: .venv\Scripts\activate
uv sync
Usage
The main entrypoint for the assignment tools is assignment1/main.py. Typical commands:
- Fetch and print the latest Rekor checkpoint:
python assignment1/main.py --checkpoint
- Verify inclusion of an artifact using a Rekor log index and a local artifact file:
python assignment1/main.py --inclusion 12345 --artifact path/to/artifact.file
- Verify consistency between a previous checkpoint and the latest Rekor checkpoint:
python assignment1/main.py --consistency --tree-id <TREE_ID> --tree-size <SIZE> --root-hash <ROOT>
Use -d / --debug with any command to enable verbose output for troubleshooting.
Notes and assumptions
- The code uses the public Rekor instance endpoints that are referenced in
assignment1/main.py. Network access is required to fetch entries and proofs. - The repository expects Python 3.12+ (see
pyproject.toml); if you use a different Python version, some features or type checks may behave differently. - This README provides quick usage. For implementation details, consult the source
files in
assignment1/(notablymain.py,merkle_proof.py, andutil.py).
License
This project is provided under the license found in the repository LICENSE file.
Contact / Questions
If you need clarifications about the assignment or the code, open an issue in the repository or contact the maintainer listed in the repository metadata.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file sg7569_cs9223_assgn1-0.1.0.tar.gz.
File metadata
- Download URL: sg7569_cs9223_assgn1-0.1.0.tar.gz
- Upload date:
- Size: 14.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/2.2.1 CPython/3.14.0 Darwin/23.6.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
02992ef48f6f78617f0c939ee5a0f8dcbff1999a95ac13deb954b4eb8312231f
|
|
| MD5 |
224631cfa1d1fd8a0cf477b5d6aef1c5
|
|
| BLAKE2b-256 |
795f6c619109e298cda70d3527f6edbbd1c4988f67b06a65589f1d2a357b03e5
|
File details
Details for the file sg7569_cs9223_assgn1-0.1.0-py3-none-any.whl.
File metadata
- Download URL: sg7569_cs9223_assgn1-0.1.0-py3-none-any.whl
- Upload date:
- Size: 15.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/2.2.1 CPython/3.14.0 Darwin/23.6.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
360cf9f4c97e5d88e801fafe2022d61e8c80bee10a667977d5b013f39ae1ebd0
|
|
| MD5 |
29bfab818a4385a0783bc4c9eccbcb04
|
|
| BLAKE2b-256 |
e3e1455c5a03c0c609113fd13d103839aaf1885e10c84a8495a663095b7b16dd
|