feat: Allow to pass NVD API key via environment variable#6454
feat: Allow to pass NVD API key via environment variable#6454jeremylong merged 2 commits intodependency-check:mainfrom
Conversation
|
It would likely be good to include a default env variable name - and if it exists use it. |
|
@jeremylong Do you have a good idea for a default environment variable name? The problem is https://github.com/eclipse/sisu.plexus/issues/29 here, i.e. it is not easy to invalidate the default value. In order to deliberately not use the environment variable name with the default value one would need to provide an invalid environment name (as empty strings do not overwrite the default value). Also with the default value it is no longer clear what the intention of the user is (i.e. when to emit warnings/error in case of unassigned environment variables). Given all that I would rather not give a default value. |
Clarify precedence of API key plugin parameters in javadoc This closes dependency-check#6443
baf5289 to
69dc50b
Compare
|
Regarding the default environment variable name - why would it be a problem if there was a default? Do you think random machines using ODC would have an environment variable: |
Unlikely but may happen. My concern is more that it becomes impossible to emit a proper warning in case something is not setup as it should be. With this PR the following sources are considered
Each option is only considered if the accoding plugin parameter is set. |
Clarify precedence of API key plugin parameters in javadoc This closes #6443
Fixes Issue #6443
Have test cases been added to cover the new functionality?
no