Skip to content

Commit 099b095

Browse files
committed
wip
1 parent 040d26d commit 099b095

1 file changed

Lines changed: 11 additions & 1 deletion

File tree

dep_checker/npm_audit.py

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ def run_npm_install(self, package_dir: Path) -> bool:
136136
result = subprocess.run(
137137
[
138138
"npm", "install", "--omit=dev", "--ignore-scripts",
139-
"--no-audit", "--no-fund", "--silent",
139+
"--no-audit", "--no-fund",
140140
],
141141
cwd=package_dir,
142142
capture_output=True,
@@ -353,6 +353,16 @@ def parse_audit_results(
353353

354354
except Exception as e:
355355
logger.error(f"Error parsing audit results from {package_dir}: {e}")
356+
if isinstance(audit_data, dict):
357+
keys = sorted(audit_data.keys())
358+
logger.error(f"npm audit JSON top-level keys for {package_dir}: {keys}")
359+
if "error" in audit_data:
360+
logger.error(f"npm audit JSON error payload for {package_dir}: {audit_data['error']}")
361+
metadata = audit_data.get("metadata")
362+
if metadata is not None:
363+
logger.error(f"npm audit JSON metadata for {package_dir}: {metadata}")
364+
else:
365+
logger.error(f"npm audit JSON type for {package_dir}: {type(audit_data).__name__}")
356366
return None
357367

358368
def check_npm_vulnerabilities(self, vulnerability_class) -> List:

0 commit comments

Comments
 (0)