-
Notifications
You must be signed in to change notification settings - Fork 9
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
Consider a more cache-friendly db location #65
Comments
I've often thought it's a bit odd that Watson completely overrides the DependencyCheck defaults instead of doing so selectively. I know it needs to override the I think I'd like to dig deeper into this and use the core lib's properties by default and only override things that Watson specifically needs to override and then, yes, option 4 could easily fall out of that and also 3.2 would just work automatically ( I think it would also make life easier to add an option that can specify individual property overrides (multi-option producing a vector). |
Ya, agreed. If I understand nvd-clojure correctly it concerns itself only with dependency-check settings it is specifically interested in. |
While testing, I was surprised that the entire nvd db was being downloaded again. |
I think this will fall out of the work in #66 and then it'll just need a readme update regarding the default location of the db and how to override it? |
I think the fact that clj-watson is overriding a sensible DependencyCheck default for I think we should document where the db is saved and how to cache it sensibly on CI. We could make a short mention of how to override the default db location (via system property or
|
Agreed. I notice right now that DependencyCheck has:
So that has stayed the same across 9.x and 10.x -- and we need to decide whether to stop overriding it (my preference, since it would then become CI cache-friendly as part of I guess the thing that needs to be verified is whether DependencyCheck will still correctly expand |
I like your preference of clj-watson no longer overriding
So I don't think the Example of override via system property:
And db is written to:
|
Ah, very nice! Shall we leave this open as a reminder for the documentation, after #66 is dealt with? |
We could deal with it directly and close it. I'd have to verify but, probably:
Then #66 could do the fuller and more general work. Happy to take a crack at it. |
PR #106 has been merged. |
Currently
The default nvd database location is
/tmp/db/cache
But...
This isn't terribly CI service-friendly when it comes to caching.
There are big advantages to caching the nvd database so that it can be updated with new entries rather than entirely re-downloaded. Updating:
Options
Some options I've thought of:
Option 1: Do nothing
Not interested in addressing this issue.
Option 2: Document only
Document a way for the user to change the database location.
I do see the potential configuration entry that might be overridden.
I suppose the user would do this via
--dependency-check-properties
cmd line arg.(Would have to verify)
Option 3: Allow user to easily override
--clj-watson-properties
Option 4: Default to the default dependency check location
The default location is under the
~/.m2
repo alongside dependency check dep.Example:
/home/lee/.m2/repository/org/owasp/dependency-check-utils/10.0.3/data/9.0
(So, in other words, don't override the default for clj-watson).
Proposal
I like option 4.
This could be combined with Option 3.2 for relatively easy overriding.
I personally don't think
/tmp
is a great spot for this db in general - and especially for CI.Next Steps
I am also happy to explore further.
If you agree we should take action, I volunteer to create a PR.
The text was updated successfully, but these errors were encountered: