Skip to content
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

bundle: dont sign manifest when empty #4730

Merged
merged 1 commit into from Jun 2, 2022
Merged

bundle: dont sign manifest when empty #4730

merged 1 commit into from Jun 2, 2022

Conversation

friedrichsenm
Copy link
Contributor

Previously, when creating a signed bundle and either no .manifest
file is present or when the contents are the defaults, no .manifest
file would get written to the .tar.gz output but there would be an
entry for the manifest in the .signatures.json file when trying to
verify the bundle. I modified the signature process to skip hashing
the manifest when it is empty for whatever reason.

Fixes #4712

Signed-off-by: Matt F 15720856+friedrichsenm@users.noreply.github.com

Previously, when creating a signed bundle and either no `.manifest`
file is present or when the contents are the defaults, no `.manifest`
file would get written to the `.tar.gz` output but there would be an
entry for the manifest in the `.signatures.json` file when trying to
verify the bundle. Now, hashing/signing the manifest file is skipped
when it is empty or not present.

Fixes #4712

Signed-off-by: Matt F <15720856+friedrichsenm@users.noreply.github.com>
Copy link
Member

@ashutosh-narkar ashutosh-narkar left a comment

Choose a reason for hiding this comment

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

lgtm

@ashutosh-narkar ashutosh-narkar merged commit e971a8f into open-policy-agent:main Jun 2, 2022
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.

Creating a signed bundle implicitly signs a .manifest file even when one doesn't exist
2 participants