Skip to main content

Signed integrity records for scientific Python pipelines (DSSE + in-toto).

Project description

signrun

PyPI Python versions CI License: Apache-2.0

Signed integrity records for scientific Python pipelines.

signrun wraps a Python entrypoint, captures content-addressed identity for declared inputs, code, declared outputs, and runtime environment, and emits a DSSE-enveloped in-toto Statement signed with Ed25519. A third party with the signer's externally-published fingerprint can verify byte-equivalence and confirm the signature matches the expected key in a single command.

Status: v0.1.0, alpha. The spec is stable; the implementation is under active development.

Quickstart

pip install signrun

# Generate a keypair (prints your fingerprint -- publish it; see docs/trust-anchor.md)
signrun init

# Declare what your run reads and writes
cat > signrun.yaml <<EOF
inputs:
  - data/input.csv
outputs:
  - results/output.json
EOF

# Wrap your script (signrun uses sys.executable; no `python` prefix)
signrun wrap pipeline.py -- --seed 42

# Verify with the signer's externally-supplied trust anchor
signrun verify --fingerprint sha256:<your-fingerprint> manifest.json

See docs/quickstart.md for the full 60-second onboarding.

What v0.1 delivers

  • DSSE envelope (secure-systems-lab/dsse) wrapping an in-toto Statement v1 with predicateType: https://corman.io/signrun/Provenance/v0.1.
  • Content-addressed SHA256 over declared inputs, declared outputs (subject), the entrypoint script, and project-local imported modules (paths relative to cwd for cross-machine portability).
  • Ed25519 signature over the DSSE PAE (pre-authentication encoding); keyid is informational and never trusted.
  • Three verification states: signature invalid (exit 3), signature valid, signer untrusted (exit 1), trusted signer verified (exit 0). Trusted failed-run records exit 7.
  • TOCTOU defense: post-execution input stability re-hash detects changes that persist until the re-hash and refuses to sign by default. A mutate-read-restore attack (modify-during-run, restore-before-rehash) is an inherent wrapper limitation; see docs/threat-model.md.
  • Cross-machine reproducibility: installed_packages_sha256 (resolved snapshot) distinguishes platform drift from artifact drift; dependency_spec_sha256 and lockfile capture declared intent.

What v0.1 does NOT deliver

  • Author identity binding. The signature only proves possession of the embedded key. For trusted verification, the verifier must supply the signer's fingerprint out-of-band (via the signer's published GitHub README, tagged release commit, personal website). What this proves is continuity with a published key, not real-world identity. Channel compromise defeats attribution. v0.3 plans Sigstore-keyless attestation. See docs/trust-anchor.md.
  • Subprocess / multiprocessing / C-extension / external-network capture. Out of scope, surfaced explicitly in capture_coverage. See docs/coverage-limits.md.
  • Symlinks / HPC shared-storage layouts. v0.1 attests only regular files physically within the verification workspace; symlinked external data requires materializing the file into the workspace or waiting for v0.2.
  • Regulatory compliance. NIH DMS, NSF Public Access, EU AI Act Article 10 are policy-level requirements; signrun is a useful primitive but neither sufficient nor mandated.

Documentation

License

Apache-2.0. See LICENSE.

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

signrun-0.1.0.tar.gz (74.7 kB view details)

Uploaded Source

Built Distribution

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

signrun-0.1.0-py3-none-any.whl (53.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: signrun-0.1.0.tar.gz
  • Upload date:
  • Size: 74.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for signrun-0.1.0.tar.gz
Algorithm Hash digest
SHA256 8b9786d849d6401d0edf81339c47a53a01410588e221207e6a739fca083afe81
MD5 7adfb2181b0dabeffa86ee79802d2077
BLAKE2b-256 1fc139e15c10ed9a9e82a7f077825631c3cc21e67a3a94cd3a22ffad394b554e

See more details on using hashes here.

Provenance

The following attestation bundles were made for signrun-0.1.0.tar.gz:

Publisher: release.yml on zzirblake/signrun

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

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

File metadata

  • Download URL: signrun-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 53.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for signrun-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 24981906eda601ed76c935f41cdd1377eb99c7ac437a0794ac1a02cbb08694c1
MD5 5833ed66da255682b1878522e05712f7
BLAKE2b-256 67de56198704b32d40ce0d2bd8f06c5f57926cad5a5428515e782c3f861f2a07

See more details on using hashes here.

Provenance

The following attestation bundles were made for signrun-0.1.0-py3-none-any.whl:

Publisher: release.yml on zzirblake/signrun

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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