Skip to content

Commit

Permalink
fix: add optional flag that allows skipping npm audit checks with OWA…
Browse files Browse the repository at this point in the history
…SP 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>
  • Loading branch information
ravi-m-bah and ltdonner-bah committed Jan 19, 2024
1 parent 3ea0f44 commit a2186fa
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions libraries/owasp_dep_check/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ OWASP Dependency Check Library Configuration Options
| `allow_suppression_file` | Allows whitelisting vulnerabilities using a suppression XML file | `true` |
| `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` |
| `image_tag` | The tag for the scanner Docker image used | `7.3.0-8.6-2` |
| `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). | |

## Example Configuration Snippet

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,11 @@ void call() {
echo "\"${suppressionFile}\" does not exist. Skipping suppression."
}
}

Boolean skipNodeAudit = config?.skip_node_audit ?: false
if (skipNodeAudit) {
args += " --disableNodeAudit"
}

// perform the scan
try {
Expand Down

0 comments on commit a2186fa

Please sign in to comment.