-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
RetireJS execution #1426
Comments
All analyzers are enabled by default in the Jenkins plugin. There was a time (not sure if this is still true) that experimental analyzers had to be enabled in Maven, Cli, etc, however, the Jenkins plugin always took the approach to enable everything and let the Jenkins admin disable whatever they did not want. This approach is by design. The Retire.js analyzer needs access to GitHub in order to download. The Jenkins plugin does not have a way to specify an alternative URL. Also, the Jenkins plugin relies on config supplied globally, via job config or pipeline. If config is supplied to the plugin in an alternative way, it's outside the scope of the plugin. Also, 3.3.1 was pushed out earlier today which solves an issue downloading jsrepository.json that affected cli, maven, jenkins, etc. |
By default, the Maven, Gradle, and CLI interfaces require that you enable the experimental analyzers. This is because I wanted folks to know that they were using something experimental and forcibly turn it on. |
@jortkoopmans please enable debug logging for ‘org.owasp’ in the Jenkins logging config and post the results. |
@stevespringett according to the release notes https://github.com/jeremylong/DependencyCheck/blob/master/RELEASE_NOTES.md#version-330-2018-07-22 ,one can update the environment variable analyzer.retirejs.repo.js.ur I tried to inject this environment variable into the job config to point to a different URL, but it doesnt seem to work. It is still trying to get the URL from github. I tried both parameters analyzer.retirejs.repo.js.url and analyzer.retirejs.repo.js.ur, as I believe there is a typo in that release notes (It should be analyzer.retirejs.repo.js.url (url instead of ur)), but none of them are working. @stevespringett when you mentioned Jenkin plugin relies on config supplied globally, do you have any best practice you would recommend how to overwrite the retirejs url from Jenkins? @jeremylong I agreed to that approach. I think it would be a better approach too if Jenkins Plugin is having the same behavior so that
|
The release notes in this repo only partially apply to the Jenkins plugin, which has it's own repo, build environment, and feature/defect management system. The Jenkins plugin does not have release notes, rather it uses a change log that is attached to the plugins public wiki. I believe the release notes you're referring to are incorrect. Dependency-Check doesn't use environment variables, rather it uses system properties to override behavior that is typically configured in dependency-check.properties. Since the property file cannot be easily modified in a Jenkins environment, using system properties may provide a way to modify the behavior - although untested and unsupported in the Jenkins plugin. Try setting I honestly have no idea where this would need to be added - Jenkins master startup, node initialization, job config, etc. If none of that works, a workaround would be to extract the hpi, find and modify dependency-check.properties with the URL to the mirror, repackage the hpi, and reinstall on master servers. |
Hello, |
A shared data directory and a dedicated dc update job that blocks all other dc jobs is recommended. Are you using the embedded H2 database or an external one? |
Just for a heads-up, it looks like it is not possible to pass System Properties using The workaround provided is helpful, but shouldnt be used as a permanent solution, as everytime a Dependency Check Jenkins Plugin is updated, all the effort needs to be repeated again. I created an improvement ticket for Dependency Check Plugin to provide a configuration for an alternative URL https://issues.jenkins-ci.org/browse/JENKINS-52992 |
Is it possible to enable retirejs analyzer only in CLI, without enabling the rest of the experimental ones? In the log file, it sees the property, but then resetting it to false afterward:
|
The answer of my question could relate to #1440 |
@gbena you would have to enable the experimental analyzers and then explicitly disable the experimental analyzers you do not want enabled. |
@jeremylong, thanks for the feedback. The reason I said why this issue could relate to #1440 is that, when I enable this option alone (note the typo)
retirejs analyzer will kick. I dont have to enable the experimental analyzer at all. What I need to do is to enable that only. This makes me think that it is probably sufficient to enable
to just have retirejs analyzer enabled without enabling the other experimental analyzer. On the other hand, I think activating |
the retired vs retirejs was fixed in a previous release. |
This issue is between DC and DC Jenkins plugin. It is very related to both, hence I am not sure where to open this issue. Here vs DC Jenkins Github space. Opening the issue here nevertheless.
It appears that there is an inconsistency between DC core/cli and DC Jenkins plugin.
As far as I can see, RetireJS in DC core is still seen as experimental, using the DC Jenkins plugin however, this scanner will be executed as default. Please correct me if my observation is wrong.
The discrepancy is an issue because the DC core is not downloading/updating the jsrepository.json from the retirejs. When running this on a pure Jenkins (scan, update repo/ --updateonly), there wont be any jsrepository.json downloaded in the data directory. This will fail the build.
I couldnt find a way to update the jsrepository.json using the cli. I tried --disableRetireJS false and --enableExperimental. None of the options work.
Also, wouldnt it be a better option (or at least supported by the DC plugin) that user/admin can provide the RetireJS URL instead of reading this from an environment variable, as this needs to be injected to Jenkins.
The text was updated successfully, but these errors were encountered: