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

VSA: file extension recommendation #804

Open
Tracked by #900
laurentsimon opened this issue Apr 5, 2023 · 6 comments
Open
Tracked by #900

VSA: file extension recommendation #804

laurentsimon opened this issue Apr 5, 2023 · 6 comments

Comments

@laurentsimon
Copy link
Contributor

Is there a particular file extension recommended for VSAs?

@TomHennen
Copy link
Contributor

IMO VSAs are just any other attestation and, if stored in a file, should go in an in-toto Bundle with any other relevant attestations. So maybe .intoto.jsonl ?

@laurentsimon
Copy link
Contributor Author

So if someone produces both VSA and provenance, would you call the files package-v1.2.3-provenance.intoto.jsonl
and package-v1.2.3-vsa.intoto.jsonl, for example?

@TomHennen
Copy link
Contributor

TomHennen commented Apr 6, 2023

If someone produces a VSA and provenance they should both go in one file named package-v1.2.3.intoto.jsonl. A verifier can look through all the attestations in that file and use whichever they need.

[edit] Or is there a good reason to keep them in separate files?

@laurentsimon
Copy link
Contributor Author

laurentsimon commented Apr 6, 2023

I see a few arguments in favor:

  • Separate file is simpler for human to look at and simplifies verification too. Instead of iterating over all attestations, verifier can immediately process the relevant one.
  • UX: simpler for maintainers who get a VSA and want to just add it to their list of attestations, without the need to understand the underlying format. We could ask them to cat vsa >> <>.intoto.jsonl, but that's yet an additional step. For example, the provenance from GCP is an intoto statement with additional metadata, it's not pure intoto. Users would need to retrieve the underlying intoto statement themselves; unless GCP provides a new API to retrieve the "raw" intoto.
  • race condition: as soon as you add data to an existing file, there are race conditions to be aware of. If multiple entities are trying to append to the same file, you need a way to serialize the access. In GitHub, if you run a strategy matrix, this sitution happens.

I don't know if these are good reasons :)

@TomHennen
Copy link
Contributor

The big problem is that the producer of the attestations are often distributed over the entire supply chain and are often a few steps away from the verifier. That means that every step along the way needs to know which things to propagate. If each attestation lives in a different file you wind up having to move N files for each artifact which is cumbersome and also prone to missing new things.

For example, the provenance from GCP is an intoto statement with additional metadatas

IIUC you can assemble a properly formatted self-contained DSSE from GCB, and that's what should be stuck in this file. Though I think they only make this available via the Container Analysis API at the moment and it does require some futzing with things. IMO that's a usability problem with GCB, downstream consumers of the artifact shouldn't need to support GCB's special way of doing things, so much better to encode it in a DSSE and propagate in one consistent manner.

@kpk47 kpk47 moved this to 🆕 New in Issue triage May 25, 2023
@kpk47 kpk47 moved this from 🆕 New Issues to 📋 Backlog in Issue triage May 25, 2023
@kpk47 kpk47 moved this from 📋 Backlog to Untriaged in Issue triage Jun 26, 2023
@ramonpetgrave64
Copy link

Since the VSAs have a section for inputAttestations, I don't think it particularly needs to be a jsonl.

As for slsa-verifier, we have a draft implementation of verifying VSAs: it's fine, so long as it's a single json object. So far the VSAs produced by Google do use jsonl, but are a single DSSE envelope, though no contained inputAttestations yet.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Untriaged
Development

No branches or pull requests

3 participants