-
Notifications
You must be signed in to change notification settings - Fork 5.8k
Open
Description
Version: Deno 2.6.3
Thank you for bringing deno audit! Currently, deno audit returns a exit code of 1 if it has a vulnerability with a severity high regardless of the level passed in params.
$ deno -v
deno 2.6.3
$ deno audit
..
Found 12 vulnerabilities
Severity: 2 low, 6 moderate, 4 high, 0 critical
$ echo $?
1
# ✅
$ deno audit --level=high
...
Found 12 vulnerabilities
Severity: 2 low, 6 moderate, 4 high, 0 critical
$ echo $?
1
# ✅
$ deno audit --level=critical
...
Found 12 vulnerabilities
Severity: 2 low, 6 moderate, 4 high, 0 critical
$ echo $?
1
# ❌ should it not returns 0? because if i filter only on critical packages, it should be an error only if there's one severity equals or greater to the selected severity levelIf the level parameters is passed, should it not returns 0 or 1 whether there's a vulnerability with a severity equals or greater than the level specified?
Actually, according to npm's website, the behavior I suggest is the one npm has implemented: npm audit exit code behavior.
If vulnerabilities were found the exit code will depend on the audit-level configuration setting.
Houss-L
Metadata
Metadata
Assignees
Labels
No labels