-
Notifications
You must be signed in to change notification settings - Fork 18
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
update oras push syntax to fix issue with 0 length config #16
Conversation
Thanks for your contribution! Did you confirm it worked with Trivy? |
Yes, I have tested this with an install of Trivy on our air-gapped network, and it works with out any issues. This is a relatively small change and will have no negative impact to users. |
This PR coincides with aquasecurity/trivy-db#305 |
Thanks for confirming. We also need to test it on our end. |
Here are the successful database builds: And here is a successful trivy scan using these builds:
|
Hello @knqyf263
Trivy works correctly with these changes. |
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.
Thanks for your work @rdjones517
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.
Thank you guys!
This pull request updates the syntax used to push the OCI artifact. Using /dev/null as the source for the config results in a zero (0) length blob, this causes an error when using
oras copy
to copy the artifact to another v2 API registry. Using the new--artifact-type
parameter creates a config of the given type, containing an empty json object{}
, and allows for the artifact to be copied successfully.This change is necessary to allow the trivy java db OCI artifact to be copied to a registry hosted on an air-gapped network.