-
Notifications
You must be signed in to change notification settings - Fork 546
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
Possibility to easily mirror the grype database in Nexus #1723
Comments
Hi @olivierboudet -- Grype should support the standard go proxy environment variables, are you able to use these? E.g. |
mmmh I think this can't work, Nexus is not a HTTP Proxy. |
Right, I can see that currently the listing exists at: Just so I understand the ask: you're asking to take this further to then alter the published listing file to use the relative paths, correct? Which would allow you to simply mirror both the listing file and the databases without modification, as you indicated. This certainly seems like a reasonable request to me, but I haven't though through any potential security concerns. I'll bring this up with the team to see if this is something we could update. 👍 |
Hi @kzantow,
If Perhaps it is dangerous to change the behavior for older versions of grype, and it must be necessary to have two files :
|
@olivierboudet another option might be to introduce some sort of mirrors configuration specifically for this that Grype understands, which would do something along the lines of extracting the file name portion of URL and trying the configured mirror base URLs to resolve the databases and listing file. Something about this option seems like it could be more easily compromised to me, but since you can already specify the listing URL, I suppose it's not really any different than the risks introduced by that option. This will definitely need some thought before making it into Grype, but I'm pretty sure we can figure out a workable solution here. |
This feature would make it easier to setup grype repo as a remote repository in Artifactory as well. Rather than us downloading the listing.json and modifying the url to point to our internal Artifactory mirror of the grype repo. |
Is there maybe any update? I would be interested in setting up grype database as remote repository in Artifactory too. |
|
What would you like to be added:
I would like to use a private Nexus server to host the database, but it is not very easy to set it up today. I would like to just setup a proxy repo in Nexus, but it is not possible as
listing.json
file contains absolute URL with grype server hostname.I think having a
listing.json
file with relative path to database files and a new config parameter to set the server host prefix can offer the possibility to easily having an internal mirror.Moreover, it may be necessary to authenticate to such a private mirror, so a username and password may need to be set.
Why is this needed:
I would like to not depend on the availability of the grype infrastructure, and not always download database from internet.
PS : I can send a PR for this, if the proposal is accepted
The text was updated successfully, but these errors were encountered: