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

add severity-filter feature #70

Merged
merged 2 commits into from
Jul 22, 2021
Merged

add severity-filter feature #70

merged 2 commits into from
Jul 22, 2021

Conversation

ansidorov
Copy link
Contributor

Resolve #69

Running scan without .njsscan file:

❯ docker run -v $(pwd):/app njsscan /app --json | jq '.nodejs[].metadata.severity'
"INFO"
"INFO"
"WARNING"
"INFO"
"INFO"
"WARNING"
"WARNING"
"WARNING"
"WARNING"
"ERROR"
"ERROR"
"ERROR"
"WARNING"
"ERROR"

Add .njsscan file with content:

---
- severity-filter:
  - ERROR
  - WARNING

And got only WARNING and ERROR results:

❯ docker run -v $(pwd):/app njsscan /app --json | jq '.nodejs[].metadata.severity'
"WARNING"
"WARNING"
"WARNING"
"WARNING"
"WARNING"
"ERROR"
"ERROR"
"ERROR"
"WARNING"
"ERROR"

Copy link
Owner

@ajinabraham ajinabraham left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍

@ajinabraham ajinabraham merged commit b7c1434 into ajinabraham:master Jul 22, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Replicate Severity filter
2 participants