Skip to main content

Software Heritage - Provenance

This service provide a provenance query service for the Software Heritage Archive. Provenance is the ability to ask for a given object stored in the Archive: “where does it come from?”

This question generally does not have a simple and unambiguous answer. It can be, among other:

  • what it the oldest revision in which this object has been found?

  • what is the “better” origin in which this object can be found?

Answering this kind of question requires querying the Merkle DAG on which the Software Heritage Archive is built with complex queries, mostly from the bottom to the top (aka from Content to Origin objects).

The idea is to use both the compressed graph representation of the Archive (swh-graph) and a preprocessed provenance index to speed up some of the provenance queries.

Description

The core feature of this tool is to provide a service to the reference to an object within the Software Heritage Archive where the queried object can be found.

There are mostly 2 kinds of provenance queries that can be done: - search for the best provenance answer from a given object; - search for all the possible provenance answers for a given object.

For each input object, the definition of “best provenance answer” is simple and unambiguous; for now, the best answer is the an origin in which the oldest revision (in the sense of the revision with the oldest commit date) in which this object has been found.

Provenance can be looked for:

  • Content

  • Directory

  • Revision

  • Release

For each object:

Input: SWHID (core SWHID of an artifact found in the user code base)

Output: SWHID or origin URI where input SWHID was found + context information
    Context information, a subset of:
        snapshot (snp SWHID)
        release (rel)
        revision (rev)
        path (filesystem-style path)

Non-functional requirements:
  - the returned object should be as high as possible; i.e. prefer an
    Origin (if any), then a Snapshot, then a Release, then a Revision,
  - the returned object should be the best possible answer, if possible;
    the definition of "best answer" being something like:

      *an* origin in which the oldest revision (in the sense of the
      revision with the oldest commit date) in which this object has been
      found.

Metadata

Release files for swh.provenance 0.6.0

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

Source distribution (sdist)

Source distribution for swh.provenance 0.6.0
File Size Uploaded Provenance Actions
swh_provenance-0.6.0.tar.gz 135.7 kB Without provenance Details for swh_provenance-0.6.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for swh.provenance 0.6.0
File Interpreter ABI Platform Actions
swh_provenance-0.6.0-py3-none-any.whl Python 3 none any Details for swh_provenance-0.6.0-py3-none-any.whl

Total release size: 196.3 kB

Release files / swh_provenance-0.6.0.tar.gz

Download URL swh_provenance-0.6.0.tar.gz
Size 135.7 kB
Tags Source
SHA-256 checksum
How to use checksums
d88e83a384e4d91dcdcb647fd84a02b687b6713aa5aeae030351caa243496865
BLAKE2b-256 checksum
How to use checksums
a9c39ef3bf85d885376ab8eec41627f02d4c13f08c71e6dbf79d92a687bab734
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.11.18

Release files / swh_provenance-0.6.0-py3-none-any.whl

Download URL swh_provenance-0.6.0-py3-none-any.whl
Size 60.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c93c99dbfb4c5b21727e9ca7989d57219ce8de6c9bb9b3de623c9bf410b87651
BLAKE2b-256 checksum
How to use checksums
53740e4569f1157ee6eff6767144399f1a3a7cac0f6e4ca04e68a5e5a26aa5ba
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.11.18

Security for swh.provenance 0.6.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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