-
Notifications
You must be signed in to change notification settings - Fork 6
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
Layouts for NPM #1
Comments
Okay, I now have a test layout with two steps checked in! The layout is here: https://github.com/adityasaky/in-toto-attestation-verifier/blob/main/layout-npm.yml Currently, it looks like:
I borrowed the example provenance from https://github.blog/2023-04-19-introducing-npm-package-provenance/ and created a publish attestation for the same package. The raw JSON docs are in https://github.com/adityasaky/in-toto-attestation-verifier/tree/main/test-data-npm-raw and I've signed them and checked them in https://github.com/adityasaky/in-toto-attestation-verifier/tree/main/test-data-npm. Finally, I threw together parameter substitution that is currently passed in from another JSON file: https://github.com/adityasaky/in-toto-attestation-verifier/blob/main/parameters/npm-sigstore.json. The parameters passed in right now are:
With this, we can now run the verifier.
To recap, this is verifying various attributes in provenance using parameter substitution where appropriate, using in-toto artifact rules to ensure the name of the subject, using in-toto artifact rules to match the provenance's subject in the publish attestation, and verifying more attributes in the publish attestation. I think the layout is also fairly generic. One thing to note is that paramsub isn't supported for functionary constraints so that's something that'll need to be added in for sigstore support. LMK what you think, @feelepxyz! |
Note: I've moved the layout into the |
@feelepxyz and I discussed exploring what an in-toto layout would look like for the NPM use case. This is a general tracking issue for NPM policies <-> in-toto layouts.
Supporting default supply chains
The default layout for NPM must have two steps: build and publish. The build step must be fulfilled by SLSA provenance and the publish step by the NPM publish attestation.
Checks:
TODO:
Future Work
Once we have a layout working for the default supply chain, we can explore how package maintainers can add steps to their layouts pertaining to various source track checks like test results, code reviews, source repository security controls, etc.
The text was updated successfully, but these errors were encountered: