Skip to content
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

fix: add optional flag that allows skipping npm audit checks with OWASP dependency-check scanner #214

Merged
merged 5 commits into from
Jan 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading