Skip to content

Conversation

@elfotografo007
Copy link
Contributor

Summary

Extract the namespace from the AdmissionRequest if the resource doesn't have the namespace field set correctly. Fixes #143.

Release Note

Documentation

Andrés Torres added 3 commits August 29, 2022 13:00
Signed-off-by: Andrés Torres <andrest@vmware.com>
Fixes sigstore#143
Signed-off-by: Andrés Torres <andrest@vmware.com>
Signed-off-by: Andrés Torres <andrest@vmware.com>
defer func() {
cosignVerifySignatures = cvs
}()
// Let's just say that everything is verified.
Copy link
Collaborator

Choose a reason for hiding this comment

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

I'm curious if this actually tests that we use the imagepullsecrets from the correct namespace because we use these stubbed out ones. Or if it was modified it's hard to see because this looks like cut&paste from the above tests. Would it maybe be enough to override one of these 'pass' or 'fail' and check in them that the checkopts have indeed the correct secret referenced in them.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I am not sure if we can test it there because most of the errors I saw were raised when trying to call k8schain.New while passing k8schain.Options without the proper namespace.

Copy link
Collaborator

@vaikas vaikas left a comment

Choose a reason for hiding this comment

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

Discussed offline and validated that these new tests will fail if the fix is not in.
Thanks @elfotografo007 !!

@vaikas vaikas merged commit 7d8e483 into sigstore:main Aug 30, 2022
@elfotografo007 elfotografo007 deleted the fix-ns-bug branch August 30, 2022 15:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Webhook looking for credentials in the wrong namespace

2 participants