-
Notifications
You must be signed in to change notification settings - Fork 5.5k
Fixes provenance
always enabled
#13066
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 LGTM
For legal reasons you need to sing-off your commits
Ho and you will need to run |
this is somehow contradictory with #12853 Also, usage of this option is a bit obscure to me, as setting this to false enables |
This also makes me wonder we don't have attestation (or provenance?) attribute in the compose-spec |
.. also need to check we correctly behave when |
Good catches @ndeloof, my bad, my review was too fast 🤦♂️ |
Not strictly speaking a solution to this issue, but I created compose-spec/compose-go#809 to offer better control over attestation generation. |
Signed-off-by: keitosuwahara <[email protected]>
@ndeloof @glours Since that PR supersedes this one and addresses the same goal in a more extensible way, Happy to review or help refine anything there. |
Closing as #13067 was merged |
Problem:
Currently, the
build
optionProvenance
is hard-coded to true in therunBuild
function.This prevents users from disabling the generation of SLSA provenance metadata(used for software supply chain security and build traceability) at build time.
Since the provenance flag already exists in the buildOptions structure, this hard-coded value should be removed, and users should be able to control it via a command-line flag.
Suggestion for improvement:
Add
--provenance
flagIntroduce a new
--provenance
flag to thebuild
command. This will give users explicit control over whether provenance metadata should be generated, making the tool more flexible and intuitive.As a security best practice, the default value of this flag should be true with true as the default, so provenance is generated unless users explicitly disable it.
Benefits
Improved control: Users can disable provenance generation by specifying
--provenance=false
.Code clarity: Removes hard-coding and delegates control to existing
buildOptions
structure.Security best practice: Enabling provenance by default supports secure software supply chains.