-
Notifications
You must be signed in to change notification settings - Fork 571
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
feat: set cosign attest predicate type based on Syft output type #1598
Merged
Conversation
This file contains 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
Nirusu
force-pushed
the
feat/predicate-based-on-output
branch
from
February 21, 2023 16:21
b65d584
to
8db2182
Compare
Hi @Nirusu -- could you update to the latest |
Signed-off-by: Nils Hanke <nils.hanke@outlook.de>
Nirusu
force-pushed
the
feat/predicate-based-on-output
branch
from
February 21, 2023 17:48
8db2182
to
1d2c789
Compare
Done. |
spiffcs
previously approved these changes
Feb 22, 2023
spiffcs
approved these changes
Feb 24, 2023
@Nirusu I tested it and think we can merge as is -- I'll follow this up with maybe a small refactor that uses the correct values for the input types. Had an issue checking out the branch using |
This was referenced Mar 2, 2023
Closed
This was referenced Mar 10, 2023
Closed
GijsCalis
pushed a commit
to GijsCalis/syft
that referenced
this pull request
Feb 19, 2024
…hore#1598) Signed-off-by: Nils Hanke <nils.hanke@outlook.de>
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.
In #1533, I wanted to remove the hardcoded "custom" predicate type passed to Cosign. This seemed to fix some of the issues I was seeing, though to be honest at this point I don't know exactly why 😅
However, what I did not anticipate is that there's still no way to manually set a predicate type. Generally, I think it makes sense to set the predicate type on the type we are passing as predicate to Cosign.
Thus, here my attempt at this.
Please mind, this is untested so far. Wanted to get general feedback on this first (or if someone can quickly test this and verify the attestation, that'd be cool).
Also, if someone can tell me how I can properly reference the output type in the switch statement rather than just using string comparison based on the user input here without major refactoring, I'd be happy to hear about that :)