-
-
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
Scanning with Yarn Package Manager #2842
Comments
Yarn is not a supported package manager. Those that are using Yarn have used https://github.com/imsnif/synp to generate a package-lock.json. |
Thank you @jeremylong. I'll give that a try. Do you think the ODC parameters I'm passing are correct once I have the |
Yes, I think they look okay for now. In the future retireJs should not be disabled though... but the updates have not been made yet so for node projects you likely want to disable it. You may need to specify |
Thanks. I do appreciate your time. I think I must be missing something!! Steps (locally for now):
If I run with
If I run with
|
The Retire.JS analyzer is really more intended to identify client side JS - such that might be included in a JEE project and is not recommended to be used with a Node project. Yes, RetireJS itself does have support for Node.js - but we are not yet using the data store. By including the RetireJS analyzer today you will end up adding every single JS file as a dependency - which isn't exactly what you want. |
Actually, this is a Javascript SPA project. I've gone with So I'm still not sure if I have the correct command line parameters! |
@AndrewJWaite beware of synp, version before 1.9.4 have a bug, there's no "dev" flag in package-lock.json avec converting yarn.lock. it has been fixed in 1.9.4. Also DependencyCheck is still bugged on --nodeAuditSkipDevDependencies, so it always analyse all dependencies. It will be fixed in 6.0.3 coming soon. So you will have to use synp 1.9.5+ and dep-check 6.0.3+ |
Thanks @sebastienroux RE: SYNP, the fix is in 1.9.4 (latest version), correct?
So this:
becomes this:
Hopefully this will reduce the scan time! |
Yes sorry 1.9.4 is the latest version with the fix of missing dev flag. Normally it will reduce the scan time, i'm waiting for 6.0.3 release to test this too ;) |
Thanks @sebastienroux I'll keep a lookout. Would there be an additional parameter when invoking |
Hi,
I'm new to ODC and would like understand the the correct command line parameters I should be using.
Version: Command Line / 6.0.2
The project is built using Yarn package manager. I read that ODC requires a
package-lock.json
file. The commands I'm running are:npm install --package-lock-only --production
dependency-check.sh -s "[root folder]" --disableNodeJS --disableRetireJS --nodeAuditSkipDevDependencies
This only reports scanning 27 dependencies when the
package.json
has 52 dependencies. And the report doesn't make sense in respect to the vulnerable packages listed are not in thepackage.json
So, my question is, what commands should I be running in order to scan correctly?
Many thanks
The text was updated successfully, but these errors were encountered: