Skip to content

Fix attest extra arguments#3027

Merged
crazy-max merged 2 commits intodocker:masterfrom
LaurentGoderre:fix-attest-extra-args
Mar 3, 2025
Merged

Fix attest extra arguments#3027
crazy-max merged 2 commits intodocker:masterfrom
LaurentGoderre:fix-attest-extra-args

Conversation

@LaurentGoderre
Copy link
Member

The new parsing of attest argument broke support for extra args for the attest command in buildkit as shown with these tests:

https://github.com/moby/buildkit/blob/master/frontend/attestations/parse_test.go#L31-L58

Note that the case should preserved for these args as well as they are set as env var in the scanner.

@crazy-max
Copy link
Member

Signed-off-by: Laurent Goderre <laurent.goderre@docker.com>
@LaurentGoderre LaurentGoderre marked this pull request as ready for review February 27, 2025 22:10
@LaurentGoderre LaurentGoderre force-pushed the fix-attest-extra-args branch 2 times, most recently from 24c1e37 to 630c42a Compare February 28, 2025 16:26
writer := csv.NewWriter(&attr)
writer.Write([]string{pair})
writer.Flush()
pair = strings.TrimSpace(attr.String())
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You may add a comment in here that csv writer adds a newline. Not entirely obvious.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done!

Signed-off-by: Laurent Goderre <laurent.goderre@docker.com>
@crazy-max crazy-max merged commit 128acdb into docker:master Mar 3, 2025
131 checks passed
@LaurentGoderre LaurentGoderre deleted the fix-attest-extra-args branch March 3, 2025 15:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants