-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Ensure Provenance Material URIs for OCI sources are configured to use pkg:oci
PURLs
#3918
Conversation
client/client_test.go
Outdated
@@ -7564,7 +7565,7 @@ func testExportAttestations(t *testing.T, sb integration.Sandbox) { | |||
|
|||
purls := map[string]string{} | |||
for _, k := range targets { | |||
p, _ := purl.RefToPURL(k, &ps[i]) | |||
p, _ := purl.RefToPURL(packageurl.TypeDocker, k, &ps[i]) |
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.
it would be better if this used string constants instead. Otherwise we are running the same function both in implementation and in test.
So did these values actually change as well?
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.
The values haven't changed, no, we just move the packageurl.TypeDocker
from inside the function to outside the function.
I've changed these to string constants (still need a bit of printf magic) - I've put this commit at the start of the patch stack, and verified that the values stay constant with each patch.
Signed-off-by: Justin Chadwell <me@jedevc.com>
Signed-off-by: Justin Chadwell <me@jedevc.com>
This also allows us to specify that local images should be generated with exactly the same specification as remote images, but with the pkg:oci scheme instead of pkg:docker. Signed-off-by: Justin Chadwell <me@jedevc.com>
Signed-off-by: Justin Chadwell <me@jedevc.com>
Signed-off-by: Justin Chadwell <me@jedevc.com>
Previously, OCI layout sources were being incorrectly recorded in the materials.
There were two main issues:
ResolveImageConfig
(which can take aResolverType
parameter to read from local oci stores).Now locally loaded images are more reasonably recorded in the materials. See the added test.