fix(audit): accept empty OSV source reports
This commit is contained in:
@@ -444,7 +444,8 @@ for raw_path in sorted(set(sys.argv[2:])):
|
||||
errors.append(f"{relative_path}: npm audit returned an invalid or error report")
|
||||
elif report_name.startswith("osv-scanner-") and (
|
||||
not isinstance(payload, dict)
|
||||
or not isinstance(payload.get("results"), list)
|
||||
or "results" not in payload
|
||||
or (payload["results"] is not None and not isinstance(payload["results"], list))
|
||||
):
|
||||
errors.append(f"{relative_path}: invalid OSV-Scanner report")
|
||||
elif report_name == "jscpd-report.json" and (
|
||||
|
||||
Reference in New Issue
Block a user