Skip to main content

Python Rekor Signed Artifact Verification Script

Overview

In software development, artifact signing is a method to help increase the security of the software by associating an artifact with the person who uploaded it.

Sigstore is a tool that simplifies the signing of artifacts by signing it and uploading the signature details to Rekor, an append-only log, so that other users are able to verify the integrity of the artifact.

This script contains functions for interacting with the Rekor logs, such as verifying the inclusion of an artifact in the logs.

Usage

Prior to using this script, an artifact is signed using a tool like cosign. For example:

cosign sign-blob <artifact> --bundle artifact.bundle

The generated .bundle file will contain details about the signing, such as the log entry that was appended to Rekor as well as the log ID.

Once you have an artifact that has been signed, you can use this script to do the following:

Verify the inclusion of the artifact in Rekor

python main.py --inclusion <logIndex> --artifact <artifact>

Fetch the latest log entry in Rekor

python main.py -c

Verify the consistency of a log entry with the latest Rekor log entry

In order to perform consistency verification, you'll need the following details of the log entry that you want to verify its consistency: treeId, treeSize, and rootHash. You can query the Rekor API for your log entry to obtain these details. Once obtained, the following command will perform the consistency verification:

python main.py --consistency --tree-id <treeId> --tree-size <treeSize> --root-hash <rootHash>

Installation

This script contains a few dependencies that are required to be installed prior to usage. They can be installed by running:

pip install -r requirements.txt

Metadata

Release files for rekor-verification 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for rekor-verification 0.1.1
File Size Uploaded
rekor_verification-0.1.1.tar.gz 7.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for rekor-verification 0.1.1
File Interpreter ABI Platform
rekor_verification-0.1.1-py3-none-any.whl Python 3 none any Details

Total release size: 17.6 kB

Release files / rekor_verification-0.1.1.tar.gz

Download URL rekor_verification-0.1.1.tar.gz
Size 7.9 kB
Tags Source
SHA-256 checksum
How to use checksums
f6a60f1c6461c45f00668a78aa7e809f1d64d91932fb84eeeb5683a3e8af3288
BLAKE2b-256 checksum
How to use checksums
657cc8200875fe142ae66f216a19a1e801d113de0352086b82d098ba0761e006
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/2.2.1 CPython/3.13.1 Darwin/24.6.0

Release files / rekor_verification-0.1.1-py3-none-any.whl

Download URL rekor_verification-0.1.1-py3-none-any.whl
Size 9.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
6ede14d77bb7c99c28994ef6b176aa31725d0df3843735e6ade6d8adad7332a8
BLAKE2b-256 checksum
How to use checksums
46b652326a884e3db85f33f1865f4ed760edd69563066d859a6947c8349203c2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/2.2.1 CPython/3.13.1 Darwin/24.6.0

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page