fullshield 1.0.1 → 1.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +25 -1
- package/README.md +73 -3
- package/dist/agent.js +50 -40
- package/dist/cli/index.js +103 -93
- package/dist/compliance.js +2 -2
- package/dist/iac.js +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +84 -74
- package/dist/mcp.js +53 -43
- package/dist/runtime/auto.js +5 -5
- package/dist/runtime/rasp.js +7 -7
- package/dist/runtime/register.js +6 -6
- package/dist/supply.js +5 -5
- package/models/index.json +1 -1
- package/models/npm-builders.json +3 -0
- package/models/npm-popular.json +2414 -0
- package/models/ssti.json +14 -0
- package/models/vendored.json +15 -0
- package/models/webhooks.json +9 -0
- package/package.json +2 -2
- package/rules/CONFIG-ELECTRON-001.md +11 -0
- package/rules/CONFIG-ELECTRON-002.md +11 -0
- package/rules/CONFIG-ELECTRON-003.md +11 -0
- package/rules/CONFIG-ENGINES-001.md +11 -0
- package/rules/CONFIG-LIFECYCLE-001.md +11 -0
- package/rules/CONFIG-NEXT-001.md +11 -0
- package/rules/CONFIG-NEXT-002.md +11 -0
- package/rules/DEPS-ALIAS-SQUAT-001.md +11 -0
- package/rules/DEPS-BADINTEGRITY-001.md +11 -0
- package/rules/DEPS-BIDI-001.md +11 -0
- package/rules/DEPS-BIN-SHADOW-001.md +11 -0
- package/rules/DEPS-BUNDLED-001.md +11 -0
- package/rules/DEPS-COREPACK-001.md +11 -0
- package/rules/DEPS-DEPRECATED-REPLACE-001.md +11 -0
- package/rules/DEPS-DEV-PROD-EDGE-001.md +11 -0
- package/rules/DEPS-DUALPACKAGE-001.md +11 -0
- package/rules/DEPS-ENGINE-STRICT-001.md +11 -0
- package/rules/DEPS-FILESPEC-001.md +11 -0
- package/rules/DEPS-FLOAT-001.md +11 -0
- package/rules/DEPS-FLOAT-002.md +11 -0
- package/rules/DEPS-GITDEP-001.md +11 -0
- package/rules/DEPS-GITSPEC-001.md +11 -0
- package/rules/DEPS-GRAPH-ALIAS-001.md +11 -0
- package/rules/DEPS-GRAPH-OPTIONAL-001.md +11 -0
- package/rules/DEPS-HOMOGLYPH-001.md +11 -0
- package/rules/DEPS-LINKDEP-001.md +11 -0
- package/rules/DEPS-LOCKOMIT-001.md +11 -0
- package/rules/DEPS-LOCKPATH-001.md +11 -0
- package/rules/DEPS-LOCKVER-001.md +11 -0
- package/rules/DEPS-MIXEDSCRIPT-001.md +11 -0
- package/rules/DEPS-MULTLOCK-001.md +11 -0
- package/rules/DEPS-NAME-CASE-001.md +11 -0
- package/rules/DEPS-NAME-ENCODED-001.md +11 -0
- package/rules/DEPS-NAME-LENGTH-001.md +11 -0
- package/rules/DEPS-NOINTEGRITY-001.md +11 -0
- package/rules/DEPS-NONSEMVER-001.md +11 -0
- package/rules/DEPS-NORESOLVED-001.md +11 -0
- package/rules/DEPS-NPMALIAS-001.md +11 -0
- package/rules/DEPS-NPMRC-HOME-001.md +11 -0
- package/rules/DEPS-NPMRC-REG-001.md +11 -0
- package/rules/DEPS-NPMRC-SCRIPT-001.md +11 -0
- package/rules/DEPS-OPTIONAL-IMPORT-001.md +11 -0
- package/rules/DEPS-OSCPU-001.md +11 -0
- package/rules/DEPS-OVERRIDE-ALIAS-001.md +11 -0
- package/rules/DEPS-OVERRIDE-VULN-001.md +11 -0
- package/rules/DEPS-OVERRIDE-WIDE-001.md +11 -0
- package/rules/DEPS-PACKAGEMANAGER-001.md +13 -0
- package/rules/DEPS-PACKAGEMANAGER-002.md +11 -0
- package/rules/DEPS-PEER-MISSING-001.md +11 -0
- package/rules/DEPS-PEER-UNDECLARED-001.md +11 -0
- package/rules/DEPS-PHANTOM-002.md +11 -0
- package/rules/DEPS-PUBLISHCONFIG-001.md +11 -0
- package/rules/DEPS-PUBLISHCONFIG-002.md +11 -0
- package/rules/DEPS-REG-AGE-001.md +11 -0
- package/rules/DEPS-REG-BIN-001.md +11 -0
- package/rules/DEPS-REG-BUILDER-001.md +11 -0
- package/rules/DEPS-REG-DEPRECATED-001.md +11 -0
- package/rules/DEPS-REG-DEPS-001.md +11 -0
- package/rules/DEPS-REG-DRIFT-001.md +11 -0
- package/rules/DEPS-REG-ENGINES-001.md +11 -0
- package/rules/DEPS-REG-INSTALLSCRIPT-001.md +11 -0
- package/rules/DEPS-REG-INTEGRITY-001.md +11 -0
- package/rules/DEPS-REG-MAINTAINER-001.md +11 -0
- package/rules/DEPS-REG-NPMUSER-001.md +11 -0
- package/rules/DEPS-REG-PEER-001.md +11 -0
- package/rules/DEPS-REG-PROV-ABSENT-001.md +11 -0
- package/rules/DEPS-REG-REPO-001.md +11 -0
- package/rules/DEPS-REG-REPOSITORY-001.md +11 -0
- package/rules/DEPS-REG-SIGNATURES-001.md +11 -0
- package/rules/DEPS-REG-SUBJECT-001.md +11 -0
- package/rules/DEPS-REG-TARBALL-001.md +11 -0
- package/rules/DEPS-REG-TIME-001.md +11 -0
- package/rules/DEPS-REG-UNPUBLISHED-001.md +11 -0
- package/rules/DEPS-REPEAT-001.md +11 -0
- package/rules/DEPS-RESOLVED-HOST-001.md +11 -0
- package/rules/DEPS-RESOLVED-HTTP-001.md +11 -0
- package/rules/DEPS-ROOTVER-001.md +11 -0
- package/rules/DEPS-SCOPE-NEW-001.md +11 -0
- package/rules/DEPS-SCOPE-SYNTAX-001.md +11 -0
- package/rules/DEPS-SCOPE-TYPO-001.md +11 -0
- package/rules/DEPS-SCRIPT-BASE64-001.md +11 -0
- package/rules/DEPS-SCRIPT-BIN-001.md +11 -0
- package/rules/DEPS-SCRIPT-COND-001.md +11 -0
- package/rules/DEPS-SCRIPT-CURL-001.md +11 -0
- package/rules/DEPS-SCRIPT-DEV-001.md +11 -0
- package/rules/DEPS-SCRIPT-GIT-001.md +11 -0
- package/rules/DEPS-SCRIPT-LOCK-001.md +11 -0
- package/rules/DEPS-SCRIPT-MISMATCH-001.md +11 -0
- package/rules/DEPS-SCRIPT-MULTI-001.md +11 -0
- package/rules/DEPS-SCRIPT-NODEGYP-001.md +11 -0
- package/rules/DEPS-SCRIPT-OPTIONAL-001.md +11 -0
- package/rules/DEPS-SCRIPT-PREPARE-001.md +11 -0
- package/rules/DEPS-SCRIPT-PREPUBLISH-001.md +11 -0
- package/rules/DEPS-SCRIPT-PUBLISH-001.md +11 -0
- package/rules/DEPS-SCRIPT-ROLLUP-001.md +11 -0
- package/rules/DEPS-SCRIPT-SHEBANG-001.md +11 -0
- package/rules/DEPS-SCRIPT-TOKEN-001.md +11 -0
- package/rules/DEPS-SCRIPT-TRANSITIVE-001.md +11 -0
- package/rules/DEPS-SCRIPT-TRUSTED-001.md +11 -0
- package/rules/DEPS-SCRIPT-WRITE-001.md +11 -0
- package/rules/DEPS-SELFNAME-001.md +11 -0
- package/rules/DEPS-SEPARATOR-001.md +11 -0
- package/rules/DEPS-SHRINKWRAP-001.md +11 -0
- package/rules/DEPS-SHRINKWRAP-002.md +11 -0
- package/rules/DEPS-SUFFIX-001.md +11 -0
- package/rules/DEPS-TAGSPEC-001.md +11 -0
- package/rules/DEPS-TARBALL-BIN-001.md +11 -0
- package/rules/DEPS-TARBALL-CRED-001.md +11 -0
- package/rules/DEPS-TARBALL-DYNAMIC-001.md +11 -0
- package/rules/DEPS-TARBALL-ENV-001.md +11 -0
- package/rules/DEPS-TARBALL-HASH-001.md +11 -0
- package/rules/DEPS-TARBALL-HIDDEN-001.md +11 -0
- package/rules/DEPS-TARBALL-HOOK-001.md +11 -0
- package/rules/DEPS-TARBALL-ID-001.md +11 -0
- package/rules/DEPS-TARBALL-INSTALLJS-001.md +11 -0
- package/rules/DEPS-TARBALL-LICENSE-001.md +11 -0
- package/rules/DEPS-TARBALL-LIFECYCLE-001.md +11 -0
- package/rules/DEPS-TARBALL-MANIFEST-001.md +11 -0
- package/rules/DEPS-TARBALL-NATIVE-001.md +11 -0
- package/rules/DEPS-TARBALL-NET-001.md +11 -0
- package/rules/DEPS-TARBALL-OBFUSC-001.md +11 -0
- package/rules/DEPS-TARBALL-PATH-001.md +11 -0
- package/rules/DEPS-TARBALL-SHELL-001.md +11 -0
- package/rules/DEPS-TARBALL-SIZE-001.md +11 -0
- package/rules/DEPS-TARBALL-SKIP-001.md +11 -0
- package/rules/DEPS-TARBALL-TOPLEVEL-001.md +11 -0
- package/rules/DEPS-TRUSTED-001.md +11 -0
- package/rules/DEPS-TYPES-001.md +11 -0
- package/rules/DEPS-TYPO-TRANSITIVE-001.md +11 -0
- package/rules/DEPS-UNFIXED-001.md +11 -0
- package/rules/DEPS-URLSPEC-001.md +11 -0
- package/rules/DEPS-VENDORED-001.md +11 -0
- package/rules/DEPS-WEAKINTEGRITY-001.md +11 -0
- package/rules/DEPS-WORKSPACE-NAME-001.md +11 -0
- package/rules/README.md +35 -0
- package/rules/SAST-CIPHER-001.md +13 -0
- package/rules/SAST-CIPHER-002.md +11 -0
- package/rules/SAST-DOMXSS-001.md +11 -0
- package/rules/SAST-IDOR-001.md +11 -0
- package/rules/SAST-JWT-002.md +11 -0
- package/rules/SAST-LOGLEAK-001.md +11 -0
- package/rules/SAST-NEXT-001.md +11 -0
- package/rules/SAST-POSTMSG-001.md +11 -0
- package/rules/SAST-REACT-001.md +11 -0
- package/rules/SAST-RSA-001.md +11 -0
- package/rules/SAST-SESSION-002.md +11 -0
- package/rules/SAST-SSTI-001.md +11 -0
- package/rules/SAST-TLS-001.md +13 -0
- package/rules/SAST-TLS-002.md +13 -0
- package/rules/SAST-TOKENSTORE-001.md +11 -0
- package/rules/SAST-WEBHOOK-001.md +11 -0
- package/rules/SECRET-FILE-002.md +11 -0
- package/rules/SECRET-FILE-003.md +11 -0
- package/rules/SECRET-FILE-004.md +11 -0
- package/rules/SECRET-FILE-005.md +11 -0
- package/rules/SECRET-FILE-006.md +11 -0
- package/rules/SECRET-FILE-007.md +11 -0
- package/rules/SECRET-NEXTPUB-001.md +11 -0
package/models/ssti.json
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
{
|
|
2
|
+
"entries": [
|
|
3
|
+
{ "member": "ejs.render", "templateIndex": 0 },
|
|
4
|
+
{ "member": "ejs.compile", "templateIndex": 0 },
|
|
5
|
+
{ "member": "pug.render", "templateIndex": 0 },
|
|
6
|
+
{ "member": "pug.compile", "templateIndex": 0 },
|
|
7
|
+
{ "member": "handlebars.compile", "templateIndex": 0 },
|
|
8
|
+
{ "member": "nunjucks.renderString", "templateIndex": 0 },
|
|
9
|
+
{ "member": "_.template", "templateIndex": 0 },
|
|
10
|
+
{ "member": "doT.template", "templateIndex": 0 },
|
|
11
|
+
{ "member": "Mustache.render", "templateIndex": 0 },
|
|
12
|
+
{ "member": "Function", "templateIndex": 0 }
|
|
13
|
+
]
|
|
14
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
{
|
|
2
|
+
"libraries": [
|
|
3
|
+
{ "package": "jquery", "banner": "jQuery v(\\d+\\.\\d+\\.\\d+)", "version": "jQuery\\.VERSION\\s*=\\s*['\\\"](\\d+\\.\\d+\\.\\d+)" },
|
|
4
|
+
{ "package": "jquery-ui", "banner": "jQuery UI - v(\\d+\\.\\d+\\.\\d+)" },
|
|
5
|
+
{ "package": "bootstrap", "banner": "Bootstrap v(\\d+\\.\\d+\\.\\d+)" },
|
|
6
|
+
{ "package": "angular", "banner": "AngularJS v(\\d+\\.\\d+\\.\\d+)" },
|
|
7
|
+
{ "package": "@angular/core", "banner": "angular v(\\d+\\.\\d+\\.\\d+)" },
|
|
8
|
+
{ "package": "lodash", "banner": "Lodash (\\d+\\.\\d+\\.\\d+)" },
|
|
9
|
+
{ "package": "underscore", "banner": "Underscore\\.js (\\d+\\.\\d+\\.\\d+)" },
|
|
10
|
+
{ "package": "moment", "banner": "Moment\\.js (\\d+\\.\\d+\\.\\d+)" },
|
|
11
|
+
{ "package": "handlebars", "banner": "Handlebars v(\\d+\\.\\d+\\.\\d+)" },
|
|
12
|
+
{ "package": "dompurify", "banner": "DOMPurify (\\d+\\.\\d+\\.\\d+)" },
|
|
13
|
+
{ "package": "knockout", "banner": "Knockout (\\d+\\.\\d+\\.\\d+)" }
|
|
14
|
+
]
|
|
15
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
{
|
|
2
|
+
"entries": [
|
|
3
|
+
{ "id": "stripe", "body": "event.type", "verifiers": ["constructEvent"] },
|
|
4
|
+
{ "id": "github", "header": "x-github-event", "verifiers": ["verify", "timingSafeEqual"] },
|
|
5
|
+
{ "id": "slack", "header": "x-slack-signature", "verifiers": ["timingSafeEqual"] },
|
|
6
|
+
{ "id": "shopify", "header": "x-shopify-hmac-sha256", "verifiers": ["timingSafeEqual"] },
|
|
7
|
+
{ "id": "twilio", "header": "x-twilio-signature", "verifiers": ["validateRequest", "timingSafeEqual"] }
|
|
8
|
+
]
|
|
9
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "fullshield",
|
|
3
|
-
"version": "1.0
|
|
3
|
+
"version": "1.2.0",
|
|
4
4
|
"description": "Full-cycle security scanner for Node.js/TypeScript backends: detect, classify, report, notify, fix, prevent.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -119,6 +119,6 @@
|
|
|
119
119
|
"zod": "^4.6.7"
|
|
120
120
|
},
|
|
121
121
|
"knip": {
|
|
122
|
-
"ignore": ["test/fixtures/**", "scripts/doc-version-check.mjs"]
|
|
122
|
+
"ignore": ["test/fixtures/**", "scripts/doc-version-check.mjs", "scripts/autopilot/guard.mjs", "docs/current/guard.mjs"]
|
|
123
123
|
}
|
|
124
124
|
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# CONFIG-ELECTRON-001
|
|
2
|
+
|
|
3
|
+
**Unsafe Electron webPreferences.** Experimental (`FULLSHIELD_EXPERIMENTAL_ELECTRON=1`). CWE-749. Severity high.
|
|
4
|
+
|
|
5
|
+
One finding for each of `nodeIntegration: true`, `contextIsolation: false`, `sandbox: false`, `webSecurity: false`, and `allowRunningInsecureContent: true` inside `webPreferences`. The project must depend on `electron`.
|
|
6
|
+
|
|
7
|
+
## Remediation
|
|
8
|
+
|
|
9
|
+
Harden the Electron window. Do not enable Node integration for remote content.
|
|
10
|
+
|
|
11
|
+
See `SECURITY_SCANNER_SPEC.md` Section 46 phase 102.
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# CONFIG-ELECTRON-002
|
|
2
|
+
|
|
3
|
+
**shell.openExternal without an https scheme check.** Experimental (`FULLSHIELD_EXPERIMENTAL_ELECTRON=1`). CWE-939. Severity high.
|
|
4
|
+
|
|
5
|
+
A non-literal argument to `shell.openExternal` with no `https:` check in the file. A string literal is not a finding.
|
|
6
|
+
|
|
7
|
+
## Remediation
|
|
8
|
+
|
|
9
|
+
Allow only `https:` URLs before calling `shell.openExternal`.
|
|
10
|
+
|
|
11
|
+
See `SECURITY_SCANNER_SPEC.md` Section 46 phase 102.
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# CONFIG-ELECTRON-003
|
|
2
|
+
|
|
3
|
+
**BrowserWindow loads a remote URL without navigation guards.** Experimental (`FULLSHIELD_EXPERIMENTAL_ELECTRON=1`). CWE-749. Severity medium.
|
|
4
|
+
|
|
5
|
+
`loadURL` of an `http:` or `https:` URL when the file has neither `setWindowOpenHandler` nor `will-navigate`. `loadFile` and `file:` are not remote.
|
|
6
|
+
|
|
7
|
+
## Remediation
|
|
8
|
+
|
|
9
|
+
Guard navigation with `setWindowOpenHandler` or `will-navigate`.
|
|
10
|
+
|
|
11
|
+
See `SECURITY_SCANNER_SPEC.md` Section 46 phase 102.
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# CONFIG-ENGINES-001
|
|
2
|
+
|
|
3
|
+
**engines.node does not include the pinned Node version.** Experimental (`FULLSHIELD_EXPERIMENTAL_NPM_ENGINES=1`). CWE-1104. Severity medium. Module `config`.
|
|
4
|
+
|
|
5
|
+
`.nvmrc` or `.node-version` pins `MAJOR.MINOR.PATCH` and `engines.node` does not include it. The comparison uses the existing semver helper. If that helper cannot parse the range, this rule emits nothing. A pin the range includes, a repository with no pin file, and a pin that is not `MAJOR.MINOR.PATCH` (for example `lts/iron`) are not findings. A pin with no `engines.node` string does not include that version.
|
|
6
|
+
|
|
7
|
+
## Remediation
|
|
8
|
+
|
|
9
|
+
Widen engines.node to include the pinned version, or change the pin file.
|
|
10
|
+
|
|
11
|
+
See `SECURITY_SCANNER_SPEC.md` Section 47 phase 142.
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# CONFIG-LIFECYCLE-001
|
|
2
|
+
|
|
3
|
+
**Root lifecycle script downloads remote code.** Experimental (`FULLSHIELD_EXPERIMENTAL_NPM_LIFECYCLE=1`). CWE-829. Severity high. Module `config`.
|
|
4
|
+
|
|
5
|
+
The root `package.json` `scripts` `preinstall`, `install`, `postinstall`, or `prepare` contains `curl`, `wget`, `Invoke-WebRequest`, or an `http` URL piped to a shell. `"postinstall": "node scripts/build.js"` with no URL is not this finding. This is the application manifest. Lockfile `hasInstallScript` is unchanged.
|
|
6
|
+
|
|
7
|
+
## Remediation
|
|
8
|
+
|
|
9
|
+
Remove the downloader from the lifecycle script and run a local file instead.
|
|
10
|
+
|
|
11
|
+
See `SECURITY_SCANNER_SPEC.md` Section 47 phase 136.
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# CONFIG-NEXT-001
|
|
2
|
+
|
|
3
|
+
**Auth enforced only in middleware.** Experimental (`FULLSHIELD_EXPERIMENTAL_NEXT=1`). CWE-306. Severity info. One finding per app.
|
|
4
|
+
|
|
5
|
+
`middleware.ts` calls auth and its matcher is present, while a route under `app/` or `pages/` does not. The message names the 2025 middleware-bypass class and says to enforce auth in the handler.
|
|
6
|
+
|
|
7
|
+
## Remediation
|
|
8
|
+
|
|
9
|
+
Enforce authentication in the route handler, not only in middleware.
|
|
10
|
+
|
|
11
|
+
See `SECURITY_SCANNER_SPEC.md` Section 46 phase 103.
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# CONFIG-NEXT-002
|
|
2
|
+
|
|
3
|
+
**Next.js image remote pattern is unrestricted.** Experimental (`FULLSHIELD_EXPERIMENTAL_NEXT=1`). CWE-942. Severity medium.
|
|
4
|
+
|
|
5
|
+
`images.remotePatterns` uses hostname `**`, or `images.domains` includes `*`.
|
|
6
|
+
|
|
7
|
+
## Remediation
|
|
8
|
+
|
|
9
|
+
List explicit image hostnames.
|
|
10
|
+
|
|
11
|
+
See `SECURITY_SCANNER_SPEC.md` Section 46 phase 103.
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# DEPS-ALIAS-SQUAT-001
|
|
2
|
+
|
|
3
|
+
**An npm: alias requests a popular package and installs a different package.** Experimental (`FULLSHIELD_EXPERIMENTAL_NPM_ALIAS_SQUAT=1`). CWE-494. Severity high.
|
|
4
|
+
|
|
5
|
+
The requested name is on the popular list and the target name is not that package. An alias whose target is the same popular package is not a finding.
|
|
6
|
+
|
|
7
|
+
## Remediation
|
|
8
|
+
|
|
9
|
+
Point the alias at the popular package you meant, or rename the request.
|
|
10
|
+
|
|
11
|
+
See `SECURITY_SCANNER_SPEC.md` Section 47 phase 223.
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# DEPS-BADINTEGRITY-001
|
|
2
|
+
|
|
3
|
+
**Integrity is not valid algo-base64.** Experimental (`FULLSHIELD_EXPERIMENTAL_NPM_BADINTEGRITY=1`). CWE-353. Severity high.
|
|
4
|
+
|
|
5
|
+
integrity is non-empty and is not algo-base64 for sha1, sha256, or sha512, or the base64 does not decode. A well-formed sha512 value is not a finding. A well-formed sha1 value is the weak-hash rule only.
|
|
6
|
+
|
|
7
|
+
## Remediation
|
|
8
|
+
|
|
9
|
+
Regenerate the lockfile so integrity is a sha512- base64 value.
|
|
10
|
+
|
|
11
|
+
See `SECURITY_SCANNER_SPEC.md` phase 118.
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# DEPS-BIDI-001
|
|
2
|
+
|
|
3
|
+
**Dependency name contains a bidi or zero-width character.** Experimental (`FULLSHIELD_EXPERIMENTAL_NPM_BIDI=1`). CWE-1007. Severity critical.
|
|
4
|
+
|
|
5
|
+
The name contains a character in U+202A–U+202E, U+2066–U+2069, or U+200B–U+200F. An ASCII name is not a finding.
|
|
6
|
+
|
|
7
|
+
## Remediation
|
|
8
|
+
|
|
9
|
+
Remove the dependency and use an ASCII package name.
|
|
10
|
+
|
|
11
|
+
See `SECURITY_SCANNER_SPEC.md` Section 47 phase 210.
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# DEPS-BIN-SHADOW-001
|
|
2
|
+
|
|
3
|
+
**Dependency bin shadows a Node builtin or the root package.** Experimental (`FULLSHIELD_EXPERIMENTAL_NPM_BINSHADOW=1`). CWE-427. Severity medium.
|
|
4
|
+
|
|
5
|
+
A direct dependency's bin name is `fs`, `path`, `child_process`, `http`, `https`, `net`, `tls`, `crypto`, `os`, or `dns`, or it equals a bin name of the root package. The bin is read from `node_modules/<name>/package.json` when that file exists. Otherwise it is read from the lock entry `bin`, then from the packument cache at `{cache}/registry/<name>.json` for the locked version. No local file and no cache entry for that version is not a finding. A bin named `my-cli` is not this finding unless the root package uses the same name.
|
|
6
|
+
|
|
7
|
+
## Remediation
|
|
8
|
+
|
|
9
|
+
Rename the bin so it is not a Node builtin and not a root package bin.
|
|
10
|
+
|
|
11
|
+
See `SECURITY_SCANNER_SPEC.md` Section 47 phase 146.
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# DEPS-BUNDLED-001
|
|
2
|
+
|
|
3
|
+
**Bundled package is not named by the root bundle list.** Experimental (`FULLSHIELD_EXPERIMENTAL_NPM_BUNDLED=1`). CWE-829. Severity medium.
|
|
4
|
+
|
|
5
|
+
A lock entry has inBundle: true or bundled: true and the root bundleDependencies / bundledDependencies array does not name that package. The package is not skipped.
|
|
6
|
+
|
|
7
|
+
## Remediation
|
|
8
|
+
|
|
9
|
+
Add the package to bundleDependencies, or remove the bundled flag.
|
|
10
|
+
|
|
11
|
+
See `SECURITY_SCANNER_SPEC.md` phase 122.
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# DEPS-COREPACK-001
|
|
2
|
+
|
|
3
|
+
**packageManager has no Corepack integrity hash.** Experimental (`FULLSHIELD_EXPERIMENTAL_NPM_COREPACK=1`). CWE-353. Severity info.
|
|
4
|
+
|
|
5
|
+
`packageManager` is `name@exact` and has no `+sha512.` suffix, and `devEngines.packageManager` has no hash. A field that already contains `+sha512.` is not this finding. This check does not download the package-manager tarball.
|
|
6
|
+
|
|
7
|
+
## Remediation
|
|
8
|
+
|
|
9
|
+
Append the Corepack +sha512. hash, or set devEngines.packageManager to a hashed version.
|
|
10
|
+
|
|
11
|
+
See `SECURITY_SCANNER_SPEC.md` Section 47 phase 141.
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# DEPS-DEPRECATED-REPLACE-001
|
|
2
|
+
|
|
3
|
+
**Deprecation notice names a replacement that is not a direct dependency.** Experimental (`FULLSHIELD_EXPERIMENTAL_NPM_DEPRECATED_REPLACE=1`). CWE-1104. Severity info.
|
|
4
|
+
|
|
5
|
+
The `deprecated` string contains `use <name>` or `replaced by <name>`, and `<name>` matches package-name grammar. A notice without that name, and a replacement that is already a direct dependency, are not findings.
|
|
6
|
+
|
|
7
|
+
## Remediation
|
|
8
|
+
|
|
9
|
+
Read the deprecation notice and decide whether to depend on the named package.
|
|
10
|
+
|
|
11
|
+
See `SECURITY_SCANNER_SPEC.md` Section 47 phase 218.
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# DEPS-DEV-PROD-EDGE-001
|
|
2
|
+
|
|
3
|
+
**Dev package is required by production.** Experimental (`FULLSHIELD_EXPERIMENTAL_NPM_DEVPROD=1`). CWE-829. Severity medium.
|
|
4
|
+
|
|
5
|
+
A package marked dev: true is also required by a package that is not dev: true. A dev-only package, and a production package that does not require a dev package, are not findings. This is the edge, not a second advisory.
|
|
6
|
+
|
|
7
|
+
## Remediation
|
|
8
|
+
|
|
9
|
+
Move the package out of the production graph, or stop marking it dev.
|
|
10
|
+
|
|
11
|
+
See `SECURITY_SCANNER_SPEC.md` phase 127.
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# DEPS-DUALPACKAGE-001
|
|
2
|
+
|
|
3
|
+
**CommonJS require of an ESM-only package.** Experimental (`FULLSHIELD_EXPERIMENTAL_NPM_DUALPACKAGE=1`). CWE-829. Severity medium.
|
|
4
|
+
|
|
5
|
+
A `require('pkg')` targets a package whose packument `type` is `module` and whose root `exports` has no `require` condition. A `require` condition, an ESM `import`, or a missing packument is not a finding.
|
|
6
|
+
|
|
7
|
+
## Remediation
|
|
8
|
+
|
|
9
|
+
Import the package from ESM, or depend on a build that publishes a `require` condition.
|
|
10
|
+
|
|
11
|
+
See `SECURITY_SCANNER_SPEC.md` Phase 241.
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# DEPS-ENGINE-STRICT-001
|
|
2
|
+
|
|
3
|
+
**engine-strict is false while engines.node is set.** Experimental (`FULLSHIELD_EXPERIMENTAL_NPM_ENGINE_STRICT=1`). CWE-693. Severity info.
|
|
4
|
+
|
|
5
|
+
`engines.node` is set and a committed `.npmrc` sets `engine-strict=false`. `engine-strict=true`, and a manifest with no engines field, are not this finding.
|
|
6
|
+
|
|
7
|
+
## Remediation
|
|
8
|
+
|
|
9
|
+
Set engine-strict=true so installs honor engines.node.
|
|
10
|
+
|
|
11
|
+
See `SECURITY_SCANNER_SPEC.md` Section 47 phase 143.
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# DEPS-FILESPEC-001
|
|
2
|
+
|
|
3
|
+
**file: or link: spec in package.json.** Experimental (`FULLSHIELD_EXPERIMENTAL_NPM_FILESPEC=1`). CWE-829. Severity medium.
|
|
4
|
+
|
|
5
|
+
A direct spec uses `file:` or `link:`. A semver range is not this finding. This id is the manifest row for that spec.
|
|
6
|
+
|
|
7
|
+
## Remediation
|
|
8
|
+
|
|
9
|
+
Depend on a published registry version instead of a local path.
|
|
10
|
+
|
|
11
|
+
See `SECURITY_SCANNER_SPEC.md` Section 47 phase 130.
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# DEPS-FLOAT-001
|
|
2
|
+
|
|
3
|
+
**Floating direct dependency spec.** Experimental (`FULLSHIELD_EXPERIMENTAL_NPM_FLOAT=1`). CWE-829. Severity medium.
|
|
4
|
+
|
|
5
|
+
A direct dependency spec is `*`, `x`, `X`, `latest`, or empty.
|
|
6
|
+
|
|
7
|
+
## Remediation
|
|
8
|
+
|
|
9
|
+
Pin a semver range with an upper bound, or an exact version.
|
|
10
|
+
|
|
11
|
+
See `SECURITY_SCANNER_SPEC.md` Section 47 phase 128.
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# DEPS-FLOAT-002
|
|
2
|
+
|
|
3
|
+
**Direct production spec with no upper bound.** Experimental (`FULLSHIELD_EXPERIMENTAL_NPM_FLOAT=1`). CWE-829. Severity low.
|
|
4
|
+
|
|
5
|
+
A direct production spec (`dependencies` or `optionalDependencies`) is `>=` or `>` and has no `<` upper bound. A caret, tilde, or exact version is not this finding.
|
|
6
|
+
|
|
7
|
+
## Remediation
|
|
8
|
+
|
|
9
|
+
Add an upper bound, or switch to a caret, tilde, or exact version.
|
|
10
|
+
|
|
11
|
+
See `SECURITY_SCANNER_SPEC.md` Section 47 phase 128.
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# DEPS-GITDEP-001
|
|
2
|
+
|
|
3
|
+
**Git dependency.** Experimental (`FULLSHIELD_EXPERIMENTAL_NPM_GITDEP=1`). CWE-829. Severity high.
|
|
4
|
+
|
|
5
|
+
A spec or resolved value uses git:, git+https:, git+ssh:, git+http:, github:, gitlab:, bitbucket:, or gist:. The URL is not cloned. A registry tarball is not a finding.
|
|
6
|
+
|
|
7
|
+
## Remediation
|
|
8
|
+
|
|
9
|
+
Depend on a registry release with an integrity hash.
|
|
10
|
+
|
|
11
|
+
See `SECURITY_SCANNER_SPEC.md` phase 120.
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# DEPS-GITSPEC-001
|
|
2
|
+
|
|
3
|
+
**Git protocol in a direct package.json spec.** Experimental (`FULLSHIELD_EXPERIMENTAL_NPM_GITSPEC=1`). CWE-829. Severity high.
|
|
4
|
+
|
|
5
|
+
A direct spec uses `git:`, `git+https:`, `git+ssh:`, `git+http:`, `github:`, `gitlab:`, `bitbucket:`, or `gist:`. A semver range is not this finding. When the lockfile `resolved` URL is also git, this id is the one emitted for that spec.
|
|
6
|
+
|
|
7
|
+
## Remediation
|
|
8
|
+
|
|
9
|
+
Replace the git spec with a registry version that has a lockfile integrity. Do not clone the git URL.
|
|
10
|
+
|
|
11
|
+
See `SECURITY_SCANNER_SPEC.md` Section 47 phase 129.
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# DEPS-GRAPH-ALIAS-001
|
|
2
|
+
|
|
3
|
+
**npm alias edge.** Experimental (`FULLSHIELD_EXPERIMENTAL_NPM_GRAPH_ALIAS=1`). CWE-829. Severity info.
|
|
4
|
+
|
|
5
|
+
A dependency spec uses the `npm:` protocol, or a lockfile path name differs from the entry `name`. The finding records `alias → target`. A normal version range is not a finding. Advisory rows stay on the target version.
|
|
6
|
+
|
|
7
|
+
## Remediation
|
|
8
|
+
|
|
9
|
+
Confirm the alias is meant to install the target package.
|
|
10
|
+
|
|
11
|
+
See `SECURITY_SCANNER_SPEC.md` Phase 231.
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# DEPS-GRAPH-OPTIONAL-001
|
|
2
|
+
|
|
3
|
+
**Missing optional dependency.** Experimental (`FULLSHIELD_EXPERIMENTAL_NPM_GRAPH_OPTIONAL=1`). CWE-829. Severity info.
|
|
4
|
+
|
|
5
|
+
An `optionalDependencies` entry in the lock or root manifest has no installed copy in the lock. The finding names that missing package. A missing optional dependency does not mark its parent `not-imported`. The optional package being present is not a finding.
|
|
6
|
+
|
|
7
|
+
## Remediation
|
|
8
|
+
|
|
9
|
+
Install the optional package, or remove it from `optionalDependencies`.
|
|
10
|
+
|
|
11
|
+
See `SECURITY_SCANNER_SPEC.md` Phase 229.
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# DEPS-HOMOGLYPH-001
|
|
2
|
+
|
|
3
|
+
**Dependency name is not ASCII and matches a popular package.** Experimental (`FULLSHIELD_EXPERIMENTAL_NPM_HOMOGLYPH=1`). CWE-1007. Severity high.
|
|
4
|
+
|
|
5
|
+
The name's NFKC form equals a popular package, or Cyrillic/Greek lookalikes for a, e, o, p, c, x, and y normalize to one. An ASCII name, and a non-ASCII name that does not map to a popular package, are not findings.
|
|
6
|
+
|
|
7
|
+
## Remediation
|
|
8
|
+
|
|
9
|
+
Confirm the package name character by character before installing it.
|
|
10
|
+
|
|
11
|
+
See `SECURITY_SCANNER_SPEC.md` Section 47 phase 209.
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# DEPS-LINKDEP-001
|
|
2
|
+
|
|
3
|
+
**file: or link: dependency.** Experimental (`FULLSHIELD_EXPERIMENTAL_NPM_LINKDEP=1`). CWE-829. Severity medium.
|
|
4
|
+
|
|
5
|
+
resolved or a manifest spec is file: or link:. The message includes the path. Severity is high, same id, when the path contains .. and resolves outside the repo root. A registry tarball is not a finding.
|
|
6
|
+
|
|
7
|
+
## Remediation
|
|
8
|
+
|
|
9
|
+
Prefer a registry release. Keep file: and link: paths inside the repo.
|
|
10
|
+
|
|
11
|
+
See `SECURITY_SCANNER_SPEC.md` phase 119.
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# DEPS-LOCKOMIT-001
|
|
2
|
+
|
|
3
|
+
**Manifest dependency omitted from the lock root.** Experimental (`FULLSHIELD_EXPERIMENTAL_NPM_LOCKOMIT=1`). CWE-829. Severity high.
|
|
4
|
+
|
|
5
|
+
package.json dependencies names a package that is absent from packages[""].dependencies and from the top-level dependencies object. A name present in either place is not a finding. A range that does not contain the locked version is a different check.
|
|
6
|
+
|
|
7
|
+
## Remediation
|
|
8
|
+
|
|
9
|
+
Regenerate the lockfile so the package is a root dependency entry.
|
|
10
|
+
|
|
11
|
+
See `SECURITY_SCANNER_SPEC.md` phase 126.
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# DEPS-LOCKPATH-001
|
|
2
|
+
|
|
3
|
+
**Lockfile packages key has an unexpected shape.** Experimental (`FULLSHIELD_EXPERIMENTAL_NPM_LOCKPATH=1`). CWE-22. Severity high.
|
|
4
|
+
|
|
5
|
+
A packages key is not "" and does not start with node_modules/. A key that contains .. is the same id. node_modules/foo and node_modules/foo/node_modules/bar are not findings.
|
|
6
|
+
|
|
7
|
+
## Remediation
|
|
8
|
+
|
|
9
|
+
Regenerate the lockfile so every packages key is "" or a node_modules path with no .. segment.
|
|
10
|
+
|
|
11
|
+
See `SECURITY_SCANNER_SPEC.md` phase 125.
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# DEPS-LOCKVER-001
|
|
2
|
+
|
|
3
|
+
**Unsupported npm lockfileVersion.** Experimental (`FULLSHIELD_EXPERIMENTAL_NPM_LOCKVER=1`). CWE-1104. Severity medium.
|
|
4
|
+
|
|
5
|
+
lockfileVersion is missing, 1, or greater than 3. Versions 2 and 3 are accepted. A version 1 file is still read with the dependencies-tree parser.
|
|
6
|
+
|
|
7
|
+
## Remediation
|
|
8
|
+
|
|
9
|
+
Regenerate the lockfile with a current npm so lockfileVersion is 2 or 3.
|
|
10
|
+
|
|
11
|
+
See `SECURITY_SCANNER_SPEC.md` phase 109.
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# DEPS-MIXEDSCRIPT-001
|
|
2
|
+
|
|
3
|
+
**Dependency name mixes Latin with Cyrillic or Greek.** Experimental (`FULLSHIELD_EXPERIMENTAL_NPM_MIXEDSCRIPT=1`). CWE-1007. Severity high.
|
|
4
|
+
|
|
5
|
+
The name contains both a Latin letter and a Cyrillic or Greek letter. Latin-only names, Cyrillic-only names that are not homoglyphs, and names already reported as homoglyphs are not findings.
|
|
6
|
+
|
|
7
|
+
## Remediation
|
|
8
|
+
|
|
9
|
+
Use a package name written in one script.
|
|
10
|
+
|
|
11
|
+
See `SECURITY_SCANNER_SPEC.md` Section 47 phase 211.
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# DEPS-MULTLOCK-001
|
|
2
|
+
|
|
3
|
+
**Multiple lockfiles at the repo root.** Experimental (`FULLSHIELD_EXPERIMENTAL_NPM_MULTLOCK=1`). CWE-436. Severity medium.
|
|
4
|
+
|
|
5
|
+
Two or more of package-lock.json, npm-shrinkwrap.json, yarn.lock, pnpm-lock.yaml, and bun.lock exist at the repo root. The message names the files. No winner is chosen.
|
|
6
|
+
|
|
7
|
+
## Remediation
|
|
8
|
+
|
|
9
|
+
Keep a single lockfile.
|
|
10
|
+
|
|
11
|
+
See `SECURITY_SCANNER_SPEC.md` phase 110.
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# DEPS-NAME-CASE-001
|
|
2
|
+
|
|
3
|
+
**Two locked package names differ only by ASCII case.** Experimental (`FULLSHIELD_EXPERIMENTAL_NPM_NAME_CASE=1`). CWE-178. Severity high.
|
|
4
|
+
|
|
5
|
+
One row names both packages. Distinct names are not a finding.
|
|
6
|
+
|
|
7
|
+
## Remediation
|
|
8
|
+
|
|
9
|
+
Keep one spelling. npm package names are lowercase.
|
|
10
|
+
|
|
11
|
+
See `SECURITY_SCANNER_SPEC.md` Section 47 phase 221.
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# DEPS-NAME-ENCODED-001
|
|
2
|
+
|
|
3
|
+
**Dependency name contains a percent sign.** Experimental (`FULLSHIELD_EXPERIMENTAL_NPM_NAME_ENCODED=1`). CWE-20. Severity high.
|
|
4
|
+
|
|
5
|
+
A name without `%` is not a finding.
|
|
6
|
+
|
|
7
|
+
## Remediation
|
|
8
|
+
|
|
9
|
+
Depend on the package by its registry name, without percent-encoding.
|
|
10
|
+
|
|
11
|
+
See `SECURITY_SCANNER_SPEC.md` Section 47 phase 222.
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# DEPS-NAME-LENGTH-001
|
|
2
|
+
|
|
3
|
+
**Dependency name is empty or longer than 214 characters.** Experimental (`FULLSHIELD_EXPERIMENTAL_NPM_NAME_LENGTH=1`). CWE-1284. Severity high.
|
|
4
|
+
|
|
5
|
+
npm's documented package name limit is 214 characters. A normal name is not a finding.
|
|
6
|
+
|
|
7
|
+
## Remediation
|
|
8
|
+
|
|
9
|
+
Use a package name within npm's 214 character limit.
|
|
10
|
+
|
|
11
|
+
See `SECURITY_SCANNER_SPEC.md` Section 47 phase 220.
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# DEPS-NOINTEGRITY-001
|
|
2
|
+
|
|
3
|
+
**Registry tarball has no integrity.** Experimental (`FULLSHIELD_EXPERIMENTAL_NPM_NOINTEGRITY=1`). CWE-353. Severity high.
|
|
4
|
+
|
|
5
|
+
resolved is an https registry.npmjs.org URL and integrity is missing or empty. link: and file: rows are not this finding.
|
|
6
|
+
|
|
7
|
+
## Remediation
|
|
8
|
+
|
|
9
|
+
Regenerate the lockfile so the entry has a sha512 integrity.
|
|
10
|
+
|
|
11
|
+
See `SECURITY_SCANNER_SPEC.md` phase 116.
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# DEPS-NONSEMVER-001
|
|
2
|
+
|
|
3
|
+
**Locked version is not semver.** Experimental (`FULLSHIELD_EXPERIMENTAL_NPM_NONSEMVER=1`). CWE-1104. Severity medium.
|
|
4
|
+
|
|
5
|
+
A locked version is not MAJOR.MINOR.PATCH with an optional prerelease. Git shas, file: specs, *, and empty versions match. The locked text is not rewritten for an advisory lookup.
|
|
6
|
+
|
|
7
|
+
## Remediation
|
|
8
|
+
|
|
9
|
+
Lock a MAJOR.MINOR.PATCH release from the registry.
|
|
10
|
+
|
|
11
|
+
See `SECURITY_SCANNER_SPEC.md` phase 112.
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# DEPS-NORESOLVED-001
|
|
2
|
+
|
|
3
|
+
**Semver packages entry has no resolved URL.** Experimental (`FULLSHIELD_EXPERIMENTAL_NPM_NORESOLVED=1`). CWE-829. Severity medium.
|
|
4
|
+
|
|
5
|
+
A packages entry has a semver version and no resolved URL. The root "" entry and link: workspace rows are excluded. A row whose only fields are version, name, and license is not an install record and is excluded.
|
|
6
|
+
|
|
7
|
+
## Remediation
|
|
8
|
+
|
|
9
|
+
Regenerate the lockfile so the package has a resolved tarball URL.
|
|
10
|
+
|
|
11
|
+
See `SECURITY_SCANNER_SPEC.md` phase 113.
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# DEPS-NPMALIAS-001
|
|
2
|
+
|
|
3
|
+
**npm alias name does not match the target.** Experimental (`FULLSHIELD_EXPERIMENTAL_NPM_ALIAS=1`). CWE-829. Severity medium.
|
|
4
|
+
|
|
5
|
+
A lock key or manifest spec uses npm: and the requested name differs from the target name. The finding is on the requested name and records the target name@version. npm:same-name@1.2.3 is not a finding.
|
|
6
|
+
|
|
7
|
+
## Remediation
|
|
8
|
+
|
|
9
|
+
Depend on the target package directly.
|
|
10
|
+
|
|
11
|
+
See `SECURITY_SCANNER_SPEC.md` phase 121.
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# DEPS-NPMRC-HOME-001
|
|
2
|
+
|
|
3
|
+
**Home .npmrc registry is not registry.npmjs.org.** Experimental (`FULLSHIELD_EXPERIMENTAL_NPM_NPMRC_HOME=1`). CWE-494. Severity medium.
|
|
4
|
+
|
|
5
|
+
This is the `scan --include-home` check. The real user home is not read. The test hook is `FULLSHIELD_NPM_HOME`: when that variable is set, this rule reads `$FULLSHIELD_NPM_HOME/.npmrc` and nowhere else outside the project. It also reads a scan file whose path is exactly `home/.npmrc`. Without the variable and without that path, no home file is opened. The default host `registry.npmjs.org` is not a finding. Token values are not printed. A token in `~/.npmrc` is out of scope (the file is not committed).
|
|
6
|
+
|
|
7
|
+
## Remediation
|
|
8
|
+
|
|
9
|
+
Point the home registry at https://registry.npmjs.org/.
|
|
10
|
+
|
|
11
|
+
See `SECURITY_SCANNER_SPEC.md` Section 47 phase 139.
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# DEPS-NPMRC-REG-001
|
|
2
|
+
|
|
3
|
+
**Committed .npmrc registry is not registry.npmjs.org.** Experimental (`FULLSHIELD_EXPERIMENTAL_NPM_NPMRC_REG=1`). CWE-494. Severity high.
|
|
4
|
+
|
|
5
|
+
A committed `.npmrc` sets `registry=` or `@scope:registry=` to an `http:` or `https:` URL whose host is not `registry.npmjs.org`. That host, and a file that contains only comments, are not this finding. Token values are not printed.
|
|
6
|
+
|
|
7
|
+
## Remediation
|
|
8
|
+
|
|
9
|
+
Point registry at https://registry.npmjs.org/ or remove the line.
|
|
10
|
+
|
|
11
|
+
See `SECURITY_SCANNER_SPEC.md` Section 47 phase 137.
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# DEPS-NPMRC-SCRIPT-001
|
|
2
|
+
|
|
3
|
+
**Committed .npmrc sets ignore-scripts=false.** Experimental (`FULLSHIELD_EXPERIMENTAL_NPM_NPMRC_SCRIPT=1`). CWE-829. Severity info.
|
|
4
|
+
|
|
5
|
+
A committed `.npmrc` sets `ignore-scripts=false`. `ignore-scripts=true`, and a file with no such key, are not this finding. This is informational. It does not mean the project is compromised.
|
|
6
|
+
|
|
7
|
+
## Remediation
|
|
8
|
+
|
|
9
|
+
Set ignore-scripts=true and list the installers you accept in trustedDependencies.
|
|
10
|
+
|
|
11
|
+
See `SECURITY_SCANNER_SPEC.md` Section 47 phase 138.
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# DEPS-OPTIONAL-IMPORT-001
|
|
2
|
+
|
|
3
|
+
**Optional dependency imported outside try/catch.** Experimental (`FULLSHIELD_EXPERIMENTAL_NPM_OPTIONAL=1`). CWE-703. Severity low.
|
|
4
|
+
|
|
5
|
+
Production code imports a package the lock marks optional: true and the import is not inside a try/catch. An import inside try/catch, or a package that is not optional, is not a finding. This does not change an advisory on that package.
|
|
6
|
+
|
|
7
|
+
## Remediation
|
|
8
|
+
|
|
9
|
+
Import the package inside try/catch, or make the dependency required.
|
|
10
|
+
|
|
11
|
+
See `SECURITY_SCANNER_SPEC.md` phase 124.
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# DEPS-OSCPU-001
|
|
2
|
+
|
|
3
|
+
**Direct production package excludes this os or cpu.** Experimental (`FULLSHIELD_EXPERIMENTAL_NPM_OSCPU=1`). CWE-1104. Severity info.
|
|
4
|
+
|
|
5
|
+
A direct production lock entry has `os` or `cpu` that excludes `process.platform` or `process.arch`. An array that includes the current value, and an empty field, are not this finding. The package is still sent to OSV.
|
|
6
|
+
|
|
7
|
+
## Remediation
|
|
8
|
+
|
|
9
|
+
Confirm the install is intentional for this os and cpu. This finding is informational.
|
|
10
|
+
|
|
11
|
+
See `SECURITY_SCANNER_SPEC.md` Section 47 phase 147.
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# DEPS-OVERRIDE-ALIAS-001
|
|
2
|
+
|
|
3
|
+
**Override installs a different package name.** Experimental (`FULLSHIELD_EXPERIMENTAL_NPM_OVERRIDE_ALIAS=1`). CWE-829. Severity high.
|
|
4
|
+
|
|
5
|
+
An override value is `npm:other@version` and `other` is not the overridden package name. An exact version is not this finding. This row is the manifest override only.
|
|
6
|
+
|
|
7
|
+
## Remediation
|
|
8
|
+
|
|
9
|
+
Override to the same package name, or remove the npm: alias.
|
|
10
|
+
|
|
11
|
+
See `SECURITY_SCANNER_SPEC.md` Section 47 phase 135.
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# DEPS-OVERRIDE-VULN-001
|
|
2
|
+
|
|
3
|
+
**Override pins a version the OSV cache marks affected.** Experimental (`FULLSHIELD_EXPERIMENTAL_NPM_OVERRIDE_VULN=1`). CWE-1104. Severity high.
|
|
4
|
+
|
|
5
|
+
`overrides`, `resolutions`, or `pnpm.overrides` pins one exact version, and `{cache}/osv/<name>@<version>.json` lists at least one advisory. The message cites that OSV id. A missing cache file, or a file whose `vulns` array is empty, is not a finding. This check does not invent an advisory and does not contact the network.
|
|
6
|
+
|
|
7
|
+
## Remediation
|
|
8
|
+
|
|
9
|
+
Pin a version that the OSV cache does not list as affected.
|
|
10
|
+
|
|
11
|
+
See `SECURITY_SCANNER_SPEC.md` Section 47 phase 133.
|