Skip to content

Commit d4bec77

Browse files
committed
Say every manifest under module folders is scanned, and shorten the help
The flag adds every supported manifest under node_modules, bower_components and jspm_packages, at any depth, not only each package's top-level package.json. Those files are added to the same scan; no separate project is created. Say that in the reference, troubleshooting entry and changelog. Cut the help text to two sentences and point to the troubleshooting section on GitHub, since pip installs don't include the docs folder.
1 parent a8d72cc commit d4bec77

4 files changed

Lines changed: 9 additions & 12 deletions

File tree

‎CHANGELOG.md‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@
44

55
### Docs
66

7-
- `--include-module-folders` help and docs now say what the flag does: each
8-
`package.json` under `node_modules`, `bower_components` or `jspm_packages` is
9-
uploaded as its own project, and Socket resolves the dependencies it declares.
10-
It does not list installed packages. The troubleshooting guide covers scanning
7+
- `--include-module-folders` help and docs now say what the flag does: every
8+
supported manifest under `node_modules`, `bower_components` or `jspm_packages`,
9+
nested folders included, is added to the scan, and Socket resolves the
10+
dependencies those files declare. It does not list installed packages. The troubleshooting guide covers scanning
1111
packages installed outside the lockfile with a CycloneDX SBOM.
1212

1313
## 2.13.0

‎docs/cli-reference.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -308,7 +308,7 @@ If you don't want to provide the Socket API Token every time then you can use th
308308
| Parameter | Required | Default | Description |
309309
|:-------------------------|:---------|:--------|:------------------------------------------------------------------------------------------------------|
310310
| `--default-branch` | False | *auto* | Make this branch the default branch (auto-detected from git and CI environment when not specified) |
311-
| `--include-module-folders` | False | False | Also discovers manifests inside the JS module folders (`node_modules`, `bower_components`, `jspm_packages`), which are skipped by default. Same as `--include-dirs node_modules,bower_components,jspm_packages`. Each `package.json` found there is uploaded as its own project, and Socket resolves the dependencies it declares, `devDependencies` included, so a scan can gain hundreds of packages your project never installs. It does not record the installed packages themselves, so it won't find packages missing from your lockfile; see [Packages installed outside the lockfile](troubleshooting.md#packages-installed-outside-the-lockfile). With `--reach`, the extra manifests are uploaded for reachability analysis too. For `vendor`, `.venv` and other excluded directories, use `--include-dirs`. |
311+
| `--include-module-folders` | False | False | Also discovers manifests anywhere under `node_modules`, `bower_components` and `jspm_packages`, nested folders included (skipped by default; same as `--include-dirs` with those names). Every supported manifest found there is added to the scan, and Socket resolves the dependencies those files declare, `devDependencies` included. The installed packages themselves are not recorded; see [Packages installed outside the lockfile](troubleshooting.md#packages-installed-outside-the-lockfile). For `vendor`, `.venv` and other excluded directories, use `--include-dirs`. |
312312
313313
#### Output Configuration
314314
| Parameter | Required | Default | Description |

‎docs/troubleshooting.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ total before assuming either path is at fault.
7878

7979
The CLI scans manifests and lockfiles. A package that a `postinstall` script installs into `node_modules` has no lockfile entry, so it is not in the scan.
8080

81-
`--include-module-folders` does not fix this. It uploads each `node_modules/*/package.json` as a separate project, and Socket resolves the dependencies those files declare (`devDependencies` included). The installed packages themselves are not recorded, and the scan can gain hundreds of packages your project never installs.
81+
`--include-module-folders` does not fix this. It adds every supported manifest under `node_modules` to the scan, at any depth: each package's `package.json`, including nested `node_modules` and scoped packages, plus any other manifest or lockfile a package ships. Socket resolves the dependencies those files declare (`devDependencies` included), so the scan can gain hundreds of packages your project never installs. The installed packages themselves are not recorded. With `--reach`, these manifests are uploaded for reachability analysis too.
8282

8383
To scan what is installed, generate a CycloneDX SBOM of the installed `node_modules` tree and save it in the scan root before running the CLI:
8484

‎socketsecurity/config.py‎

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1119,12 +1119,9 @@ def create_argument_parser() -> argparse.ArgumentParser:
11191119
dest="include_module_folders",
11201120
action="store_true",
11211121
default=False,
1122-
help="Also discover manifests inside node_modules, bower_components and jspm_packages, "
1123-
"which are skipped by default (same as --include-dirs with those names). Each "
1124-
"package.json found there is uploaded as its own project, and Socket resolves the "
1125-
"dependencies it declares, devDependencies included. This does not list the "
1126-
"installed packages themselves, so it does not find packages that are missing from "
1127-
"your lockfile. See docs/troubleshooting.md."
1122+
help="Also scan manifests anywhere under node_modules, bower_components and jspm_packages "
1123+
"(same as --include-dirs with those names). Adds the dependencies they declare, not the "
1124+
"installed packages. See https://github.com/SocketDev/socket-python-cli/blob/main/docs/troubleshooting.md#packages-installed-outside-the-lockfile"
11281125
)
11291126

11301127
# Reachability Configuration

0 commit comments

Comments
 (0)