Skip to content

Commit b51b578

Browse files
committed
Harden dependency resolution and npm audit edge cases
Make arbitrary-ref dependency probing more tolerant of parser shape errors and mark curated scans as incomplete when curated dependencies fail to resolve. Tighten npm audit handling by: - recording discovery failures and empty installed bundle trees as incomplete - generating prod-only lockfiles with --package-lock-only when no lockfile is present - retrying ENOLOCK recovery even when node_modules exists without a lockfile - handling boolean bundleDependencies and avoiding duplicate installed-tree walks - skipping invalid GitHub advisory specifiers or versions per advisory - normalizing npm advisory IDs across modern and legacy audit payloads
1 parent 7852610 commit b51b578

3 files changed

Lines changed: 933 additions & 204 deletions

File tree

dep_checker/main.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -395,7 +395,7 @@ def main() -> int:
395395

396396
from npm_audit import NPMAuditChecker
397397
print("Running npm package vulnerability audit...", file=sys.stderr)
398-
npm_checker = NPMAuditChecker(repo_path, npm_timeout)
398+
npm_checker = NPMAuditChecker(repo_path, npm_timeout, gh_token=gh_token)
399399
npm_vulnerabilities = npm_checker.check_npm_vulnerabilities(Vulnerability)
400400
if npm_checker.failed_packages:
401401
scan_complete = False

0 commit comments

Comments
 (0)