Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Slsa provenance #645

Merged
merged 1 commit into from
Nov 6, 2023
Merged

Slsa provenance #645

merged 1 commit into from
Nov 6, 2023

Conversation

grouigrokon
Copy link
Contributor

@grouigrokon grouigrokon commented Oct 17, 2023

Added SLSA provenance package.

This provenance package is the implementation of the SLSA provenance
specifications at https://slsa.dev/spec/v1.0/provenance

For now, at least two enhancements are possible:

  • Some parameters are TypeURI or ResourceURI, but the specification
    says they are strings. Setting those attributes as str and having
    a check that they fit with TypeURI or ResourceURI classes could be
    better.

Documentation fixes

Removed some warning about autoapi documentation, and some about
possible classes mixes.

Still the warning about PIPE import in TYPE_CHECKING could not be resolved.

Review changes

  • Removed DigestSet and DigestAlgorithm enum. A digest set is considered
    a dictionary of str: str. The ResourceDescriptor's digest may be set,
    or new digest added by the add_digest() method.
  • The dir_hash() method has been moved to ResourceDescriptor ... maybe not
    the best place though.
  • Fixed a minor typo in the dsse package documentation
  • Added as_dict(), as_json(), load_dict() and load_json() for all
    the objects.
  • Added a provenance file example in the tests, and load it.

@grouigrokon grouigrokon force-pushed the slsa-provenance branch 4 times, most recently from a0efe5c to 10ffb30 Compare October 23, 2023 13:49
@grouigrokon
Copy link
Contributor Author

Comments from review have been taken into account.

This provenance package is the implementation of the SLSA provenance
specifications at https://slsa.dev/spec/v1.0/provenance

For now, at least two enhancements are possible:

- Some parameters are TypeURI or ResourceURI, but the specification
  says they are strings. Setting those attributes as `str` and having
  a check that they fit with TypeURI or ResourceURI classes could be
  better.

Documentation fixes
-------------------
Removed some warning about autoapi documentation, and some about
possible classes mixes.

Still the warning about PIPE import in TYPE_CHECKING could not be resolved.

Review changes
--------------
- Removed DigestSet and DigestAlgorithm enum. A digest set is considered
  a dictionary of str: str. The ResourceDescriptor's digest may be set,
  or new digest added by the add_digest() method.
- The dir_hash() method has been moved to ResourceDescriptor ... maybe not
  the best place though.
- Fixed a minor typo in the dsse package documentation
- Added `as_dict()`, `as_json()`, `load_dict()` and `load_json()` for all
  the objects.
- Added a provenance file example in the tests, and load it.
@grouigrokon grouigrokon merged commit 66c7396 into AdaCore:master Nov 6, 2023
6 checks passed
@grouigrokon grouigrokon deleted the slsa-provenance branch November 6, 2023 08:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants