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
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# DEPS-SCRIPT-ROLLUP-001
|
|
2
|
+
|
|
3
|
+
**Many production packages have install scripts.** Experimental (`FULLSHIELD_EXPERIMENTAL_NPM_SCRIPT_ROLLUP=1`). CWE-829. Severity info.
|
|
4
|
+
|
|
5
|
+
One row for the repo when more than 25 production packages have `hasInstallScript`. The count is printed. The threshold is 25 and is not a vulnerability count. Dev-only packages are not counted. A lock with no `hasInstallScript: true` entry emits nothing. Per-package rows stay on `DEPS-SCRIPT-TRANSITIVE-001`.
|
|
6
|
+
|
|
7
|
+
## Remediation
|
|
8
|
+
|
|
9
|
+
Review the install scripts. The number is an inventory count.
|
|
10
|
+
|
|
11
|
+
See `SECURITY_SCANNER_SPEC.md` Section 47 phase 207.
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# DEPS-SCRIPT-SHEBANG-001
|
|
2
|
+
|
|
3
|
+
**Install script shebang is not node or a shell.** Experimental (`FULLSHIELD_EXPERIMENTAL_NPM_SCRIPT_SHEBANG=1`). CWE-78. Severity medium.
|
|
4
|
+
|
|
5
|
+
The install script file's first line is a shebang whose interpreter is not `node`, `sh`, or `bash`. `#!/usr/bin/env node` is not this finding. No shebang means no finding. The file is read from the cached tarball descriptor or from `node_modules/<name>/`. It is not executed.
|
|
6
|
+
|
|
7
|
+
## Remediation
|
|
8
|
+
|
|
9
|
+
Do not run the install script.
|
|
10
|
+
|
|
11
|
+
See `SECURITY_SCANNER_SPEC.md` Section 47 phase 205.
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# DEPS-SCRIPT-TOKEN-001
|
|
2
|
+
|
|
3
|
+
**Lifecycle script reads an npm token.** Experimental (`FULLSHIELD_EXPERIMENTAL_NPM_SCRIPT_TOKEN=1`). CWE-522. Severity critical.
|
|
4
|
+
|
|
5
|
+
A cached lifecycle script contains `NPM_TOKEN`, `NODE_AUTH_TOKEN`, or `npm_config__auth`. This lane cannot see phase 173 findings, so it reports the script text it can read. The script is not executed and token values are not printed.
|
|
6
|
+
|
|
7
|
+
## Remediation
|
|
8
|
+
|
|
9
|
+
Do not install the package. Rotate npm tokens on machines that already installed it.
|
|
10
|
+
|
|
11
|
+
See `SECURITY_SCANNER_SPEC.md` Section 47 phase 199.
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# DEPS-SCRIPT-TRANSITIVE-001
|
|
2
|
+
|
|
3
|
+
**Transitive production dependency install script.** Experimental (`FULLSHIELD_EXPERIMENTAL_NPM_SCRIPT_TRANSITIVE=1`). CWE-829. Severity medium.
|
|
4
|
+
|
|
5
|
+
One row per transitive production package whose lock entry sets `hasInstallScript`. Direct dependencies are not this id. An optional package that also matches `DEPS-SCRIPT-OPTIONAL-001` is reported only as that id when both flags are on.
|
|
6
|
+
|
|
7
|
+
## Remediation
|
|
8
|
+
|
|
9
|
+
Review the transitive install script before installing. Prefer a release with no install script.
|
|
10
|
+
|
|
11
|
+
See `SECURITY_SCANNER_SPEC.md` Section 47 phase 188.
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# DEPS-SCRIPT-TRUSTED-001
|
|
2
|
+
|
|
3
|
+
**Trusted dependency still has a dangerous lifecycle script.** Experimental (`FULLSHIELD_EXPERIMENTAL_NPM_SCRIPT_TRUSTED=1`). CWE-829. Severity medium.
|
|
4
|
+
|
|
5
|
+
The package name is in root `trustedDependencies` and its cached lifecycle script matches the curl, outside-write, lockfile, git, token, or publish patterns. The trust list does not clear those ids. This row is additional. `node scripts/build.js` is not this finding.
|
|
6
|
+
|
|
7
|
+
## Remediation
|
|
8
|
+
|
|
9
|
+
Remove the name from `trustedDependencies` until the script is safe.
|
|
10
|
+
|
|
11
|
+
See `SECURITY_SCANNER_SPEC.md` Section 47 phase 201.
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# DEPS-SCRIPT-WRITE-001
|
|
2
|
+
|
|
3
|
+
**Lifecycle script writes outside the package.** Experimental (`FULLSHIELD_EXPERIMENTAL_NPM_SCRIPT_WRITE=1`). CWE-22. Severity high.
|
|
4
|
+
|
|
5
|
+
A cached lifecycle script writes a path that starts with `..`, `/`, `~/`, or an expansion of `HOME` or `USERPROFILE`. A relative path such as `lib/out.js` is not this finding. The script is not executed.
|
|
6
|
+
|
|
7
|
+
## Remediation
|
|
8
|
+
|
|
9
|
+
Do not install the package until the write stays inside the package directory.
|
|
10
|
+
|
|
11
|
+
See `SECURITY_SCANNER_SPEC.md` Section 47 phase 196.
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# DEPS-SELFNAME-001
|
|
2
|
+
|
|
3
|
+
**A dependency name equals the root package name and is not a workspace path.** Experimental (`FULLSHIELD_EXPERIMENTAL_NPM_SELFNAME=1`). CWE-694. Severity medium.
|
|
4
|
+
|
|
5
|
+
A `file:` or `workspace:` spec of the same name, and a different dependency name, are not findings.
|
|
6
|
+
|
|
7
|
+
## Remediation
|
|
8
|
+
|
|
9
|
+
Use a workspace: or file: spec for the local package, or rename the dependency.
|
|
10
|
+
|
|
11
|
+
See `SECURITY_SCANNER_SPEC.md` Section 47 phase 224.
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# DEPS-SEPARATOR-001
|
|
2
|
+
|
|
3
|
+
**Direct dependency swaps separators in a popular package name.** Experimental (`FULLSHIELD_EXPERIMENTAL_NPM_SEPARATOR=1`). CWE-494. Severity medium.
|
|
4
|
+
|
|
5
|
+
Treating `.`, `-`, and `_` as the same character, the direct name equals a popular package and the strings differ. The exact popular name, a one-letter difference, and a twin at Levenshtein distance 1 are not findings.
|
|
6
|
+
|
|
7
|
+
## Remediation
|
|
8
|
+
|
|
9
|
+
Confirm you intended this name rather than the popular package.
|
|
10
|
+
|
|
11
|
+
See `SECURITY_SCANNER_SPEC.md` Section 47 phase 212.
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# DEPS-SHRINKWRAP-001
|
|
2
|
+
|
|
3
|
+
**npm-shrinkwrap.json is the only lockfile.** Experimental (`FULLSHIELD_EXPERIMENTAL_NPM_SHRINKWRAP=1`). CWE-829. Severity info.
|
|
4
|
+
|
|
5
|
+
npm-shrinkwrap.json is present and no other lockfile (package-lock.json, yarn.lock, pnpm-lock.yaml, bun.lock) is at the repo root. The file is parsed with the package-lock parser.
|
|
6
|
+
|
|
7
|
+
## Remediation
|
|
8
|
+
|
|
9
|
+
Commit one lockfile. Prefer package-lock.json unless the project intentionally publishes a shrinkwrap.
|
|
10
|
+
|
|
11
|
+
See `SECURITY_SCANNER_SPEC.md` phase 108.
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# DEPS-SHRINKWRAP-002
|
|
2
|
+
|
|
3
|
+
**Shrinkwrap and package-lock name@version sets differ.** Experimental (`FULLSHIELD_EXPERIMENTAL_NPM_SHRINKWRAP=1`). CWE-436. Severity high.
|
|
4
|
+
|
|
5
|
+
Both npm-shrinkwrap.json and package-lock.json exist and the package name@version sets from the package-lock parser are not the same.
|
|
6
|
+
|
|
7
|
+
## Remediation
|
|
8
|
+
|
|
9
|
+
Delete one of the files, or regenerate both from the same install so the sets match.
|
|
10
|
+
|
|
11
|
+
See `SECURITY_SCANNER_SPEC.md` phase 108.
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# DEPS-SUFFIX-001
|
|
2
|
+
|
|
3
|
+
**Direct dependency adds a common suffix to a popular package.** Experimental (`FULLSHIELD_EXPERIMENTAL_NPM_SUFFIX=1`). CWE-494. Severity low.
|
|
4
|
+
|
|
5
|
+
The name is a popular package plus `-js`, `-node`, `-npm`, or `-lib`, and it is not itself on the popular list. Confidence is low. The message asks you to confirm intent. The popular name, and any other suffix, are not findings.
|
|
6
|
+
|
|
7
|
+
## Remediation
|
|
8
|
+
|
|
9
|
+
Keep the dependency only if that name is the package you meant.
|
|
10
|
+
|
|
11
|
+
See `SECURITY_SCANNER_SPEC.md` Section 47 phase 214.
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# DEPS-TAGSPEC-001
|
|
2
|
+
|
|
3
|
+
**Dist-tag dependency spec.** Experimental (`FULLSHIELD_EXPERIMENTAL_NPM_TAGSPEC=1`). CWE-829. Severity medium.
|
|
4
|
+
|
|
5
|
+
A direct spec is the bare dist-tag `next`, `beta`, or `canary`, or `name@tag` whose tag contains no digit. Bare `latest` is `DEPS-FLOAT-001`. `1.2.3-beta.1` and `^1.2.3` are not this finding.
|
|
6
|
+
|
|
7
|
+
## Remediation
|
|
8
|
+
|
|
9
|
+
Depend on an exact version or a bounded semver range.
|
|
10
|
+
|
|
11
|
+
See `SECURITY_SCANNER_SPEC.md` Section 47 phase 132.
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# DEPS-TARBALL-BIN-001
|
|
2
|
+
|
|
3
|
+
**package.json bin target is missing from the tarball.** Medium. Experimental (`FULLSHIELD_EXPERIMENTAL_NPM_TARBALL_BIN=1`). CWE-427.
|
|
4
|
+
|
|
5
|
+
Direct production dependency only. The path is inside the package and is not a file in the archive. A path with `..` or an absolute path is `DEPS-TARBALL-PATH-001` only.
|
|
6
|
+
|
|
7
|
+
## Remediation
|
|
8
|
+
|
|
9
|
+
Point bin at a file that exists inside the package, or remove the bin entry.
|
|
10
|
+
|
|
11
|
+
See `SECURITY_SCANNER_SPEC.md` Section 47 phase 175.
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# DEPS-TARBALL-CRED-001
|
|
2
|
+
|
|
3
|
+
**Lifecycle script reads credentials.** Critical. Experimental (`FULLSHIELD_EXPERIMENTAL_NPM_TARBALL_CRED=1`). CWE-522.
|
|
4
|
+
|
|
5
|
+
Direct production dependency only. A `preinstall`, `install`, or `postinstall` string contains `.npmrc`, `.ssh`, `.aws`, `.git-credentials`, `NPM_TOKEN`, `NODE_AUTH_TOKEN`, or `npm_config__auth`. The same strings under `test/` are not this finding. No second signal is required.
|
|
6
|
+
|
|
7
|
+
## Remediation
|
|
8
|
+
|
|
9
|
+
Do not install this package.
|
|
10
|
+
|
|
11
|
+
See `SECURITY_SCANNER_SPEC.md` Section 47 phase 173.
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# DEPS-TARBALL-DYNAMIC-001
|
|
2
|
+
|
|
3
|
+
**Top-level dynamic require or import in the package entry.** Medium. Experimental (`FULLSHIELD_EXPERIMENTAL_NPM_TARBALL_DYNAMIC=1`). CWE-829.
|
|
4
|
+
|
|
5
|
+
Direct production dependency only. `main` or an `exports` file contains `require(` or `import(` whose argument is not a string literal, and the call is not inside a function. A literal `require('fs')` and a call inside a function are not this finding.
|
|
6
|
+
|
|
7
|
+
## Remediation
|
|
8
|
+
|
|
9
|
+
Use a string literal, or move the call inside a function.
|
|
10
|
+
|
|
11
|
+
See `SECURITY_SCANNER_SPEC.md` Section 47 phase 186.
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# DEPS-TARBALL-ENV-001
|
|
2
|
+
|
|
3
|
+
**Package entry passes process.env to a request.** Critical. Experimental (`FULLSHIELD_EXPERIMENTAL_NPM_TARBALL_ENV=1`). CWE-200.
|
|
4
|
+
|
|
5
|
+
Direct production dependency only. A `main` or `exports` file passes the whole `process.env` object to `fetch`, `http.request`, or `https.request`. `process.env.NODE_ENV` is not this finding. Fixture hosts are `example.invalid`.
|
|
6
|
+
|
|
7
|
+
## Remediation
|
|
8
|
+
|
|
9
|
+
Do not pass the process.env object to those calls.
|
|
10
|
+
|
|
11
|
+
See `SECURITY_SCANNER_SPEC.md` Section 47 phase 185.
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# DEPS-TARBALL-HASH-001
|
|
2
|
+
|
|
3
|
+
**Tarball bytes do not match dist.integrity.** Critical. Experimental (`FULLSHIELD_EXPERIMENTAL_NPM_TARBALL_HASH=1`). CWE-353.
|
|
4
|
+
|
|
5
|
+
Direct production dependency only. The sha512 of cached tarball bytes is compared with the lock integrity, or with packument `dist.integrity` when the lock has none. A mismatch stops extraction for that package. No network fetch.
|
|
6
|
+
|
|
7
|
+
## Remediation
|
|
8
|
+
|
|
9
|
+
Replace the cached tarball with the registry.npmjs.org artifact that matches the lock integrity.
|
|
10
|
+
|
|
11
|
+
See `SECURITY_SCANNER_SPEC.md` Section 47 phase 168.
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# DEPS-TARBALL-HIDDEN-001
|
|
2
|
+
|
|
3
|
+
**Tarball path uses a bidi override or a hidden non-latin segment.** Medium. Experimental (`FULLSHIELD_EXPERIMENTAL_NPM_TARBALL_HIDDEN=1`). CWE-451.
|
|
4
|
+
|
|
5
|
+
Direct production dependency only. A segment contains a bidi override or isolate (U+202A–U+202E, U+2066–U+2069), or a segment other than `.npmignore`, `.gitignore`, or `.github` starts with `.` and contains a non-latin letter. `.gitignore` and `lib/index.js` are not this finding.
|
|
6
|
+
|
|
7
|
+
## Remediation
|
|
8
|
+
|
|
9
|
+
Reject the archive.
|
|
10
|
+
|
|
11
|
+
See `SECURITY_SCANNER_SPEC.md` Section 47 phase 178.
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# DEPS-TARBALL-HOOK-001
|
|
2
|
+
|
|
3
|
+
**Tarball contains a git hook or GitHub workflow.** Critical. Experimental (`FULLSHIELD_EXPERIMENTAL_NPM_TARBALL_HOOK=1`). CWE-829.
|
|
4
|
+
|
|
5
|
+
Direct production dependency only. An archived path includes `.git/hooks/` or `.github/workflows/`. A README that only mentions those words is not this finding. Distinct from `SUPPLY-WORKFLOW-001`, which is source that writes those paths.
|
|
6
|
+
|
|
7
|
+
## Remediation
|
|
8
|
+
|
|
9
|
+
Do not install this package.
|
|
10
|
+
|
|
11
|
+
See `SECURITY_SCANNER_SPEC.md` Section 47 phase 177.
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# DEPS-TARBALL-ID-001
|
|
2
|
+
|
|
3
|
+
**Tarball package.json name or version differs from the lock.** Critical. Experimental (`FULLSHIELD_EXPERIMENTAL_NPM_TARBALL_ID=1`). CWE-494.
|
|
4
|
+
|
|
5
|
+
Direct production dependency only. Compared against `package/package.json` in the cached tarball. A missing manifest is not this finding.
|
|
6
|
+
|
|
7
|
+
## Remediation
|
|
8
|
+
|
|
9
|
+
Do not install the archive. The packed name and version must match the lock.
|
|
10
|
+
|
|
11
|
+
See `SECURITY_SCANNER_SPEC.md` Section 47 phase 169.
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# DEPS-TARBALL-INSTALLJS-001
|
|
2
|
+
|
|
3
|
+
**Loose install.js without a matching scripts key.** Medium. Experimental (`FULLSHIELD_EXPERIMENTAL_NPM_TARBALL_INSTALLJS=1`). CWE-829.
|
|
4
|
+
|
|
5
|
+
Direct production dependency only. The archive contains `package/install.js`, `package/preinstall.js`, or `package/postinstall.js` and `scripts` has no matching key. A declared key, or no such file, is not this finding.
|
|
6
|
+
|
|
7
|
+
## Remediation
|
|
8
|
+
|
|
9
|
+
Remove the loose file or declare the matching scripts key.
|
|
10
|
+
|
|
11
|
+
See `SECURITY_SCANNER_SPEC.md` Section 47 phase 183.
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# DEPS-TARBALL-LICENSE-001
|
|
2
|
+
|
|
3
|
+
**Tarball license string differs from the packument.** Info. Experimental (`FULLSHIELD_EXPERIMENTAL_NPM_TARBALL_LICENSE=1`). CWE-1104.
|
|
4
|
+
|
|
5
|
+
Direct production dependency only. Both license fields are strings and they differ. A match, or either side missing, is not this finding. This is not `DEPS-LICENSE-001` and it does not judge the license.
|
|
6
|
+
|
|
7
|
+
## Remediation
|
|
8
|
+
|
|
9
|
+
Compare the two license strings.
|
|
10
|
+
|
|
11
|
+
See `SECURITY_SCANNER_SPEC.md` Section 47 phase 181.
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# DEPS-TARBALL-LIFECYCLE-001
|
|
2
|
+
|
|
3
|
+
**Tarball lifecycle script hidden by the packument.** High. Experimental (`FULLSHIELD_EXPERIMENTAL_NPM_TARBALL_LIFECYCLE=1`). CWE-829.
|
|
4
|
+
|
|
5
|
+
Direct production dependency only. `preinstall`, `install`, or `postinstall` is present in the tarball and the cached packument `hasInstallScript` is `false`. A missing flag, a `true` flag, or no such scripts is not this finding.
|
|
6
|
+
|
|
7
|
+
## Remediation
|
|
8
|
+
|
|
9
|
+
Treat the package as untrusted. The tarball runs an install script the packument marked absent.
|
|
10
|
+
|
|
11
|
+
See `SECURITY_SCANNER_SPEC.md` Section 47 phase 170.
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# DEPS-TARBALL-MANIFEST-001
|
|
2
|
+
|
|
3
|
+
**Tarball dependencies differ from the packument.** High. Experimental (`FULLSHIELD_EXPERIMENTAL_NPM_TARBALL_MANIFEST=1`). CWE-494.
|
|
4
|
+
|
|
5
|
+
Direct production dependency only. Both `dependencies` objects are present and the key set or a range string differs. Name and version mismatches stay `DEPS-TARBALL-ID-001`. A missing object on either side is not this finding.
|
|
6
|
+
|
|
7
|
+
## Remediation
|
|
8
|
+
|
|
9
|
+
Treat the tarball as a swapped manifest.
|
|
10
|
+
|
|
11
|
+
See `SECURITY_SCANNER_SPEC.md` Section 47 phase 182.
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# DEPS-TARBALL-NATIVE-001
|
|
2
|
+
|
|
3
|
+
**Tarball contains a prebuilt .node file.** Medium. Experimental (`FULLSHIELD_EXPERIMENTAL_NPM_TARBALL_NATIVE=1`). CWE-829.
|
|
4
|
+
|
|
5
|
+
Direct production dependency only. Medium is not a malware claim. A `binding.gyp` with no `.node` file is not this finding. A prebuilt binary could not be reviewed as source.
|
|
6
|
+
|
|
7
|
+
## Remediation
|
|
8
|
+
|
|
9
|
+
Review the package before trusting the binary.
|
|
10
|
+
|
|
11
|
+
See `SECURITY_SCANNER_SPEC.md` Section 47 phase 176.
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# DEPS-TARBALL-NET-001
|
|
2
|
+
|
|
3
|
+
**Lifecycle script contains a network token.** High. Experimental (`FULLSHIELD_EXPERIMENTAL_NPM_TARBALL_NET=1`). CWE-829.
|
|
4
|
+
|
|
5
|
+
Direct production dependency only. A `preinstall`, `install`, or `postinstall` string contains `http://`, `https://`, `fetch(`, or `dns`. Fixture hosts are `example.invalid`.
|
|
6
|
+
|
|
7
|
+
## Remediation
|
|
8
|
+
|
|
9
|
+
Remove the install script or pin a release whose lifecycle script does not fetch remote code.
|
|
10
|
+
|
|
11
|
+
See `SECURITY_SCANNER_SPEC.md` Section 47 phase 171.
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# DEPS-TARBALL-OBFUSC-001
|
|
2
|
+
|
|
3
|
+
**Lifecycle script passes a long base64 literal to eval, Function, or spawn.** High. Experimental (`FULLSHIELD_EXPERIMENTAL_NPM_TARBALL_OBFUSC=1`). CWE-506.
|
|
4
|
+
|
|
5
|
+
Direct production dependency only. The literal is at least 32 characters and sits inside the call. A shorter literal, or a long literal that is only assigned, is not this finding. This id is the tarball lifecycle script, distinct from `SUPPLY-OBFUSCATE-001`.
|
|
6
|
+
|
|
7
|
+
## Remediation
|
|
8
|
+
|
|
9
|
+
Do not install this package.
|
|
10
|
+
|
|
11
|
+
See `SECURITY_SCANNER_SPEC.md` Section 47 phase 174.
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# DEPS-TARBALL-PATH-001
|
|
2
|
+
|
|
3
|
+
**Tarball entry or bin path escapes the package.** Critical. Experimental (`FULLSHIELD_EXPERIMENTAL_NPM_TARBALL_PATH=1`). CWE-22.
|
|
4
|
+
|
|
5
|
+
Direct production dependency only. An entry name, after `\\` is normalized to `/`, is absolute or contains a `..` segment. The extractor skips that entry. This check runs when this flag is on even if later tarball flags are off. A normal `package/lib/index.js` is not this finding.
|
|
6
|
+
|
|
7
|
+
## Remediation
|
|
8
|
+
|
|
9
|
+
Do not extract the entry.
|
|
10
|
+
|
|
11
|
+
See `SECURITY_SCANNER_SPEC.md` Section 47 phase 179.
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# DEPS-TARBALL-SHELL-001
|
|
2
|
+
|
|
3
|
+
**Lifecycle script invokes a shell or downloader.** High. Experimental (`FULLSHIELD_EXPERIMENTAL_NPM_TARBALL_SHELL=1`). CWE-78.
|
|
4
|
+
|
|
5
|
+
Direct production dependency only. A `preinstall`, `install`, or `postinstall` string contains `curl`, `wget`, `bash`, `sh -c`, `powershell`, or `child_process`.
|
|
6
|
+
|
|
7
|
+
## Remediation
|
|
8
|
+
|
|
9
|
+
Remove those tokens from the install script.
|
|
10
|
+
|
|
11
|
+
See `SECURITY_SCANNER_SPEC.md` Section 47 phase 172.
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# DEPS-TARBALL-SIZE-001
|
|
2
|
+
|
|
3
|
+
**Tarball exceeds the unpack cap.** Info. Experimental (`FULLSHIELD_EXPERIMENTAL_NPM_TARBALL_SIZE=1`). CWE-770.
|
|
4
|
+
|
|
5
|
+
Direct production dependency only. Unpacked size would exceed 20 MB or the entry count would exceed 2000. Entries past the cap are not extracted. The cap is a limit, not a vulnerability count. A small archive is not this finding.
|
|
6
|
+
|
|
7
|
+
## Remediation
|
|
8
|
+
|
|
9
|
+
Inspect the package before raising the cap.
|
|
10
|
+
|
|
11
|
+
See `SECURITY_SCANNER_SPEC.md` Section 47 phase 180.
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# DEPS-TARBALL-SKIP-001
|
|
2
|
+
|
|
3
|
+
**Direct production tarball refused because integrity is missing.** Info. Experimental (`FULLSHIELD_EXPERIMENTAL_NPM_TARBALL_GATE=1`). CWE-353.
|
|
4
|
+
|
|
5
|
+
One row per direct production dependency that has an `https://registry.npmjs.org` tarball URL and no lock integrity. The tarball is not read. Transitive packages are not downloaded and do not produce this row. A dependency with no tarball URL is not this finding. When every direct production dependency has integrity, no row is emitted.
|
|
6
|
+
|
|
7
|
+
## Remediation
|
|
8
|
+
|
|
9
|
+
Add a sha512 integrity to the lock entry before fetching its tarball.
|
|
10
|
+
|
|
11
|
+
See `SECURITY_SCANNER_SPEC.md` Section 47 phase 187.
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# DEPS-TARBALL-TOPLEVEL-001
|
|
2
|
+
|
|
3
|
+
**Package entry calls the network or child_process outside a function.** High. Experimental (`FULLSHIELD_EXPERIMENTAL_NPM_TARBALL_TOPLEVEL=1`). CWE-829.
|
|
4
|
+
|
|
5
|
+
Direct production dependency only. `main` or an `exports` file contains `fetch(`, `http.request`, `https.request`, or a `child_process` call that is not inside a function. The file is parsed with the existing parser. A file that does not parse emits nothing. The same call inside a function is not this finding.
|
|
6
|
+
|
|
7
|
+
## Remediation
|
|
8
|
+
|
|
9
|
+
Move the call inside a function.
|
|
10
|
+
|
|
11
|
+
See `SECURITY_SCANNER_SPEC.md` Section 47 phase 184.
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# DEPS-TRUSTED-001
|
|
2
|
+
|
|
3
|
+
**Install script is not listed in trustedDependencies.** Experimental (`FULLSHIELD_EXPERIMENTAL_NPM_TRUSTED=1`). CWE-829. Severity medium.
|
|
4
|
+
|
|
5
|
+
A committed `.npmrc` sets `ignore-scripts=true`, a direct production dependency's lock entry has `hasInstallScript: true`, and that name is absent from the root `trustedDependencies`. A listed name, and `ignore-scripts` that is not `true`, are not this finding. A missing `hasInstallScript` is not a finding; this rule does not guess from the packument.
|
|
6
|
+
|
|
7
|
+
## Remediation
|
|
8
|
+
|
|
9
|
+
Add the package to trustedDependencies after reviewing its install script, or remove the dependency.
|
|
10
|
+
|
|
11
|
+
See `SECURITY_SCANNER_SPEC.md` Section 47 phase 144.
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# DEPS-TYPES-001
|
|
2
|
+
|
|
3
|
+
**Project depends on both foo and @types/foo when foo already ships types.** Experimental (`FULLSHIELD_EXPERIMENTAL_NPM_TYPES=1`). CWE-1104. Severity info.
|
|
4
|
+
|
|
5
|
+
foo's packument has a non-empty `types` or `typings` field. Neither field, and a missing packument, are not findings.
|
|
6
|
+
|
|
7
|
+
## Remediation
|
|
8
|
+
|
|
9
|
+
Remove the @types package if the package's own types are the ones TypeScript should use.
|
|
10
|
+
|
|
11
|
+
See `SECURITY_SCANNER_SPEC.md` Section 47 phase 217.
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# DEPS-TYPO-TRANSITIVE-001
|
|
2
|
+
|
|
3
|
+
**Transitive package name matches a scope, homoglyph, bidi, mixed-script, or separator check.** Experimental (`FULLSHIELD_EXPERIMENTAL_NPM_TYPO_TRANSITIVE=1`). CWE-494. Severity info.
|
|
4
|
+
|
|
5
|
+
One informational row per package. The message names the check. Direct names keep their own rule ids.
|
|
6
|
+
|
|
7
|
+
## Remediation
|
|
8
|
+
|
|
9
|
+
Confirm the transitive package name.
|
|
10
|
+
|
|
11
|
+
See `SECURITY_SCANNER_SPEC.md` Section 47 phase 219.
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# DEPS-UNFIXED-001
|
|
2
|
+
|
|
3
|
+
**Production dependency with no fixed version.** Experimental (`FULLSHIELD_EXPERIMENTAL_HEALTH=1`). CWE-1104. Severity medium.
|
|
4
|
+
|
|
5
|
+
A production dependency has an OSV advisory with no `fixed` event, and the registry publish date for that version is older than 730 days. An unknown publish date is not a finding. The console shows this only when reachability is `reachable`.
|
|
6
|
+
|
|
7
|
+
## Remediation
|
|
8
|
+
|
|
9
|
+
Decide whether to keep this dependency. FullShield does not name a replacement.
|
|
10
|
+
|
|
11
|
+
See `SECURITY_SCANNER_SPEC.md` Section 46 phase 106.
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# DEPS-URLSPEC-001
|
|
2
|
+
|
|
3
|
+
**HTTP(S) dependency URL outside the npm registry.** Experimental (`FULLSHIELD_EXPERIMENTAL_NPM_URLSPEC=1`). CWE-494. Severity high.
|
|
4
|
+
|
|
5
|
+
A direct spec is an `http:` or `https:` URL whose host is not `registry.npmjs.org`. A semver range and a `https://registry.npmjs.org/` tarball are not this finding.
|
|
6
|
+
|
|
7
|
+
## Remediation
|
|
8
|
+
|
|
9
|
+
Use a registry.npmjs.org tarball or a semver range.
|
|
10
|
+
|
|
11
|
+
See `SECURITY_SCANNER_SPEC.md` Section 47 phase 131.
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# DEPS-VENDORED-001
|
|
2
|
+
|
|
3
|
+
**Vendored library with an OSV advisory.** Experimental (`FULLSHIELD_EXPERIMENTAL_VENDORED=1`). CWE-1104. Severity comes from OSV.
|
|
4
|
+
|
|
5
|
+
A JavaScript file under `public/`, `static/`, `assets/`, `vendor/`, `lib/`, or any `*.min.js`, whose banner or exported `VERSION` matches `models/vendored.json`. No match means no finding. The version is never guessed from size or a hash. `--offline` uses the OSV cache; a cache miss is no finding. Reachability is `vendored`.
|
|
6
|
+
|
|
7
|
+
## Remediation
|
|
8
|
+
|
|
9
|
+
Replace the file. Do not edit the vendored copy in place.
|
|
10
|
+
|
|
11
|
+
See `SECURITY_SCANNER_SPEC.md` Section 46 phase 104.
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# DEPS-WEAKINTEGRITY-001
|
|
2
|
+
|
|
3
|
+
**Integrity uses sha1 or sha256.** Experimental (`FULLSHIELD_EXPERIMENTAL_NPM_WEAKINTEGRITY=1`). CWE-328. Severity medium.
|
|
4
|
+
|
|
5
|
+
integrity uses sha1 or sha256. The registry algorithm is sha512. A missing integrity is not this finding. A weak but well-formed hash is not also reported as a grammar failure.
|
|
6
|
+
|
|
7
|
+
## Remediation
|
|
8
|
+
|
|
9
|
+
Regenerate the lockfile so integrity starts with sha512-.
|
|
10
|
+
|
|
11
|
+
See `SECURITY_SCANNER_SPEC.md` phase 117.
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# DEPS-WORKSPACE-NAME-001
|
|
2
|
+
|
|
3
|
+
**A workspace package name is resolved from registry.npmjs.org.** Experimental (`FULLSHIELD_EXPERIMENTAL_NPM_WORKSPACE_NAME=1`). CWE-494. Severity high.
|
|
4
|
+
|
|
5
|
+
The lock `resolved` URL host is the npm registry rather than `link:` or `file:`. A `link:` to the workspace path is not a finding.
|
|
6
|
+
|
|
7
|
+
## Remediation
|
|
8
|
+
|
|
9
|
+
Link the workspace package with link: or file: so install does not fetch a registry package of the same name.
|
|
10
|
+
|
|
11
|
+
See `SECURITY_SCANNER_SPEC.md` Section 47 phase 225.
|
package/rules/README.md
CHANGED
|
@@ -21,6 +21,12 @@ negative counterpart in `test/fixtures/clean-app`.
|
|
|
21
21
|
| [SECRET-SESSION-001](SECRET-SESSION-001.md) | Hardcoded express-session secret |
|
|
22
22
|
| [SECRET-ENTROPY-001](SECRET-ENTROPY-001.md) | High-entropy assignment (low confidence) |
|
|
23
23
|
| [SECRET-ENVFILE-001](SECRET-ENVFILE-001.md) | Committed `.env` file |
|
|
24
|
+
| [SECRET-FILE-002](SECRET-FILE-002.md) | `.npmrc` `_authToken` / `_auth` literal (experimental) |
|
|
25
|
+
| [SECRET-FILE-003](SECRET-FILE-003.md) | Docker `config.json` `auths` auth value (experimental) |
|
|
26
|
+
| [SECRET-FILE-004](SECRET-FILE-004.md) | kubeconfig `token` or `client-key-data` (experimental) |
|
|
27
|
+
| [SECRET-FILE-005](SECRET-FILE-005.md) | Committed Terraform state (experimental) |
|
|
28
|
+
| [SECRET-FILE-006](SECRET-FILE-006.md) | JSON service-account `private_key` (experimental) |
|
|
29
|
+
| [SECRET-FILE-007](SECRET-FILE-007.md) | `id_rsa`, `id_ed25519`, `*.p12`, `*.pfx`, `*.keystore` (experimental) |
|
|
24
30
|
| [SECRET-BUNDLE-001](SECRET-BUNDLE-001.md) | Secret-shaped `NEXT_PUBLIC_`/`VITE_` value in a client bundle (experimental) |
|
|
25
31
|
|
|
26
32
|
## Dependencies
|
|
@@ -48,6 +54,12 @@ negative counterpart in `test/fixtures/clean-app`.
|
|
|
48
54
|
| [SAST-REDIRECT-001](SAST-REDIRECT-001.md) | Tainted `res.redirect` |
|
|
49
55
|
| [SAST-JWT-001](SAST-JWT-001.md) | `jwt.decode` / `algorithms: none` |
|
|
50
56
|
| [SAST-CRYPTO-001](SAST-CRYPTO-001.md) | `Math.random` tokens / md5 passwords |
|
|
57
|
+
| [SAST-CIPHER-001](SAST-CIPHER-001.md) | ECB, deprecated cipher, literal IV (experimental) |
|
|
58
|
+
| [SAST-CIPHER-002](SAST-CIPHER-002.md) | String-literal key to `createCipheriv` / `createHmac` (experimental) |
|
|
59
|
+
| [SAST-RSA-001](SAST-RSA-001.md) | RSA below 2048 or `secp192*` (experimental) |
|
|
60
|
+
| [SAST-JWT-002](SAST-JWT-002.md) | `jwt.sign` with no expiry or a short HMAC secret (experimental) |
|
|
61
|
+
| [SAST-TLS-001](SAST-TLS-001.md) | `rejectUnauthorized: false` and a no-op identity check (experimental) |
|
|
62
|
+
| [SAST-TLS-002](SAST-TLS-002.md) | `NODE_TLS_REJECT_UNAUTHORIZED=0` (experimental) |
|
|
51
63
|
| [SAST-PROTO-001](SAST-PROTO-001.md) | Unguarded recursive merge |
|
|
52
64
|
| [SAST-XSS-001](SAST-XSS-001.md) | HTML `res.send` or `<%-` / `{{{` |
|
|
53
65
|
| [SAST-AUTH-001](SAST-AUTH-001.md) | Data route with no auth middleware |
|
|
@@ -107,3 +119,26 @@ Requires `FULLSHIELD_EXPERIMENTAL_DLP=1` and `shieldGuard({ dlp: { mode } })`. N
|
|
|
107
119
|
| [HOST-SSH-001](HOST-SSH-001.md) | OpenSSH version in the CVE-2024-6387 range |
|
|
108
120
|
| [HOST-SSH-002](HOST-SSH-002.md) | Vulnerable OpenSSH without `LoginGraceTime 0` |
|
|
109
121
|
| [HOST-SSH-003](HOST-SSH-003.md) | Possible SSH authentication-timeout attempts |
|
|
122
|
+
|
|
123
|
+
## Breadth 1.2.0 (experimental, off by default)
|
|
124
|
+
|
|
125
|
+
| ID | What |
|
|
126
|
+
|---|---|
|
|
127
|
+
| [CONFIG-ELECTRON-001](CONFIG-ELECTRON-001.md) | Unsafe Electron `webPreferences` (`FULLSHIELD_EXPERIMENTAL_ELECTRON`) |
|
|
128
|
+
| [CONFIG-ELECTRON-002](CONFIG-ELECTRON-002.md) | `shell.openExternal` without an https check |
|
|
129
|
+
| [CONFIG-ELECTRON-003](CONFIG-ELECTRON-003.md) | Remote `loadURL` without navigation guards |
|
|
130
|
+
| [DEPS-VENDORED-001](DEPS-VENDORED-001.md) | Vendored library matched by banner or VERSION (`FULLSHIELD_EXPERIMENTAL_VENDORED`) |
|
|
131
|
+
| [DEPS-UNFIXED-001](DEPS-UNFIXED-001.md) | Production dependency with no fixed version, last publish over 730 days (`FULLSHIELD_EXPERIMENTAL_HEALTH`) |
|
|
132
|
+
| [SAST-SSTI-001](SAST-SSTI-001.md) | Tainted template source (`FULLSHIELD_EXPERIMENTAL_SSTI`) |
|
|
133
|
+
| [SAST-WEBHOOK-001](SAST-WEBHOOK-001.md) | Known webhook provider with no verifier (`FULLSHIELD_EXPERIMENTAL_WEBHOOK`) |
|
|
134
|
+
| [SAST-SESSION-002](SAST-SESSION-002.md) | Login session write without regenerate (`FULLSHIELD_EXPERIMENTAL_SESSION2`) |
|
|
135
|
+
| [SAST-LOGLEAK-001](SAST-LOGLEAK-001.md) | Secret written to a log (`FULLSHIELD_EXPERIMENTAL_LOGLEAK`) |
|
|
136
|
+
| [SAST-NEXT-001](SAST-NEXT-001.md) | `use server` write without auth (`FULLSHIELD_EXPERIMENTAL_NEXT`) |
|
|
137
|
+
| [CONFIG-NEXT-001](CONFIG-NEXT-001.md) | Auth only in Next.js middleware |
|
|
138
|
+
| [CONFIG-NEXT-002](CONFIG-NEXT-002.md) | Unrestricted Next.js image hosts |
|
|
139
|
+
| [SECRET-NEXTPUB-001](SECRET-NEXTPUB-001.md) | `NEXT_PUBLIC_` name that looks like a secret |
|
|
140
|
+
| [SAST-DOMXSS-001](SAST-DOMXSS-001.md) | DOM XSS sink (`FULLSHIELD_EXPERIMENTAL_BROWSER`) |
|
|
141
|
+
| [SAST-REACT-001](SAST-REACT-001.md) | Unsanitized HTML binding |
|
|
142
|
+
| [SAST-POSTMSG-001](SAST-POSTMSG-001.md) | postMessage without an origin check |
|
|
143
|
+
| [SAST-TOKENSTORE-001](SAST-TOKENSTORE-001.md) | Token written to localStorage |
|
|
144
|
+
| [SAST-IDOR-001](SAST-IDOR-001.md) | Load-by-id hint that never fails CI (`FULLSHIELD_EXPERIMENTAL_IDOR`) |
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
# SAST-CIPHER-001
|
|
2
|
+
|
|
3
|
+
**Weak cipher mode or IV.** Experimental (`FULLSHIELD_EXPERIMENTAL_CRYPTO2=1`). CWE-327. Severity high.
|
|
4
|
+
|
|
5
|
+
`createCipheriv` with an `*-ecb` algorithm, deprecated `createCipher` / `createDecipher`, or an IV that is a string literal, `Buffer.from` of a literal, or `Buffer.alloc`. `randomBytes` is not a finding.
|
|
6
|
+
|
|
7
|
+
Test paths use the phase 95 test-context rule (severity low, `context: "test"`).
|
|
8
|
+
|
|
9
|
+
## Remediation
|
|
10
|
+
|
|
11
|
+
Use an authenticated mode such as `aes-256-gcm` and a random IV from `randomBytes`.
|
|
12
|
+
|
|
13
|
+
See `SECURITY_SCANNER_SPEC.md` Section 46 phase 96.
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# SAST-CIPHER-002
|
|
2
|
+
|
|
3
|
+
**Hardcoded symmetric key.** Experimental (`FULLSHIELD_EXPERIMENTAL_CRYPTO2=1`). CWE-321. Severity high.
|
|
4
|
+
|
|
5
|
+
A string literal passed as the key to `createCipheriv` or `createHmac`. A key read from `process.env` is not a finding. This rule does not add a second finding on a line already reported as `SECRET-JWT-*` or `SECRET-ENTROPY-001`.
|
|
6
|
+
|
|
7
|
+
## Remediation
|
|
8
|
+
|
|
9
|
+
Load the key from an environment variable or a secret manager.
|
|
10
|
+
|
|
11
|
+
See `SECURITY_SCANNER_SPEC.md` Section 46 phase 96.
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# SAST-DOMXSS-001
|
|
2
|
+
|
|
3
|
+
**DOM XSS sink.** Experimental (`FULLSHIELD_EXPERIMENTAL_BROWSER=1`). CWE-79. Severity high.
|
|
4
|
+
|
|
5
|
+
Browser source (`location.hash`, `location.search`, `location.href`, `document.URL`, `document.referrer`, `window.name`, `event.data`) is written to `innerHTML`, `outerHTML`, `insertAdjacentHTML`, `document.write`, `eval`, a string `setTimeout` / `setInterval`, `src` / `href` without an `https:` check, or jQuery `$(source)` / `.html()`. Server taint rules do not run browser sources.
|
|
6
|
+
|
|
7
|
+
## Remediation
|
|
8
|
+
|
|
9
|
+
Assign text with `textContent`, or sanitize HTML before writing it.
|
|
10
|
+
|
|
11
|
+
See `SECURITY_SCANNER_SPEC.md` Section 46 phase 101.
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# SAST-IDOR-001
|
|
2
|
+
|
|
3
|
+
**Handler loads by id without an ownership check.** Experimental (`FULLSHIELD_EXPERIMENTAL_IDOR=1`). CWE-639. Severity low. Confidence low. `source` is `rule`, so `failsCi` is false at every fail-on threshold.
|
|
4
|
+
|
|
5
|
+
An authenticated-looking route with an `:id` param loads by `findById`, `findByPk`, `findUnique`, or `WHERE id =` and the file never references `req.user`, `req.session.user`, or `ctx.state.user`. A middleware name matching `admin`, `role`, `permission`, or `authorize` is not a finding. This is a hint and is not promoted.
|
|
6
|
+
|
|
7
|
+
## Remediation
|
|
8
|
+
|
|
9
|
+
Scope the query to the authenticated user.
|
|
10
|
+
|
|
11
|
+
See `SECURITY_SCANNER_SPEC.md` Section 46 phase 107.
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# SAST-JWT-002
|
|
2
|
+
|
|
3
|
+
**JWT without expiry or with a short HMAC secret.** Experimental (`FULLSHIELD_EXPERIMENTAL_CRYPTO2=1`). CWE-613. Severity medium.
|
|
4
|
+
|
|
5
|
+
`jwt.sign` with no `expiresIn` and no `exp`, or an HMAC secret string literal shorter than 32 bytes. `expiresIn: '1h'` with a secret of at least 32 bytes is not a finding.
|
|
6
|
+
|
|
7
|
+
## Remediation
|
|
8
|
+
|
|
9
|
+
Set `expiresIn` or `exp`, and use an HMAC secret of at least 32 bytes.
|
|
10
|
+
|
|
11
|
+
See `SECURITY_SCANNER_SPEC.md` Section 46 phase 96.
|