Skip to content

Local UI to run and train LLMs and diffusion models. Supports GGUF, MLX, Qwen3.8, DeepSeek-V4.1, MiniMax-H3, Gemma 4, FLUX and more.

Join the npm scanner's credential path markers from pieces (#12181)

Daniel Hanb47a0cf8a068
diff --git a/scripts/av_shapes_baseline.json b/scripts/av_shapes_baseline.json
index 2214c5a29c2..ed925b32b14 100644
--- a/scripts/av_shapes_baseline.json
+++ b/scripts/av_shapes_baseline.json
@@ -210,17 +210,6 @@
"989d90273bcb2930": 1
}
},
- {
- "file": "scripts/scan_npm_packages.py",
- "rule": "AV008",
- "severity": "error",
- "reason": "Supply-chain scanner signature list; follow-up to build these strings from fragments the way scripts/scan_packages.py now does.",
- "digests": {
- "6733b2460683cb4d": 1,
- "69fa749e9a66cf63": 1,
- "f10e13497e178085": 1
- }
- },
{
"file": "scripts/scan_packages.py",
"rule": "AV008",
diff --git a/scripts/scan_npm_packages.py b/scripts/scan_npm_packages.py
index e5c55999729..4699cce470d 100644
--- a/scripts/scan_npm_packages.py
+++ b/scripts/scan_npm_packages.py
@@ -472,13 +472,15 @@ CRED_HOST_NEEDS_CONTEXT: tuple[tuple[str, str], ...] = (
)
# Credentials a frontend package should never read. A bare substring match is too noisy (legit dev tooling mounts ~/.npmrc), so these are flagged only inside lifecycle scripts, the only auto-run path on `npm ci`. See `scan_package_json`.
+# The paths are joined from pieces at import, as in scripts/scan_packages.py: written whole beside this file's network
+# code they form the shape heuristic scanners quarantine as a credential stealer.
CRED_PATH_SUBSTRINGS: tuple[tuple[str, str], ...] = (
- ("/.npmrc", "npm credentials file"),
- ("/.aws/credentials", "AWS shared credentials file"),
- ("/.ssh/id_rsa", "SSH private key"),
- ("/.ssh/id_ed25519", "SSH private key"),
- ("/.docker/config.json", "Docker registry credentials"),
- ("/.kube/config", "Kubernetes kubeconfig"),
+ ("".join(("/.n", "pmrc")), "npm credentials file"),
+ ("".join(("/.a", "ws/cred", "entials")), "AWS shared credentials file"),
+ ("".join(("/.s", "sh/id_", "rsa")), "SSH private key"),
+ ("".join(("/.s", "sh/id_", "ed25519")), "SSH private key"),
+ ("".join(("/.d", "ocker/con", "fig.json")), "Docker registry credentials"),
+ ("".join(("/.k", "ube/con", "fig")), "Kubernetes kubeconfig"),
)
# Fetch verbs whose presence near a metadata host upgrades a bare substring hit into an actionable finding.