dependency-check / dependency-check/DependencyCheck
--nodeAuditSkipDevDependencies does not seem to work reliably
- Dominant language
- Java
- Stars
- 7.7k
- Forks
- 1.4k
- Avg merge
- 9d 22h
- Merged PRs (30d)
- 13
Description
**Describe the bug**
Using the --nodeAuditSkipDevDependencies does not seem to work, at least when analyzing an Angular project
**Version of dependency-check used**
This has been tested against version 7.3.0, 7.4.1, and 7.4.4.
**Log file**
When reporting errors, 99% of the time log file output is required. Please post the log file as a [gist](https://gist.github.com/) and provide a link in the new issue.
**To Reproduce**
1. Use the following Package.json:
`{
"name": "dependency-check-test",
"version": "0.0.0",
"scripts": {
"ng": "ng",
"start": "ng serve",
"build": "ng build",
"watch": "ng build --watch --configuration development",
"test": "ng test"
},
"private": true,
"dependencies": {
"@angular/animations": "^14.1.0",
"@angular/common": "^14.1.0",
"@angular/compiler": "^14.1.0",
"@angular/core": "^14.1.0",
"@angular/forms": "^14.1.0",
"@angular/platform-browser": "^14.1.0",
"@angular/platform-browser-dynamic": "^14.1.0",
"@angular/router": "^14.1.0",
"rxjs": "~7.5.0",
"tslib": "^2.3.0",
"zone.js": "~0.11.4"
},
"devDependencies": {
"@angular-devkit/build-angular": "^14.1.0",
"@angular/cli": "~14.1.0",
"@angular/compiler-cli": "^14.1.0",
"@types/jasmine": "~4.0.0",
"jasmine-core": "~4.2.0",
"karma": "~6.4.0",
"karma-chrome-launcher": "~3.1.0",
"karma-coverage": "~2.2.0",
"karma-jasmine": "~5.1.0",
"karma-jasmine-html-reporter": "~2.0.0",
"typescript": "~4.7.2"
}
}
`
2. Execute npm i
3. Execute dependency-check.bat --failOnCVSS 7 --disableYarnAudit --nodeAuditSkipDevDependencies --scan .
4. glob-parent:5.1.2: CVE-2021-35065(7.5) is reported in the failure, despite only being a dependency of devDependencies @angular-devkit/build-angular, @angular/cli, @angular/compiler-cli, and karma, all via chokidar, and not of a project dependencies
**Expected behavior**
No CVSS should be identified in the direct dependencies of the project
**Additional context**
My understanding was that this failure would be excluded by using the --nodeAuditSkipDevDependencies flag, however, it does not seem to work. I found several recent issues about devDependencies and tried several versions as listed above to no avail. I may be incorrect in my understanding, however, of how this flag works and how to handle devDependency CVSS'.
Note that the report is 20 megs in size, so I have zipped it.
[dependency-check-report.zip](https://github.com/jeremylong/DependencyCheck/files/10387075/dependency-check-report.zip)
Contributor guide
Assessment
This issue has not been assessed yet.