downcase subject name for OCI images #63
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Automatically downcases the subject name when the
push-to-registry
flag is supplied. The OCI spec requires that the image repository name be all lower-case, so any time a user is pushing an attestation to a registry the subject name MUST conform to the OCI spec.This is mainly a problem when the GitHub repository name is used as the repository name with something like this:
If the GH repository name happens to contain uppercase characters this will fail.
The change made here will ensure that this use case will succeed even if the GH repo name contains uppercase characters.
It's worth noting that the
docker/metadata-action
anddocker/buid-push-action
actions perform a similar transformation on the input to ensure a valid image name.See: actions/attest-build-provenance#71