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

versioning source #586

Open
laurentsimon opened this issue Jan 25, 2023 · 1 comment
Open

versioning source #586

laurentsimon opened this issue Jan 25, 2023 · 1 comment

Comments

@laurentsimon
Copy link
Contributor

laurentsimon commented Jan 25, 2023

It's possible for an attacker to ask a trusted builder (#515) to build a source repo at a commit sha of their choice. This means that merely verifying the source repo will leave us open to downgrade attacks.

So I'm wondering whether versioning and version verification should be part of the SLSA specs. I imagine something to the effect of:

"externalParameters": {
        "source": {
          "artifactRef": {
              "uri": "git+https://github.com/octocat/hello-world@refs/heads/main",
              "digest": { "sha1": "c27d339ee6075c1f744c5d4b200f7901aad2c369" },
              "version": { "semver": "v1.2.3" },
          }
      },

This would also simplify verification when appending attestation to existing bundles slsa-framework/slsa-github-generator#1565 (comment)

There are caveats, like the fact that an artifact not intended to be released but used for staging / testing won't have a "release version".

There are other types of information (e.g., dev vs prod builds, branch) that could be part of the SLSA specs, but may require broader discussion.

NOTE: not all trusted builders allow building arbitrary repositories. For example, the GitHub generators only allow the maintainers of the project to build it. (In this scenario the risk is low)

@laurentsimon laurentsimon changed the title versioning subjects versioning source Jan 25, 2023
@laurentsimon
Copy link
Contributor Author

Another use case that came up if whether tests were run as part of the release process.

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

1 participant