Unofficial demo by Cheryl Aurelia. Not affiliated with Hacktron.

HACKTRON · DEPENDENCY SCAN ACTION

A PR adding debug@4.4.2 got “All 432 new/changed dependencies look clean.”

Problem: 372 of 432 lookups were rate-limited (HTTP 429) and counted as advisory “unknown”, so the check passed; Hacktron’s own API calls that version malicious.

Fix: a lookup with no verdict fails the run, and 429s are retried after the server’s retry-after window; the same PR is then blocked.

Fix branch [2 commits]Demo repo + repro filesHacktronAI/dependency-scan

1. Throttled lookups pass as clean

A PR that adds the lockfile of a fresh Next.js 15 app (432 packages, the shape of a first adoption or a lockfile regeneration), with the top-level debug at 4.4.2, the version compromised in September 2025. Same file, same live API, default HFW_PARALLEL=4.

Before: main

check passes (wrongly)

hfw_report.py · main (abdf725)

PR comment

All 432 new/changed dependencies look clean.

added or changed: 432 · malicious: 0 · suspicious: 0 · clean: 60 · unknown: 372

HTTP 429 responses
372
job result
passed
time
36 s

unknown debug@4.4.2 (None)

debug@4.4.2 got a 429 and was listed as unknown.

First commit alone (one line)

check fails: ERROR

hfw_report.py · first commit alone

No PR comment (the comment steps run only on success); job annotation

::error::Hacktron could not get verdicts for 328 package(s). First error: [root] @babel/template@7.29.7 -> http error 429

HTTP 429 responses
325
job result
failed (ERROR, exit 3)
time
71.8 s

unknown debug@4.4.2 (error: http error 429)

A separate run (325 × 429, 3 connection errors). Closes the hole, but every PR over ~100 packages would now fail, which is why the retry is in the same PR.

The fix: fail closed + retry

check fails: blocked

hfw_report.py · fail closed + retry (2 commits)

PR comment

Blocking — 1 malicious package(s) introduced by this PR.

added or changed: 432 · malicious: 1 · suspicious: 0 · clean: 431 · unknown: 0

HTTP 429 responses
0
job result
failed (malicious_count=1)
time
272.2 s

malicious debug@4.4.2 (ready)

Every lookup got a verdict after retries; 272.2 s for 432 packages.

Why: probe() knows the response had no verdict, but returns the transport error, which is None when a 4xx body is JSON. The throttler’s 429 is JSON:

HTTP/2 429  retry-after-short: 1
{"statusCode":429,"message":"ThrottlerException: Too Many Requests"}

# scripts/hfw_report.py, probe()
    is_server_error = last_error is not None or not last_body.get("status")   # True
+   error = None
+   if is_server_error:
+       # A JSON error body (e.g. the throttler's 429) leaves last_error unset.
+       error = last_error or f"http error {last_status}"
    ...
-   "error": last_error if is_server_error else None,                        # None
+   "error": error,

Also: npm aliases are checked under the alias name

npm install http-client@npm:axios@1.14.1 writes node_modules/http-client with "name": "axios". The Action asked about http-client@1.14.1. Rarer than the throttle: in real trees aliases are mostly benign (string-width-cjs via @isaacs/cliui), but an alias is also an easy way to slip a package past this check. A separate follow-up commit.

Before: aliased axios@1.14.1

check passes (wrongly)

hfw_report.py · main (abdf725)

PR comment

All 23 new/changed dependencies look clean.

added or changed: 23 · malicious: 0 · suspicious: 0 · clean: 20 · unknown: 3

HTTP 429 responses
0
job result
passed

clean http-client@1.14.1 (ready)

Looked up as http-client: clean.

Control: plain axios@1.14.1

check fails: blocked

hfw_report.py · main (abdf725)

PR comment

Blocking — 1 malicious package(s) introduced by this PR.

added or changed: 23 · malicious: 1 · suspicious: 0 · clean: 19 · unknown: 3

HTTP 429 responses
0
job result
failed (malicious_count=1)

malicious axios@1.14.1 (ready)

Same version, no alias: blocked.

With the alias follow-up

check fails: blocked

hfw_report.py · + alias follow-up

PR comment

Blocking — 1 malicious package(s) introduced by this PR.

added or changed: 23 · malicious: 1 · suspicious: 0 · clean: 22 · unknown: 0

HTTP 429 responses
0
job result
failed (malicious_count=1)
time
13.5 s

malicious axios@1.14.1 (ready)

Looked up as axios: blocked.

# parse_package_lock_json(): the same rule hacktron.ai/tools/package already uses
#   (t.name ?? key.split("node_modules/").at(-1))
-   name = key[idx + len(marker) :]
+   alias_of = meta.get("name")
+   name = (
+       alias_of
+       if isinstance(alias_of, str) and alias_of
+       else key[idx + len(marker) :]
+   )

The patch

How this was tested

Hacktron’s unmodified hfw_report.py (v1.0.0) with the env action.yml sets, against the API URL it calls by default (api-staging.hacktron.ai/v1/hfw), on 2026-11-18: about 4,400 lookups across 18 runs, at least 60 s apart. Lockfiles were made with npm --package-lock-only; nothing was installed. They are in the demo repo’s repro/ folder.