Skip to content

Commit a2186fa

Browse files
fix: add optional flag that allows skipping npm audit checks with OWASP dependency-check scanner (#214)
* fix: adding possible flag to disable npm audit reports * chore: added space * chore: docs * fix: set default to false * chore: update libraries/owasp_dep_check/README.md on typo Co-authored-by: ltdonner-bah <141174159+ltdonner-bah@users.noreply.github.com> --------- Co-authored-by: ltdonner-bah <141174159+ltdonner-bah@users.noreply.github.com>
1 parent 3ea0f44 commit a2186fa

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

libraries/owasp_dep_check/README.md

+1
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ OWASP Dependency Check Library Configuration Options
3131
| `allow_suppression_file` | Allows whitelisting vulnerabilities using a suppression XML file | `true` |
3232
| `suppression_file` | Path to the suppression file (see [here](https://jeremylong.github.io/DependencyCheck/general/suppression.html) for how to create a suppression file) | `dependency-check-suppression.xml` |
3333
| `image_tag` | The tag for the scanner Docker image used | `7.3.0-8.6-2` |
34+
| `skip_node_audit` | Skips the node audit with `--disableNodeAudit` if set to true. This can be useful if you have other mechanisms to audit npm packages (ex: npm audit). | |
3435

3536
## Example Configuration Snippet
3637

libraries/owasp_dep_check/steps/application_dependency_scan.groovy

+5
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,11 @@ void call() {
4242
echo "\"${suppressionFile}\" does not exist. Skipping suppression."
4343
}
4444
}
45+
46+
Boolean skipNodeAudit = config?.skip_node_audit ?: false
47+
if (skipNodeAudit) {
48+
args += " --disableNodeAudit"
49+
}
4550

4651
// perform the scan
4752
try {

0 commit comments

Comments
 (0)