-
Notifications
You must be signed in to change notification settings - Fork 173
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
fix: check public key for signed packages during zarf package pull #3347
Conversation
Signed-off-by: Austin Abro <[email protected]>
Signed-off-by: Austin Abro <[email protected]>
✅ Deploy Preview for zarf-docs canceled.
|
Signed-off-by: Austin Abro <[email protected]>
Codecov ReportAttention: Patch coverage is
|
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.
refactored this test to create and publish the package to an in memory registry, this way we don't rely on external private keys or external infrastructure. Added a test to ensure pulling the package without a public key fails and verified that it does fail on main.
Signed-off-by: Austin Abro <[email protected]>
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
func (suite *PullInspectTestSuite) TearDownSuite() { | ||
local := fmt.Sprintf("zarf-package-dos-games-%s-1.0.0.tar.zst", e2e.Arch) | ||
e2e.CleanFiles(suite.T(), local) | ||
suite.Reference.Registry = testutil.SetupInMemoryRegistry(testutil.TestContext(suite.T()), suite.T(), 31888) |
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.
TIL testutil.SetupInMemoryRegistry
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's very useful for unit tests as well, once the create refactor is merged, we should be able to make tests for publish and pull with unit tests
Description
zarf package pull
ignores the--key
when pulling signed packagesRelated Issue
Fixes #3346
Checklist before merging