Conversation
Contributor
|
Invalid PR to |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Hi, and thanks for go-cqhttp.
.github/workflows/build_docker_image.ymlpublishes the image, but the pushed manifest carries no provenance or SBOM attestation. Someone pulling it cannot check that it was built by this workflow, from this repository, at that tag.go-cqhttp is run with account credentials and sits in the message path, so the image tends to be trusted with more than its size suggests.
The change is two lines on the build step:
BuildKit attaches both to the image manifest, so they travel with the image. No permissions change is needed — nothing has to gain
id-token, and your tag and cache configuration are untouched.Two caveats worth stating:
mode=maxrecords the full build including build arguments, soprovenance: trueis the smaller option if any have ever been sensitive; and attestations add an extra manifest to the index, which the registry supports.No SLSA level claimed — the attestation is what BuildKit produces.
Disclosure: I used AI assistance to help spot this and prepare the change, and I read the workflow myself.