Skip to main content

awshare

Publish an artifact, and fetch it back verified.

awshare bundles a directory into a tar.gz plus a small JSON manifest naming its digest, its size and the files inside it. A consumer fetches the manifest first and can decide, before opening anything, whether the archive is the one that was published.

pip install awshare            # stdlib only
pip install "awshare[seal]"    # adds provenance via awseal

awshare publish ./my-adapter --out ./dist --seal
awshare fetch ./dist/my-adapter.awshare.json --dest ./here --key <publisher-key>

It pairs with awseal; it does not replace it

awshare — are these the bytes that were published?   (integrity)
awseal  — who published them?                        (provenance)

A digest cannot answer the second, because whoever produced the bytes also produced the digest. publish --seal seals the directory before archiving, so the seal travels inside the artifact and one download answers both. Unsealed publishes say so on every run rather than letting a clean-looking pass be mistaken for provenance.

Exit codes are three answers, not two

0   verified
1   checked, and it failed      (digest mismatch, wrong publisher, bad seal)
2   could not check at all      (missing archive, unknown manifest version)

Collapsing 1 and 2 is how "I could not check this" becomes "it checked out". This package's own CLI got it wrong first: an artifact from the wrong publisher — definitively judged and definitively rejected — exited 2, the code reserved for not being able to tell.

What it refuses

  • Path traversal, in four flavours, because each defeats the previous defence: .. segments, absolute paths (Path("/a") / "/etc/passwd" is /etc/passwd), Windows drive-relative names, and symlinks inside the destination that only escape after resolve().
  • Non-regular archive members. A symlink in a tarball passes every check applied to its name and points anywhere once created.
  • Unbounded expansion. A small download that expands without limit fills the disk long before anyone reads a log line.
  • An empty tree. It would fetch and verify perfectly while containing nothing.
  • Contents that disagree with the manifest, even when the digest matches — that is a manifest describing a different set of files to the one it names, which is worse than corruption because every integrity check passes.

Archives normalise uid, gid and mtime, so two builds of identical content produce identical bytes and a content-addressed store does not treat them as different artifacts.

Licence

Apache-2.0.

Download files

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

Source Distribution

awshare-0.1.0.tar.gz (19.6 kB view details)

Uploaded Source

Built Distribution

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

awshare-0.1.0-py3-none-any.whl (18.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: awshare-0.1.0.tar.gz
  • Upload date:
  • Size: 19.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.13.5

File hashes

Hashes for awshare-0.1.0.tar.gz
Algorithm Hash digest
SHA256 20aab337531b59af51a8021c388f9c9d3b3eed7120110865442f8c729d990172
MD5 f2869cda8b301e43524dc8b3278ad430
BLAKE2b-256 a87764dc890b0e3bf214fd7eebf19c2cf644f286b475a8880ca116ebd15a44cb

See more details on using hashes here.

File details

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

File metadata

  • Download URL: awshare-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 18.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.13.5

File hashes

Hashes for awshare-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 779ea09d10008d3859661ef41a335fb2850f8cc99dbd191066bac290dabc368c
MD5 9f6d7e0da915bab4867953a5e47ed724
BLAKE2b-256 4bb3edcab94a9220d974402afe90589f4fd379558a0c5d841dab9a91879c6ea7

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 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