@socketsecurity/cli 1.1.102 → 1.1.152

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.
Files changed (203) hide show
  1. package/CHANGELOG.md +278 -3
  2. package/DISCLOSURE +45 -0
  3. package/README.md +9 -0
  4. package/bin/cli.js +33 -1
  5. package/dist/cli.js +6598 -1912
  6. package/dist/cli.js.map +1 -1
  7. package/dist/constants.js +8 -10
  8. package/dist/constants.js.map +1 -1
  9. package/dist/init.gradle +73 -0
  10. package/dist/manifest-scripts/maven-extension/coana-maven-extension.jar +0 -0
  11. package/dist/manifest-scripts/socket-facts.init.gradle +581 -0
  12. package/dist/manifest-scripts/socket-facts.plugin.scala +544 -0
  13. package/dist/shadow-npm-bin2.js +6 -6
  14. package/dist/shadow-npm-bin2.js.map +1 -1
  15. package/dist/shadow-npm-inject.js +10 -10
  16. package/dist/shadow-npm-inject.js.map +1 -1
  17. package/dist/shadow-pnpm-bin2.js +13 -13
  18. package/dist/shadow-pnpm-bin2.js.map +1 -1
  19. package/dist/shadow-yarn-bin.js +3 -3
  20. package/dist/shadow-yarn-bin.js.map +1 -1
  21. package/dist/socket-completion.bash +0 -0
  22. package/dist/tsconfig.dts.tsbuildinfo +1 -1
  23. package/dist/types/commands/audit-log/output-audit-log.d.mts.map +1 -1
  24. package/dist/types/commands/ci/fetch-default-org-slug.d.mts.map +1 -1
  25. package/dist/types/commands/ci/handle-ci.d.mts.map +1 -1
  26. package/dist/types/commands/config/handle-config-get.d.mts.map +1 -1
  27. package/dist/types/commands/config/handle-config-set.d.mts.map +1 -1
  28. package/dist/types/commands/config/output-config-set.d.mts.map +1 -1
  29. package/dist/types/commands/fix/cmd-fix.d.mts.map +1 -1
  30. package/dist/types/commands/fix/coana-fix.d.mts.map +1 -1
  31. package/dist/types/commands/fix/handle-fix.d.mts +1 -1
  32. package/dist/types/commands/fix/handle-fix.d.mts.map +1 -1
  33. package/dist/types/commands/fix/types.d.mts +1 -0
  34. package/dist/types/commands/fix/types.d.mts.map +1 -1
  35. package/dist/types/commands/manifest/bazel/bazel-cquery.d.mts +70 -0
  36. package/dist/types/commands/manifest/bazel/bazel-cquery.d.mts.map +1 -0
  37. package/dist/types/commands/manifest/bazel/bazel-pypi-discovery.d.mts +44 -0
  38. package/dist/types/commands/manifest/bazel/bazel-pypi-discovery.d.mts.map +1 -0
  39. package/dist/types/commands/manifest/bazel/bazel-pypi-parser.d.mts +46 -0
  40. package/dist/types/commands/manifest/bazel/bazel-pypi-parser.d.mts.map +1 -0
  41. package/dist/types/commands/manifest/bazel/bazel-query-runner.d.mts +66 -8
  42. package/dist/types/commands/manifest/bazel/bazel-query-runner.d.mts.map +1 -1
  43. package/dist/types/commands/manifest/bazel/bazel-repo-discovery.d.mts +69 -29
  44. package/dist/types/commands/manifest/bazel/bazel-repo-discovery.d.mts.map +1 -1
  45. package/dist/types/commands/manifest/bazel/bazel-workspace-walk.d.mts +18 -0
  46. package/dist/types/commands/manifest/bazel/bazel-workspace-walk.d.mts.map +1 -0
  47. package/dist/types/commands/manifest/bazel/cmd-manifest-bazel.d.mts +26 -0
  48. package/dist/types/commands/manifest/bazel/cmd-manifest-bazel.d.mts.map +1 -1
  49. package/dist/types/commands/manifest/bazel/extract_bazel_to_maven.d.mts +110 -7
  50. package/dist/types/commands/manifest/bazel/extract_bazel_to_maven.d.mts.map +1 -1
  51. package/dist/types/commands/manifest/bazel/extract_bazel_to_pypi.d.mts +20 -0
  52. package/dist/types/commands/manifest/bazel/extract_bazel_to_pypi.d.mts.map +1 -0
  53. package/dist/types/commands/manifest/cmd-manifest-auto.d.mts.map +1 -1
  54. package/dist/types/commands/manifest/cmd-manifest-gradle.d.mts.map +1 -1
  55. package/dist/types/commands/manifest/cmd-manifest-kotlin.d.mts.map +1 -1
  56. package/dist/types/commands/manifest/cmd-manifest-maven.d.mts +9 -0
  57. package/dist/types/commands/manifest/cmd-manifest-maven.d.mts.map +1 -0
  58. package/dist/types/commands/manifest/cmd-manifest-scala.d.mts.map +1 -1
  59. package/dist/types/commands/manifest/cmd-manifest.d.mts.map +1 -1
  60. package/dist/types/commands/manifest/convert-gradle-to-facts.d.mts +9 -1
  61. package/dist/types/commands/manifest/convert-gradle-to-facts.d.mts.map +1 -1
  62. package/dist/types/commands/manifest/convert-maven-to-facts.d.mts +15 -0
  63. package/dist/types/commands/manifest/convert-maven-to-facts.d.mts.map +1 -0
  64. package/dist/types/commands/manifest/convert-sbt-to-facts.d.mts +19 -0
  65. package/dist/types/commands/manifest/convert-sbt-to-facts.d.mts.map +1 -0
  66. package/dist/types/commands/manifest/convert_gradle_to_maven.d.mts +2 -1
  67. package/dist/types/commands/manifest/convert_gradle_to_maven.d.mts.map +1 -1
  68. package/dist/types/commands/manifest/detect-manifest-actions.d.mts +1 -0
  69. package/dist/types/commands/manifest/detect-manifest-actions.d.mts.map +1 -1
  70. package/dist/types/commands/manifest/generate_auto_manifest.d.mts +12 -1
  71. package/dist/types/commands/manifest/generate_auto_manifest.d.mts.map +1 -1
  72. package/dist/types/commands/manifest/parse-build-tool-opts.d.mts +9 -0
  73. package/dist/types/commands/manifest/parse-build-tool-opts.d.mts.map +1 -0
  74. package/dist/types/commands/manifest/run-manifest-facts.d.mts +24 -0
  75. package/dist/types/commands/manifest/run-manifest-facts.d.mts.map +1 -0
  76. package/dist/types/commands/manifest/scripts/assemble.d.mts +16 -0
  77. package/dist/types/commands/manifest/scripts/assemble.d.mts.map +1 -0
  78. package/dist/types/commands/manifest/scripts/build-tool.d.mts +3 -0
  79. package/dist/types/commands/manifest/scripts/build-tool.d.mts.map +1 -0
  80. package/dist/types/commands/manifest/scripts/facts.d.mts +46 -0
  81. package/dist/types/commands/manifest/scripts/facts.d.mts.map +1 -0
  82. package/dist/types/commands/manifest/scripts/records.d.mts +66 -0
  83. package/dist/types/commands/manifest/scripts/records.d.mts.map +1 -0
  84. package/dist/types/commands/manifest/scripts/resolution-report-gradle.d.mts +10 -0
  85. package/dist/types/commands/manifest/scripts/resolution-report-gradle.d.mts.map +1 -0
  86. package/dist/types/commands/manifest/scripts/resolution-report-ivy.d.mts +7 -0
  87. package/dist/types/commands/manifest/scripts/resolution-report-ivy.d.mts.map +1 -0
  88. package/dist/types/commands/manifest/scripts/resolution-report-maven.d.mts +8 -0
  89. package/dist/types/commands/manifest/scripts/resolution-report-maven.d.mts.map +1 -0
  90. package/dist/types/commands/manifest/scripts/resolution-report-render.d.mts +43 -0
  91. package/dist/types/commands/manifest/scripts/resolution-report-render.d.mts.map +1 -0
  92. package/dist/types/commands/manifest/scripts/resolution-report.d.mts +18 -0
  93. package/dist/types/commands/manifest/scripts/resolution-report.d.mts.map +1 -0
  94. package/dist/types/commands/manifest/scripts/run.d.mts +43 -0
  95. package/dist/types/commands/manifest/scripts/run.d.mts.map +1 -0
  96. package/dist/types/commands/manifest/scripts/sidecar.d.mts +27 -0
  97. package/dist/types/commands/manifest/scripts/sidecar.d.mts.map +1 -0
  98. package/dist/types/commands/manifest/setup-manifest-config.d.mts.map +1 -1
  99. package/dist/types/commands/organization/fetch-organization-list.d.mts +2 -2
  100. package/dist/types/commands/organization/fetch-organization-list.d.mts.map +1 -1
  101. package/dist/types/commands/package/output-purls-shallow-score.d.mts.map +1 -1
  102. package/dist/types/commands/repository/fetch-create-repo.d.mts +2 -2
  103. package/dist/types/commands/repository/fetch-create-repo.d.mts.map +1 -1
  104. package/dist/types/commands/repository/fetch-delete-repo.d.mts +2 -2
  105. package/dist/types/commands/repository/fetch-delete-repo.d.mts.map +1 -1
  106. package/dist/types/commands/repository/fetch-list-all-repos.d.mts +2 -2
  107. package/dist/types/commands/repository/fetch-list-all-repos.d.mts.map +1 -1
  108. package/dist/types/commands/repository/fetch-list-repos.d.mts +2 -2
  109. package/dist/types/commands/repository/fetch-list-repos.d.mts.map +1 -1
  110. package/dist/types/commands/repository/fetch-update-repo.d.mts +2 -2
  111. package/dist/types/commands/repository/fetch-update-repo.d.mts.map +1 -1
  112. package/dist/types/commands/repository/fetch-view-repo.d.mts +2 -2
  113. package/dist/types/commands/repository/fetch-view-repo.d.mts.map +1 -1
  114. package/dist/types/commands/repository/handle-list-repos.d.mts.map +1 -1
  115. package/dist/types/commands/repository/output-create-repo.d.mts +2 -2
  116. package/dist/types/commands/repository/output-create-repo.d.mts.map +1 -1
  117. package/dist/types/commands/repository/output-delete-repo.d.mts +2 -2
  118. package/dist/types/commands/repository/output-delete-repo.d.mts.map +1 -1
  119. package/dist/types/commands/repository/output-list-repos.d.mts +2 -2
  120. package/dist/types/commands/repository/output-list-repos.d.mts.map +1 -1
  121. package/dist/types/commands/repository/output-update-repo.d.mts +2 -2
  122. package/dist/types/commands/repository/output-update-repo.d.mts.map +1 -1
  123. package/dist/types/commands/repository/output-view-repo.d.mts +2 -2
  124. package/dist/types/commands/repository/output-view-repo.d.mts.map +1 -1
  125. package/dist/types/commands/scan/cmd-scan-create.d.mts.map +1 -1
  126. package/dist/types/commands/scan/cmd-scan-reach.d.mts.map +1 -1
  127. package/dist/types/commands/scan/create-scan-from-github.d.mts.map +1 -1
  128. package/dist/types/commands/scan/exclude-paths.d.mts +2 -2
  129. package/dist/types/commands/scan/exclude-paths.d.mts.map +1 -1
  130. package/dist/types/commands/scan/fetch-create-org-full-scan.d.mts +2 -2
  131. package/dist/types/commands/scan/fetch-create-org-full-scan.d.mts.map +1 -1
  132. package/dist/types/commands/scan/fetch-delete-org-full-scan.d.mts +2 -2
  133. package/dist/types/commands/scan/fetch-delete-org-full-scan.d.mts.map +1 -1
  134. package/dist/types/commands/scan/fetch-list-scans.d.mts +2 -2
  135. package/dist/types/commands/scan/fetch-list-scans.d.mts.map +1 -1
  136. package/dist/types/commands/scan/fetch-scan-metadata.d.mts +2 -2
  137. package/dist/types/commands/scan/fetch-scan-metadata.d.mts.map +1 -1
  138. package/dist/types/commands/scan/fetch-scan.d.mts +4 -0
  139. package/dist/types/commands/scan/fetch-scan.d.mts.map +1 -1
  140. package/dist/types/commands/scan/fetch-supported-scan-file-names.d.mts +2 -1
  141. package/dist/types/commands/scan/fetch-supported-scan-file-names.d.mts.map +1 -1
  142. package/dist/types/commands/scan/finalize-tier1-scan.d.mts +9 -5
  143. package/dist/types/commands/scan/finalize-tier1-scan.d.mts.map +1 -1
  144. package/dist/types/commands/scan/handle-create-new-scan.d.mts.map +1 -1
  145. package/dist/types/commands/scan/handle-scan-reach.d.mts.map +1 -1
  146. package/dist/types/commands/scan/output-create-new-scan.d.mts +2 -2
  147. package/dist/types/commands/scan/output-create-new-scan.d.mts.map +1 -1
  148. package/dist/types/commands/scan/output-delete-scan.d.mts +2 -2
  149. package/dist/types/commands/scan/output-delete-scan.d.mts.map +1 -1
  150. package/dist/types/commands/scan/output-list-scans.d.mts +2 -2
  151. package/dist/types/commands/scan/output-list-scans.d.mts.map +1 -1
  152. package/dist/types/commands/scan/output-scan-metadata.d.mts +2 -2
  153. package/dist/types/commands/scan/output-scan-metadata.d.mts.map +1 -1
  154. package/dist/types/commands/scan/output-scan-reach.d.mts +2 -1
  155. package/dist/types/commands/scan/output-scan-reach.d.mts.map +1 -1
  156. package/dist/types/commands/scan/perform-reachability-analysis.d.mts +10 -3
  157. package/dist/types/commands/scan/perform-reachability-analysis.d.mts.map +1 -1
  158. package/dist/types/commands/scan/reachability-flags.d.mts.map +1 -1
  159. package/dist/types/commands/scan/reachability-units.d.mts +18 -0
  160. package/dist/types/commands/scan/reachability-units.d.mts.map +1 -0
  161. package/dist/types/commands/scan/stream-scan.d.mts +3 -1
  162. package/dist/types/commands/scan/stream-scan.d.mts.map +1 -1
  163. package/dist/types/constants.d.mts +2 -4
  164. package/dist/types/constants.d.mts.map +1 -1
  165. package/dist/types/utils/api.d.mts +53 -7
  166. package/dist/types/utils/api.d.mts.map +1 -1
  167. package/dist/types/utils/config.d.mts.map +1 -1
  168. package/dist/types/utils/dlx.d.mts +4 -3
  169. package/dist/types/utils/dlx.d.mts.map +1 -1
  170. package/dist/types/utils/ecosystem.d.mts +8 -1
  171. package/dist/types/utils/ecosystem.d.mts.map +1 -1
  172. package/dist/types/utils/fs.d.mts +1 -0
  173. package/dist/types/utils/fs.d.mts.map +1 -1
  174. package/dist/types/utils/glob.d.mts +5 -4
  175. package/dist/types/utils/glob.d.mts.map +1 -1
  176. package/dist/types/utils/meow-with-subcommands.d.mts.map +1 -1
  177. package/dist/types/utils/path-resolve.d.mts +1 -1
  178. package/dist/types/utils/path-resolve.d.mts.map +1 -1
  179. package/dist/types/utils/sdk.d.mts +6 -0
  180. package/dist/types/utils/sdk.d.mts.map +1 -1
  181. package/dist/types/utils/self-update.d.mts +3 -0
  182. package/dist/types/utils/self-update.d.mts.map +1 -0
  183. package/dist/types/utils/socket-json.d.mts +17 -0
  184. package/dist/types/utils/socket-json.d.mts.map +1 -1
  185. package/dist/types/utils/socket-package-alert.d.mts.map +1 -1
  186. package/dist/utils.js +614 -283
  187. package/dist/utils.js.map +1 -1
  188. package/dist/vendor.js +50578 -27781
  189. package/external/blessed/lib/tput.js +5 -5
  190. package/package.json +64 -131
  191. package/requirements.json +1 -1
  192. package/shadow-bin/npm +0 -0
  193. package/shadow-bin/npx +0 -0
  194. package/shadow-bin/pnpm +0 -0
  195. package/shadow-bin/yarn +0 -0
  196. package/dist/socket-facts.init.gradle +0 -353
  197. package/dist/types/commands/manifest/bazel/bazel-build-parser.d.mts +0 -34
  198. package/dist/types/commands/manifest/bazel/bazel-build-parser.d.mts.map +0 -1
  199. package/external/blessed/usr/fonts/AUTHORS +0 -1
  200. package/external/blessed/usr/fonts/LICENSE +0 -94
  201. package/external/blessed/usr/fonts/README +0 -340
  202. package/external/blessed/usr/fonts/ter-u14b.json +0 -17826
  203. package/external/blessed/usr/fonts/ter-u14n.json +0 -17826
package/CHANGELOG.md CHANGED
@@ -4,14 +4,289 @@ All notable changes to this project will be documented in this file.
4
4
 
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/).
6
6
 
7
- ## [Unreleased]
7
+ ## [1.1.152](https://github.com/SocketDev/socket-cli/releases/tag/v1.1.152) - 2026-08-03
8
+
9
+ ### Changed
10
+ - Updated the Coana CLI to v `15.10.0`.
11
+
12
+ ## [1.1.151](https://github.com/SocketDev/socket-cli/releases/tag/v1.1.151) - 2026-07-31
13
+
14
+ ### Changed
15
+ - Updated the Coana CLI to v `15.9.9`.
16
+ - `socket scan view` now reads completed scans from Socket's cached immutable results, retrying briefly while a fresh scan finalizes; `--stream` keeps streaming live results.
17
+ - `socket fix` vulnerability discovery now reads Coana's structured `--output-file` JSON result instead of parsing stdout, and warns when the Socket backend resolved 0 artifacts so an incomplete server-side resolve is surfaced instead of silently reporting "Finished!".
18
+
19
+ ### Fixed
20
+ - `socket fix` no longer reports success when the Coana vulnerability-discovery step fails — Coana errors and unreadable discovery output now exit non-zero with the underlying reason instead of printing "Finished!" with nothing fixed.
21
+ - Fixed `--auto-manifest --reach` reachability scans on sbt/Scala projects sometimes failing to resolve the Scala standard library.
22
+
23
+ ## [1.1.147](https://github.com/SocketDev/socket-cli/releases/tag/v1.1.147) - 2026-07-27
24
+
25
+ ### Changed
26
+ - Updated the Coana CLI to v `15.9.4`.
27
+
28
+ ## [1.1.146](https://github.com/SocketDev/socket-cli/releases/tag/v1.1.146) - 2026-07-24
29
+
30
+ ### Changed
31
+ - Updated the Coana CLI to v `15.9.1`.
32
+
33
+ ## [1.1.145](https://github.com/SocketDev/socket-cli/releases/tag/v1.1.145) - 2026-07-23
34
+
35
+ ### Changed
36
+ - Updated the Coana CLI to v `15.9.0`.
37
+
38
+ ## [1.1.144](https://github.com/SocketDev/socket-cli/releases/tag/v1.1.144) - 2026-07-23
39
+
40
+ ### Fixed
41
+ - `--reach-ecosystems` now rejects ecosystems the reachability engine cannot analyze, failing fast at the CLI with a clear message listing the supported ecosystems instead of erroring partway through a scan.
42
+
43
+ ## [1.1.143](https://github.com/SocketDev/socket-cli/releases/tag/v1.1.143) - 2026-07-10
44
+
45
+ ### Changed
46
+ - Updated the Coana CLI to v `15.8.8`.
47
+
48
+ ## [1.1.142](https://github.com/SocketDev/socket-cli/releases/tag/v1.1.142) - 2026-07-10
49
+
50
+ ### Added
51
+ - The `socket manifest` commands (`auto`, `gradle`, `kotlin`, `maven`, `scala`) now accept `--exclude-paths`, keeping excluded subprojects and their dependencies out of generated manifests.
52
+
53
+ ### Fixed
54
+ - `--exclude-paths` is now fully honored across JVM, .NET, and Rust reachability analysis: excluded directories no longer contribute dependencies, code, or framework resources to scan results. Includes an update of the Coana CLI to v `15.8.7`.
55
+ - Invalid `--exclude-paths` glob patterns are rejected with a clear error instead of failing mid-scan.
56
+
57
+ ## [1.1.141](https://github.com/SocketDev/socket-cli/releases/tag/v1.1.141) - 2026-07-10
58
+
59
+ ### Changed
60
+ - Updated the Coana CLI to v `15.8.6`.
61
+
62
+ ## [1.1.140](https://github.com/SocketDev/socket-cli/releases/tag/v1.1.140) - 2026-07-08
63
+
64
+ ### Changed
65
+ - Updated the Coana CLI to v `15.8.5`.
66
+
67
+ ## [1.1.139](https://github.com/SocketDev/socket-cli/releases/tag/v1.1.139) - 2026-07-07
68
+
69
+ ### Changed
70
+ - Updated the Coana CLI to v `15.8.4`.
71
+
72
+ ## [1.1.138](https://github.com/SocketDev/socket-cli/releases/tag/v1.1.138) - 2026-07-07
73
+
74
+ ### Changed
75
+ - Updated the Coana CLI to v `15.8.2`.
76
+
77
+ ## [1.1.137](https://github.com/SocketDev/socket-cli/releases/tag/v1.1.137) - 2026-07-03
78
+
79
+ ### Changed
80
+ - Updated the Coana CLI to v `15.8.1`.
81
+
82
+ ## [1.1.136](https://github.com/SocketDev/socket-cli/releases/tag/v1.1.136) - 2026-07-02
83
+
84
+ ### Changed
85
+ - `socket manifest gradle --facts` now reports Gradle configurations it can't resolve instead of silently skipping them, failing the run unless you pass `--ignore-unresolved` so an incomplete scan can't slip by. Benign variant-selection ambiguity stays a one-line notice.
86
+ - Config filters (`--include-configs` / `--exclude-configs`) for `socket manifest gradle`, `kotlin`, `scala`, and `maven` are now case-sensitive, as documented, and support `[...]` character classes — e.g. `*[Tt]est*` matches both `testCompileClasspath` and `androidTestCompileClasspath`.
87
+
88
+ ### Fixed
89
+ - `socket manifest auto` and `socket scan create --auto-manifest` now detect a Gradle project by its build files (`build.gradle`/`.kts` or `settings.gradle`/`.kts`) instead of requiring a `gradlew` wrapper, so wrapper-less projects — including settings-only multi-module roots — are no longer skipped.
90
+
91
+ ## [1.1.135](https://github.com/SocketDev/socket-cli/releases/tag/v1.1.135) - 2026-07-01
92
+
93
+ ### Changed
94
+ - Updated the Coana CLI to v `15.6.7`.
95
+
96
+ ## [1.1.134](https://github.com/SocketDev/socket-cli/releases/tag/v1.1.134) - 2026-07-01
97
+
98
+ ### Fixed
99
+ - `--reach-use-only-pregenerated-sboms` now recognizes Socket facts files (`.socket.facts.json`) as pre-generated SBOMs, alongside CycloneDX and SPDX — matching what the reachability analyzer accepts. Previously a project whose only pre-generated SBOM was a `.socket.facts.json` was ignored by this flag.
100
+
101
+ ## [1.1.133](https://github.com/SocketDev/socket-cli/releases/tag/v1.1.133) - 2026-07-01
102
+
103
+ ### Changed
104
+ - Quieter `socket manifest gradle`, `sbt`, and `maven`: the build tool's output is now hidden behind a progress spinner and shown only if the build fails. Pass `--verbose` to stream it live.
105
+ - `--auto-manifest` now fails fast: if a Gradle, sbt, or Maven build fails, the run stops instead of continuing with an incomplete SBOM.
106
+
107
+ ## [1.1.132](https://github.com/SocketDev/socket-cli/releases/tag/v1.1.132) - 2026-06-30
108
+
109
+ ### Changed
110
+ - More reliable reachability for Gradle, sbt, and Maven projects with dynamic versions (git versions, CI build numbers, timestamps): the build is resolved once and its artifact paths reused, avoiding spurious "failed to install" errors.
111
+ - `socket manifest` and `--auto-manifest` now prefer your project's build-tool wrapper (`./gradlew`, `./mvnw`) when present, falling back to `gradle`/`mvn` on PATH.
112
+ - Updated the Coana CLI to v `15.6.6`.
113
+
114
+ ## [1.1.131](https://github.com/SocketDev/socket-cli/releases/tag/v1.1.131) - 2026-06-29
115
+
116
+ ### Changed
117
+ - Updated the Coana CLI to v `15.6.2`.
118
+
119
+ ## [1.1.130](https://github.com/SocketDev/socket-cli/releases/tag/v1.1.130) - 2026-06-29
120
+
121
+ ### Fixed
122
+ - Reachability analysis no longer fails to start in pnpm workspaces that define a `.pnpmfile.cjs`. Socket now launches its bundled analysis tools without running the project's pnpm hooks, so a broken or environment-specific hook (for example, one that loads a file managed by Git LFS) can no longer stop a scan before it begins.
123
+
124
+ ## [1.1.129](https://github.com/SocketDev/socket-cli/releases/tag/v1.1.129) - 2026-06-26
125
+
126
+ ### Changed
127
+ - Updated the Coana CLI to v `15.6.1`.
128
+
129
+ ## [1.1.128](https://github.com/SocketDev/socket-cli/releases/tag/v1.1.128) - 2026-06-25
130
+
131
+ ### Changed
132
+ - Updated the Coana CLI to v `15.5.10`.
133
+
134
+ ### Fixed
135
+ - Scans now skip Python virtual environments when collecting manifest files. Folders named `.venv`, and any folder containing a `pyvenv.cfg` marker (covering `venv`, `env`, and custom-named environments), are excluded — so `socket scan`, reachability, and `socket fix` stay focused on your project's own manifests instead of the thousands installed inside a virtualenv.
136
+
137
+ ## [1.1.127](https://github.com/SocketDev/socket-cli/releases/tag/v1.1.127) - 2026-06-24
138
+
139
+ ### Changed
140
+ - Updated the Coana CLI to v `15.5.9`.
141
+
142
+ ## [1.1.126](https://github.com/SocketDev/socket-cli/releases/tag/v1.1.126) - 2026-06-22
143
+
144
+ ### Changed
145
+ - Reachability analysis types are now referred to by descriptive names in command help, output, and docs: Full application reachability (formerly Tier 1), Precomputed reachability (formerly Tier 2), and Dependency reachability (formerly Tier 3).
146
+ - Updated the Coana CLI to v `15.5.7`.
147
+
148
+ ## [1.1.125](https://github.com/SocketDev/socket-cli/releases/tag/v1.1.125) - 2026-06-22
149
+
150
+ ### Added
151
+ - New `socket manifest maven` command generates a Socket facts file (`.socket.facts.json`) directly from a Maven `pom.xml` project. Like the Gradle and sbt generators, it auto-detects your project, plugs into `socket manifest auto` and the `socket manifest setup` configurator, and accepts `--maven-opts` to pass options through to Maven (e.g. `--maven-opts="-P release -s settings.xml"`), plus `--bin` to point at a wrapper such as `./mvnw`.
152
+
153
+ ### Changed
154
+ - Updated the Coana CLI to v `15.5.5`.
155
+
156
+ ## [1.1.124](https://github.com/SocketDev/socket-cli/releases/tag/v1.1.124) - 2026-06-19
157
+
158
+ - `socket scan create --reach` accepts a new `--reach-retain-facts-file` flag. By default the CLI deletes the `.socket.facts.json` reachability report from the scan directory after a successful scan; pass this flag to keep it (e.g. for inspection or debugging). **Important:** you must delete the retained `.socket.facts.json` before running a fresh full application reachability scan — a stale file left in place is picked up as a pre-generated input and silently overrides fresh analysis, so the new scan results will not be reliable.
159
+
160
+ ### Changed
161
+ - Updated the Coana CLI to v `15.5.4`.
162
+
163
+ ## [1.1.123](https://github.com/SocketDev/socket-cli/releases/tag/v1.1.123) - 2026-06-18
164
+
165
+ ### Added
166
+ - `socket scan create --reach` and `socket scan reach` now accept unit suffixes on `--reach-analysis-timeout` (`s`, `m`, `h` — e.g. `90s`, `10m`, `1h`) and `--reach-analysis-memory-limit` (`MB`, `GB` — e.g. `512MB`, `8GB`). Plain numbers keep working as before.
167
+
168
+ ### Changed
169
+ - Updated the Coana CLI to v `15.5.0`.
170
+
171
+ ## [1.1.122](https://github.com/SocketDev/socket-cli/releases/tag/v1.1.122) - 2026-06-17
172
+
173
+ ### Changed
174
+ - Updated the Coana CLI to v `15.4.6`.
175
+
176
+ ## [1.1.121](https://github.com/SocketDev/socket-cli/releases/tag/v1.1.121) - 2026-06-17
177
+
178
+ ### Fixed
179
+ - `socket config set` now persists correctly when a Socket API token is supplied via an environment variable. Previously, setting `SOCKET_CLI_API_TOKEN` / `SOCKET_SECURITY_API_TOKEN` put the entire config into read-only mode, so `socket config set <key> <value>` silently failed to save (and a later `socket config get` showed nothing) while still printing `OK`. A token from the environment now overrides authentication only: unrelated keys such as `defaultOrg` are written to disk as expected, and the env-supplied token itself is still never persisted.
180
+ - `socket config set` no longer reports a misleading `OK` when the value genuinely cannot be saved. When the config is fully overridden (and therefore ephemeral) via `--config`, `SOCKET_CLI_CONFIG`, or `SOCKET_CLI_NO_API_TOKEN`, the command now fails with a clear error explaining that the value was not saved, instead of pretending it succeeded.
181
+
182
+ ## [1.1.120](https://github.com/SocketDev/socket-cli/releases/tag/v1.1.120) - 2026-06-12
183
+
184
+ ### Changed
185
+ - `socket scan create --reach` now applies your project's build-tool settings from `socket.json` (configured via `socket manifest setup`) — custom build-tool binary, include/exclude configs, and Gradle/sbt options — when resolving dependencies for Gradle and sbt reachability analysis, instead of always invoking the build tool with defaults.
186
+ - `socket scan create --auto-manifest --reach` now fails with an error when a build tool fails during manifest generation, rather than tolerating it. Plain `--reach` (without `--auto-manifest`) keeps generating manifests on a best-effort basis.
187
+ - Updated the Coana CLI to v `15.4.5`.
188
+
189
+ ## [1.1.119](https://github.com/SocketDev/socket-cli/releases/tag/v1.1.119) - 2026-06-11
190
+
191
+ ### Changed
192
+ - Updated the Coana CLI to v `15.3.26`.
193
+
194
+ ## [1.1.118](https://github.com/SocketDev/socket-cli/releases/tag/v1.1.118) - 2026-06-08
195
+
196
+ ### Changed
197
+ - Updated the Coana CLI to v `15.3.24`.
198
+
199
+ ## [1.1.117](https://github.com/SocketDev/socket-cli/releases/tag/v1.1.117) - 2026-06-08
200
+
201
+ ### Changed
202
+ - The published package no longer bundles the unused Terminus bitmap font (pulled in transitively by the vendored `blessed` dependency), so its declared license is now `MIT` instead of `MIT AND OFL-1.1`.
203
+
204
+ ## [1.1.116](https://github.com/SocketDev/socket-cli/releases/tag/v1.1.116) - 2026-06-06
205
+
206
+ ### Changed
207
+ - Updated the Coana CLI to v `15.3.22`.
208
+
209
+ ## [1.1.115](https://github.com/SocketDev/socket-cli/releases/tag/v1.1.115) - 2026-06-04
210
+
211
+ ### Fixed
212
+ - `socket manifest gradle`, `kotlin`, and `scala` (including sbt-based projects) now stream the underlying build-tool and Coana output and surface the real failure reason. Previously a generation failure could collapse to an unhelpful `Coana command failed (exit code 1): command failed` with no detail, hiding actionable hints such as unresolved dependencies (re-run with `--ignore-unresolved` / `--exclude-configs`, or `--pom` for the legacy `pom.xml` output).
213
+
214
+ ## [1.1.114](https://github.com/SocketDev/socket-cli/releases/tag/v1.1.114) - 2026-06-04
215
+
216
+ ### Changed
217
+ - `socket manifest gradle`, `kotlin`, and `scala` now generate a Socket facts file (`.socket.facts.json`) by default; pass `--pom` to generate `pom.xml` manifests instead.
218
+ - Replaced `--configs` with `--include-configs` and `--exclude-configs` on `socket manifest gradle/kotlin/scala` for finer control over which build configurations are resolved.
219
+ - Updated the Coana CLI to v `15.3.21`.
220
+
221
+ ## [1.1.113](https://github.com/SocketDev/socket-cli/releases/tag/v1.1.113) - 2026-06-03
222
+
223
+ ### Added
8
224
  - **`socket manifest bazel [beta]`** — Generate Bazel JVM SBOM manifests by running `bazel query` against discovered Maven repos in a Bazel workspace. Closes the inline-Maven-declaration gap that lockfile-only parsing misses for repos like envoy, ray, tensorflow, tink-java, and or-tools. Auto-detects Bzlmod and legacy `WORKSPACE`.
9
225
  - **`socket scan create --auto-manifest`** now covers Bazel workspaces in addition to Gradle/Scala/Kotlin/Conda. Repos with `MODULE.bazel`, `WORKSPACE`, or `WORKSPACE.bazel` are detected automatically and their Maven dependencies extracted as part of the standard scan-create flow.
226
+ - **Bazel PyPI extraction** — `socket manifest bazel --ecosystem pypi` now generates `requirements.txt` for Python Bazel workspaces. Discovers custom `rules_python` pip hub names with Bazel command output first, queries `py_library` / `py_binary` / `py_test` dependencies, resolves canonical pinned versions from `requirements_lock.txt`, and emits PEP 503-normalized `name==version` lines. Supports both Bzlmod (`pip.parse`) and legacy `WORKSPACE` (`pip_parse` / `pip_install`) configurations. PyPI remains explicit opt-in for `socket scan create --auto-manifest` until real-world no-lockfile recovery is validated.
227
+
228
+ ### Changed
229
+ - **Bazel diagnostics** — `socket manifest bazel --verbose` now emits bounded subprocess traces with argv, cwd, duration, exit status, output sizes, and failure stderr tails to make customer log-only triage safer and faster.
230
+ - Updated the Coana CLI to v `15.3.20`.
231
+
232
+ ## [1.1.112](https://github.com/SocketDev/socket-cli/releases/tag/v1.1.112) - 2026-05-29
233
+
234
+ ### Fixed
235
+ - `socket fix` and `socket scan create` no longer abort with `EACCES: permission denied, scandir` when the project contains a directory the running user cannot read (for example a postgres `pgdata` data directory owned by another uid, or a Docker volume mount). Manifest discovery walks a project for `.gitignore` files before applying any path exclusions; that walk now honors `--exclude-paths` and `socket.yml` `projectIgnorePaths`, and skips unreadable directories rather than crashing. This makes `--exclude-paths` effective for unreadable directories — previously the crash happened before the exclusion was ever applied.
236
+
237
+ ## [1.1.111](https://github.com/SocketDev/socket-cli/releases/tag/v1.1.111) - 2026-05-29
238
+
239
+ ### Changed
240
+ - Updated the Coana CLI to v `15.3.15`.
241
+
242
+ ## [1.1.110](https://github.com/SocketDev/socket-cli/releases/tag/v1.1.110) - 2026-05-29
243
+
244
+ ### Fixed
245
+ - Resolved intermittent ~5-second timeouts affecting manifest uploads for reachability analysis and `socket fix`, along with other long-running API requests. Socket CLI now uses an explicit HTTP agent for all API traffic, so slow uploads and large streaming responses are no longer dropped prematurely.
246
+
247
+ ## [1.1.109](https://github.com/SocketDev/socket-cli/releases/tag/v1.1.109) - 2026-05-28
248
+
249
+ ### Added
250
+ - **`socket fix --exclude-paths`** — Skip matching paths from the scan entirely: manifests under these paths are not uploaded, and fixes are not applied to workspaces under them. Use this to skip directories the current user cannot read (e.g. a postgres `pgdata` directory inside the repo) so they do not abort manifest collection. The pre-existing `--exclude` flag keeps its previous fix-application-only semantic but is now hidden in `--help` in favor of `--exclude-paths`.
251
+
252
+ ## [1.1.108](https://github.com/SocketDev/socket-cli/releases/tag/v1.1.108) - 2026-05-28
253
+
254
+ ### Changed
255
+ - Updated the Coana CLI to v `15.3.12`.
256
+
257
+ ## [1.1.107](https://github.com/SocketDev/socket-cli/releases/tag/v1.1.107) - 2026-05-28
258
+
259
+ ### Changed
260
+ - **`socket manifest gradle --facts [beta]`** (and its `kotlin` alias) gained `--configs` and `--ignore-unresolved`, matching `socket manifest scala --facts`. `--configs` takes comma-separated glob patterns (e.g. `*CompileClasspath,*RuntimeClasspath`) to restrict resolution to matching Gradle configurations; unresolved dependencies are now a fatal error by default — pass `--ignore-unresolved` for the previous lenient behavior.
261
+ - **`socket manifest scala --facts --configs`** now accepts glob patterns too (e.g. `*Test*`) for consistency with the gradle command. Bare names (no `*`/`?`) keep working as exact-name filters, so existing usages are unchanged.
262
+
263
+ ### Fixed
264
+ - **`socket manifest gradle --facts`** now works on Gradle builds with the configuration cache enabled (default on Gradle 9), which previously failed with `Task.project at execution time` errors.
265
+
266
+ ## [1.1.106](https://github.com/SocketDev/socket-cli/releases/tag/v1.1.106) - 2026-05-27
267
+
268
+ ### Added
269
+ - **`socket manifest scala --facts [beta]`** — Emit a `.socket.facts.json` dependency graph from an sbt build for `socket scan create` to consume as a pregenerated SBOM. Toggle also exposed via the `socket manifest setup` wizard for use with `--auto-manifest`.
270
+
271
+ ## [1.1.105](https://github.com/SocketDev/socket-cli/releases/tag/v1.1.105) - 2026-05-27
272
+
273
+ ### Changed
274
+ - Updated the Coana CLI to v `15.3.11`.
275
+
276
+ ## [1.1.104](https://github.com/SocketDev/socket-cli/releases/tag/v1.1.104) - 2026-05-26
277
+
278
+ ### Fixed
279
+ - Coana CLI invocation: strip `npm_package_*` env vars before spawning the npm-install fallback. Prevents `spawn E2BIG` failures in large monorepos where the parent process has hundreds of `npm_package_*` env vars populated from the root `package.json`. Preserves `npm_config_*` (registry / proxy / cache from `.npmrc`).
280
+
281
+ ## [1.1.103](https://github.com/SocketDev/socket-cli/releases/tag/v1.1.103) - 2026-05-26
282
+
283
+ ### Changed
284
+ - Updated the Coana CLI to v `15.3.9`.
10
285
 
11
- ## [1.1.98](https://github.com/SocketDev/socket-cli/releases/tag/v1.1.98) - 2026-05-22
286
+ ## [1.1.102](https://github.com/SocketDev/socket-cli/releases/tag/v1.1.98) - 2026-05-22
12
287
 
13
288
  ### Added
14
- - **`socket manifest gradle --facts [beta]`** (and its `socket manifest kotlin --facts` alias) — Emit a `.socket.facts.json` dependency graph from a Gradle build, consumable by `socket scan create --reach` as pregenerated SBOM input for Tier 1 reachability. Toggle also exposed via the `socket manifest setup` wizard for use with `--auto-manifest`.
289
+ - **`socket manifest gradle --facts [beta]`** (and its `socket manifest kotlin --facts` alias) — Emit a `.socket.facts.json` dependency graph from a Gradle build for `socket scan create` to consume as a pregenerated SBOM. Toggle also exposed via the `socket manifest setup` wizard for use with `--auto-manifest`.
15
290
 
16
291
  ### Changed
17
292
  - Updated the Coana CLI to v `15.3.8`.
package/DISCLOSURE ADDED
@@ -0,0 +1,45 @@
1
+ # Dual-use disclosure
2
+
3
+ Packages: socket, @socketsecurity/cli, @socketsecurity/cli-with-sentry
4
+ Content policy class: dual-use (https://docs.npmjs.com/policies/dual-use)
5
+
6
+ All three packages are built from one source tree
7
+ (https://github.com/SocketDev/socket-cli, branch v1.x). "socket" is the
8
+ primary package. "@socketsecurity/cli" is the same tool published under its
9
+ older name. "@socketsecurity/cli-with-sentry" is the same tool with the
10
+ Sentry error-reporting library added.
11
+
12
+ ## What the packages do that can look like malware
13
+
14
+ The packages install command-line executables: socket, socket-npm,
15
+ socket-npx, socket-pnpm, and socket-yarn. The two variant packages ship the
16
+ same commands and add variant-named aliases of them. These commands wrap
17
+ the npm, npx, pnpm, and yarn package managers: when a user runs an install
18
+ through them, the tool reads the dependency tree first, sends package names
19
+ and versions to the socket.dev security API for analysis, and can warn
20
+ about or refuse to continue an install when a dependency looks risky. The
21
+ tool can also read project files such as manifests, lockfiles, and package
22
+ contents to build a security scan, and it uploads those scan inputs to
23
+ socket.dev when the user requests a scan. Wrapping package managers,
24
+ stopping installs, reading project files, and uploading scan data are
25
+ behaviors that automated malware scanning can mistake for malicious
26
+ software.
27
+
28
+ ## What the packages send over the network
29
+
30
+ The tool talks to the socket.dev API to run the security analysis the user
31
+ asked for. It sends what that analysis needs: package names and versions,
32
+ dependency manifests and lockfiles, and the scan files the user chose to
33
+ upload. The user's API token is sent to authenticate those requests. In
34
+ addition, the @socketsecurity/cli-with-sentry variant bundles the
35
+ @sentry/node library and reports errors and crashes to Sentry so the
36
+ maintainers can debug failures. The other two packages do not include
37
+ Sentry.
38
+
39
+ ## Intended legitimate use
40
+
41
+ The packages exist for defensive supply-chain security: developers and CI
42
+ systems use them to find known-malicious, hijacked, typosquatted, or
43
+ policy-violating dependencies before those dependencies run. The tool runs
44
+ only when a user or a CI job invokes it. Its source code is public at
45
+ https://github.com/SocketDev/socket-cli and issues are tracked there.
package/README.md CHANGED
@@ -60,6 +60,14 @@ All aliases support the flags and arguments of the commands they alias.
60
60
 
61
61
  - `socket ci` - Alias for `socket scan create --report` (creates report and exits with error if unhealthy)
62
62
 
63
+ ## Reachability analysis
64
+
65
+ Socket reachability analysis comes in three forms:
66
+
67
+ - **Full application reachability** (formerly Tier 1): Analyzes your application together with its dependencies to determine whether vulnerable code is actually invoked from your code through the full dependency graph — the highest-precision reachability analysis. Run it with `socket scan create --reach`.
68
+ - **Precomputed reachability** (formerly Tier 2): Determines whether vulnerable code in transitive dependencies is reachable through your direct dependencies, using precomputed static analysis of dependency chains (no access to your application code required). In the CLI this is the fallback used when full application reachability cannot complete (see the `--reach-continue-on-*` flags).
69
+ - **Dependency reachability** (formerly Tier 3): Package-level filtering that detects which dependencies are actually used, so CVEs in unused/dead dependencies can be filtered out.
70
+
63
71
  ## Flags
64
72
 
65
73
  ### Output flags
@@ -110,6 +118,7 @@ npm exec socket
110
118
  - `SOCKET_CLI_API_BASE_URL` - API base URL (default: `https://api.socket.dev/v0/`)
111
119
  - `SOCKET_CLI_API_PROXY` - Proxy for API requests (aliases: `HTTPS_PROXY`, `https_proxy`, `HTTP_PROXY`, `http_proxy`)
112
120
  - `SOCKET_CLI_API_TIMEOUT` - API request timeout in milliseconds
121
+ - `SOCKET_CLI_COANA_LAUNCHER` - How the reachability engine (`@coana-tech/cli`) is launched: `auto` (default; try `npx`, fall back to `npm install` + `node` if the launcher fails), `npx` (never fall back), or `npm-install` (skip `npx` entirely)
113
122
  - `SOCKET_CLI_DEBUG` - Enable debug logging
114
123
  - `DEBUG` - Enable [`debug`](https://socket.dev/npm/package/debug) package logging
115
124
 
package/bin/cli.js CHANGED
@@ -3,6 +3,7 @@
3
3
 
4
4
  void (async () => {
5
5
  const Module = require('node:module')
6
+ const os = require('node:os')
6
7
  const path = require('node:path')
7
8
  const rootPath = path.join(__dirname, '..')
8
9
  Module.enableCompileCache?.(path.join(rootPath, '.cache'))
@@ -38,10 +39,41 @@ void (async () => {
38
39
  },
39
40
  )
40
41
 
42
+ // The child shares our process group and handles the signal itself; wait briefly for it
43
+ // to exit (so its final output isn't printed after the prompt returns) and mirror its
44
+ // exit below. SIGKILL and leave if it outlasts the grace, or on a second signal.
45
+ const SHUTDOWN_GRACE_MS = 3_000
46
+ const hardAbort = signalName => {
47
+ const child = spawnPromise.process
48
+ if (child.exitCode === null && child.signalCode === null) {
49
+ child.kill('SIGKILL')
50
+ }
51
+ // eslint-disable-next-line n/no-process-exit
52
+ process.exit(signalName === 'SIGTERM' ? 143 : 130)
53
+ }
54
+ let sawSignal = false
55
+ const onSignal = signalName => {
56
+ if (sawSignal) {
57
+ hardAbort(signalName)
58
+ return
59
+ }
60
+ sawSignal = true
61
+ setTimeout(() => hardAbort(signalName), SHUTDOWN_GRACE_MS).unref?.()
62
+ }
63
+ const onSigint = () => onSignal('SIGINT')
64
+ const onSigterm = () => onSignal('SIGTERM')
65
+ process.on('SIGINT', onSigint)
66
+ process.on('SIGTERM', onSigterm)
67
+
41
68
  // See https://nodejs.org/api/child_process.html#event-exit.
42
69
  spawnPromise.process.on('exit', (code, signalName) => {
43
70
  if (signalName) {
44
- process.kill(process.pid, signalName)
71
+ // Mirror a signal death as the conventional 128 + signum exit code. Exit explicitly
72
+ // rather than re-raising the signal: with our handlers installed the re-raise would
73
+ // race `await spawnPromise` resolving and could leave the default exitCode of 1.
74
+ const signum = os.constants.signals[signalName] ?? 0
75
+ // eslint-disable-next-line n/no-process-exit
76
+ process.exit(128 + signum)
45
77
  } else if (typeof code === 'number') {
46
78
  // eslint-disable-next-line n/no-process-exit
47
79
  process.exit(code)