Skip to main content

A package that is quite pointless

Project description

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:

  1. 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:

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

hmk1-0.1.0.tar.gz (3.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

hmk1-0.1.0-py3-none-any.whl (3.7 kB view details)

Uploaded Python 3

File details

Details for the file hmk1-0.1.0.tar.gz.

File metadata

  • Download URL: hmk1-0.1.0.tar.gz
  • Upload date:
  • Size: 3.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.4 CPython/3.10.12 Linux/6.8.0-49-generic

File hashes

Hashes for hmk1-0.1.0.tar.gz
Algorithm Hash digest
SHA256 e0457a593da95831fa3a41ba607f2736da59aa2a18725748b959dc5028b36e22
MD5 64235b48a9b3af5d0de4008d78b4b59a
BLAKE2b-256 a5c728286205d210f5ae79f632d9f5c2b6dad89896bc8594b4528945a82c28b4

See more details on using hashes here.

File details

Details for the file hmk1-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: hmk1-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 3.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.4 CPython/3.10.12 Linux/6.8.0-49-generic

File hashes

Hashes for hmk1-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 64814c900be02c81229905ac8b4320dc6cba75071e62129a7e87b6d4b3c5e0e3
MD5 605a5911108e62a1bb71b4b097f9f9d7
BLAKE2b-256 b33ea2655db584f167ac96b871aee34aabbe9063a8e7b9d3a0d057140a2a6e46

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page