@socketsecurity/cli-with-sentry 1.4.2 → 1.6.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 CHANGED
@@ -4,6 +4,20 @@ 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
+ ## [1.6.0](https://github.com/SocketDev/socket-cli/releases/tag/v1.6.0) - 2026-10-07
8
+
9
+ ### Added
10
+ - **`manifest`** — attribute direct JVM dependencies to subproject build files (#1581)
11
+
12
+ ## [1.5.0](https://github.com/SocketDev/socket-cli/releases/tag/v1.5.0) - 2026-10-06
13
+
14
+ ### Added
15
+ - `socket fix --allow-overrides` fixes a vulnerability that a parent package's version range blocks by writing an override or resolution that forces the fixed version under that parent, in npm, pnpm, Yarn Berry and Rush projects.
16
+ - Socket facts for multi-module Maven, Gradle and sbt builds now attribute each direct dependency to the subproject build files that pull it in, so the dashboard shows which module brought it in.
17
+
18
+ ### Changed
19
+ - Updated the Coana CLI to v `15.12.1`.
20
+
7
21
  ## [1.4.2](https://github.com/SocketDev/socket-cli/releases/tag/v1.4.2) - 2026-10-05
8
22
 
9
23
  ### Changed
package/README.md CHANGED
@@ -1,8 +1,8 @@
1
1
  # Socket CLI
2
2
 
3
3
  [![Socket Badge](https://socket.dev/api/badge/npm/package/socket)](https://socket.dev/npm/package/socket)
4
- [![Follow @SocketSecurity](https://raw.githubusercontent.com/SocketDev/socket-cli/v1.4.2/assets/fleet/badge-follow-x.svg)](https://twitter.com/SocketSecurity)
5
- [![Follow @socket.dev on Bluesky](https://raw.githubusercontent.com/SocketDev/socket-cli/v1.4.2/assets/fleet/badge-follow-bluesky.svg)](https://bsky.app/profile/socket.dev)
4
+ [![Follow @SocketSecurity](https://raw.githubusercontent.com/SocketDev/socket-cli/v1.6.0/assets/fleet/badge-follow-x.svg)](https://twitter.com/SocketSecurity)
5
+ [![Follow @socket.dev on Bluesky](https://raw.githubusercontent.com/SocketDev/socket-cli/v1.6.0/assets/fleet/badge-follow-bluesky.svg)](https://bsky.app/profile/socket.dev)
6
6
 
7
7
  CLI for [Socket.dev](https://socket.dev) — scan dependencies, audit packages, apply security patches, and gate installs from your terminal or CI. This is the 1.x line of the published `socket` package on npm.
8
8
 
@@ -171,8 +171,8 @@ MIT
171
171
  <br/>
172
172
  <div align="center">
173
173
  <picture>
174
- <source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/SocketDev/socket-cli/v1.4.2/assets/fleet/socket-combomark-dark.svg">
175
- <source media="(prefers-color-scheme: light)" srcset="https://raw.githubusercontent.com/SocketDev/socket-cli/v1.4.2/assets/fleet/socket-combomark-light.svg">
176
- <img width="324" height="104" alt="Socket" src="https://raw.githubusercontent.com/SocketDev/socket-cli/v1.4.2/assets/fleet/socket-combomark-light.svg">
174
+ <source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/SocketDev/socket-cli/v1.6.0/assets/fleet/socket-combomark-dark.svg">
175
+ <source media="(prefers-color-scheme: light)" srcset="https://raw.githubusercontent.com/SocketDev/socket-cli/v1.6.0/assets/fleet/socket-combomark-light.svg">
176
+ <img width="324" height="104" alt="Socket" src="https://raw.githubusercontent.com/SocketDev/socket-cli/v1.6.0/assets/fleet/socket-combomark-light.svg">
177
177
  </picture>
178
178
  </div>
package/dist/cli.js CHANGED
@@ -1817,6 +1817,8 @@ function reachMemoryLimitToMb(value) {
1817
1817
  // No sources/targets here: those are local absolute paths, returned in-memory
1818
1818
  // as ResolvedArtifactPaths, never serialized into the SBOM.
1819
1819
 
1820
+ // Relative to the facts file's directory.
1821
+
1820
1822
  // Resolved on-disk paths for a --with-files run, keyed by coordinate. `targets`
1821
1823
  // = classpath entries (jars / module output dirs); `sources` = module source
1822
1824
  // roots.
@@ -2697,7 +2699,7 @@ function assembleFacts(parsed, opts = {}) {
2697
2699
  for (const p of parsed.projects.values()) {
2698
2700
  projectsByGav.set(gav(p.group, p.name, p.version), p);
2699
2701
  }
2700
- const components = buildComponents(finalNodes, projectsByGav);
2702
+ const components = buildComponents(finalNodes, projectsByGav, buildManifestFilesByCoord(parsed, directByRoot, perRoot));
2701
2703
  const projects = opts.emitProjects === false ? [] : buildProjects(parsed, directByRoot, perRoot);
2702
2704
  const metadata = {
2703
2705
  format: 'socket-facts-sbom',
@@ -2806,7 +2808,30 @@ function mergeByCoordinate(perRoot) {
2806
2808
  directByRoot
2807
2809
  };
2808
2810
  }
2809
- function buildComponents(finalNodes, projectsByGav) {
2811
+ function buildManifestFilesByCoord(parsed, directByRoot, perRoot) {
2812
+ const buildFilesByCoord = new Map();
2813
+ for (const [rootId, ids] of directByRoot) {
2814
+ const projectKey = perRoot.get(rootId)?.projectKey ?? '';
2815
+ const buildFiles = parsed.projects.get(projectKey)?.buildFiles ?? [];
2816
+ for (const id of ids) {
2817
+ let set = buildFilesByCoord.get(id);
2818
+ if (!set) {
2819
+ set = new Set();
2820
+ buildFilesByCoord.set(id, set);
2821
+ }
2822
+ for (const f of buildFiles) {
2823
+ set.add(f);
2824
+ }
2825
+ }
2826
+ }
2827
+ return new Map([...buildFilesByCoord].map(({
2828
+ 0: id,
2829
+ 1: buildFiles
2830
+ }) => [id, [constants.default.DOT_SOCKET_DOT_FACTS_JSON, ...[...buildFiles].sort()].map(file => ({
2831
+ file
2832
+ }))]));
2833
+ }
2834
+ function buildComponents(finalNodes, projectsByGav, manifestFilesByCoord) {
2810
2835
  return [...finalNodes.keys()].sort().map(id => {
2811
2836
  const fn = finalNodes.get(id);
2812
2837
  const c = fn.coord;
@@ -2843,6 +2868,10 @@ function buildComponents(finalNodes, projectsByGav) {
2843
2868
  if (fn.children.size) {
2844
2869
  comp.dependencies = [...fn.children].sort();
2845
2870
  }
2871
+ const manifestFiles = manifestFilesByCoord.get(id);
2872
+ if (manifestFiles) {
2873
+ comp.manifestFiles = manifestFiles;
2874
+ }
2846
2875
  return comp;
2847
2876
  });
2848
2877
  }
@@ -3159,6 +3188,7 @@ function serializeExcludePathPatterns(paths) {
3159
3188
  // project projectKey group name version dir
3160
3189
  // projectSrc projectKey path (--with-files only)
3161
3190
  // projectTgt projectKey path (--with-files only)
3191
+ // projectBuild projectKey path (build-root-relative)
3162
3192
  // root rootId projectKey config prod(0|1)
3163
3193
  // node rootId coordId group name version ext classifier direct(0|1)
3164
3194
  // edge rootId parentCoordId childCoordId
@@ -3227,7 +3257,8 @@ function parseRecords(text) {
3227
3257
  version: '',
3228
3258
  dir: '',
3229
3259
  sources: [],
3230
- targets: []
3260
+ targets: [],
3261
+ buildFiles: []
3231
3262
  };
3232
3263
  result.projects.set(key, p);
3233
3264
  }
@@ -3263,6 +3294,11 @@ function parseRecords(text) {
3263
3294
  project(f[1] ?? '').targets.push(f[2]);
3264
3295
  }
3265
3296
  break;
3297
+ case 'projectBuild':
3298
+ if (f[2]) {
3299
+ project(f[1] ?? '').buildFiles.push(f[2]);
3300
+ }
3301
+ break;
3266
3302
  case 'root':
3267
3303
  {
3268
3304
  const r = root(f[1] ?? '');
@@ -9016,6 +9052,7 @@ async function coanaFix(fixConfig) {
9016
9052
  async function coanaFixWithFacts(fixConfig, factsSlot) {
9017
9053
  const {
9018
9054
  all,
9055
+ allowOverrides,
9019
9056
  applyFixes,
9020
9057
  autopilot,
9021
9058
  coanaVersion,
@@ -9204,7 +9241,7 @@ async function coanaFixWithFacts(fixConfig, factsSlot) {
9204
9241
  const tmpDir = os.tmpdir();
9205
9242
  const tmpFile = path.join(tmpDir, `socket-fix-${Date.now()}.json`);
9206
9243
  try {
9207
- const fixCResult = await utils.spawnCoanaDlx(['compute-fixes-and-upgrade-purls', cwd, '--manifests-tar-hash', tarHash, '--apply-fixes-to', ...ids, ...(fixConfig.rangeStyle ? ['--range-style', fixConfig.rangeStyle] : []), ...(minimumReleaseAge ? ['--minimum-release-age', minimumReleaseAge] : []), ...(include.length ? ['--include', ...include] : []), ...(coanaExcludePatterns.length ? ['--exclude', ...coanaExcludePatterns] : []), ...(ecosystems.length ? ['--purl-types', ...ecosystems] : []), ...(packageManagers.length ? ['--package-managers', ...packageManagers] : []), ...factsFlags, ...(!applyFixes ? [constants.FLAG_DRY_RUN] : []), '--output-file', tmpFile, ...(debug$1 ? ['--debug'] : []), ...(disableExternalToolChecks ? ['--disable-external-tool-checks'] : []), ...(disableMajorUpdates ? ['--disable-major-updates'] : []), ...(showAffectedDirectDependencies ? ['--show-affected-direct-dependencies'] : []), ...fixConfig.unknownFlags], fixConfig.orgSlug, {
9244
+ const fixCResult = await utils.spawnCoanaDlx(['compute-fixes-and-upgrade-purls', cwd, '--manifests-tar-hash', tarHash, '--apply-fixes-to', ...ids, ...(fixConfig.rangeStyle ? ['--range-style', fixConfig.rangeStyle] : []), ...(minimumReleaseAge ? ['--minimum-release-age', minimumReleaseAge] : []), ...(include.length ? ['--include', ...include] : []), ...(coanaExcludePatterns.length ? ['--exclude', ...coanaExcludePatterns] : []), ...(ecosystems.length ? ['--purl-types', ...ecosystems] : []), ...(packageManagers.length ? ['--package-managers', ...packageManagers] : []), ...factsFlags, ...(!applyFixes ? [constants.FLAG_DRY_RUN] : []), '--output-file', tmpFile, ...(debug$1 ? ['--debug'] : []), ...(disableExternalToolChecks ? ['--disable-external-tool-checks'] : []), ...(disableMajorUpdates ? ['--disable-major-updates'] : []), ...(allowOverrides ? ['--allow-overrides'] : []), ...(showAffectedDirectDependencies ? ['--show-affected-direct-dependencies'] : []), ...fixConfig.unknownFlags], fixConfig.orgSlug, {
9208
9245
  coanaVersion,
9209
9246
  cwd,
9210
9247
  spinner: silence ? undefined : spinner,
@@ -9335,7 +9372,7 @@ async function coanaFixWithFacts(fixConfig, factsSlot) {
9335
9372
 
9336
9373
  // Apply fix for single GHSA ID.
9337
9374
  // eslint-disable-next-line no-await-in-loop
9338
- const fixCResult = await utils.spawnCoanaDlx(['compute-fixes-and-upgrade-purls', cwd, '--manifests-tar-hash', tarHash, '--apply-fixes-to', ghsaId, ...(fixConfig.rangeStyle ? ['--range-style', fixConfig.rangeStyle] : []), ...(minimumReleaseAge ? ['--minimum-release-age', minimumReleaseAge] : []), ...(include.length ? ['--include', ...include] : []), ...(coanaExcludePatterns.length ? ['--exclude', ...coanaExcludePatterns] : []), ...(ecosystems.length ? ['--purl-types', ...ecosystems] : []), ...(packageManagers.length ? ['--package-managers', ...packageManagers] : []), ...factsFlags, ...(debug$1 ? ['--debug'] : []), ...(disableExternalToolChecks ? ['--disable-external-tool-checks'] : []), ...(disableMajorUpdates ? ['--disable-major-updates'] : []), ...(showAffectedDirectDependencies ? ['--show-affected-direct-dependencies'] : []), '--output-file', tmpFile, ...fixConfig.unknownFlags], fixConfig.orgSlug, {
9375
+ const fixCResult = await utils.spawnCoanaDlx(['compute-fixes-and-upgrade-purls', cwd, '--manifests-tar-hash', tarHash, '--apply-fixes-to', ghsaId, ...(fixConfig.rangeStyle ? ['--range-style', fixConfig.rangeStyle] : []), ...(minimumReleaseAge ? ['--minimum-release-age', minimumReleaseAge] : []), ...(include.length ? ['--include', ...include] : []), ...(coanaExcludePatterns.length ? ['--exclude', ...coanaExcludePatterns] : []), ...(ecosystems.length ? ['--purl-types', ...ecosystems] : []), ...(packageManagers.length ? ['--package-managers', ...packageManagers] : []), ...factsFlags, ...(debug$1 ? ['--debug'] : []), ...(disableExternalToolChecks ? ['--disable-external-tool-checks'] : []), ...(disableMajorUpdates ? ['--disable-major-updates'] : []), ...(allowOverrides ? ['--allow-overrides'] : []), ...(showAffectedDirectDependencies ? ['--show-affected-direct-dependencies'] : []), '--output-file', tmpFile, ...fixConfig.unknownFlags], fixConfig.orgSlug, {
9339
9376
  coanaVersion,
9340
9377
  cwd,
9341
9378
  spinner: silence ? undefined : spinner,
@@ -9665,6 +9702,7 @@ async function convertIdsToGhsas(ids, options) {
9665
9702
  }
9666
9703
  async function handleFix({
9667
9704
  all,
9705
+ allowOverrides,
9668
9706
  applyFixes,
9669
9707
  autopilot,
9670
9708
  coanaVersion,
@@ -9695,6 +9733,7 @@ async function handleFix({
9695
9733
  debug.debugFn('notice', `Starting fix command for ${orgSlug}`);
9696
9734
  debug.debugDir('inspect', {
9697
9735
  all,
9736
+ allowOverrides,
9698
9737
  applyFixes,
9699
9738
  autopilot,
9700
9739
  coanaVersion,
@@ -9722,6 +9761,7 @@ async function handleFix({
9722
9761
  });
9723
9762
  await outputFixResult(await coanaFix({
9724
9763
  all,
9764
+ allowOverrides,
9725
9765
  applyFixes,
9726
9766
  autopilot,
9727
9767
  coanaVersion,
@@ -9884,6 +9924,11 @@ const cmdFix = {
9884
9924
  run: run$N
9885
9925
  };
9886
9926
  const generalFlags$2 = {
9927
+ allowOverrides: {
9928
+ type: 'boolean',
9929
+ default: false,
9930
+ description: "When the only fix for a vulnerability is blocked by a parent package's declared version range, write an override or resolution that forces the fixed version under that parent. This can install a version outside the range the parent declares, so test the parent afterwards. Works for npm, pnpm, Yarn Berry and Rush projects."
9931
+ },
9887
9932
  autopilot: {
9888
9933
  type: 'boolean',
9889
9934
  default: false,
@@ -10119,6 +10164,7 @@ async function run$N(argv, importMeta, {
10119
10164
  });
10120
10165
  const {
10121
10166
  all,
10167
+ allowOverrides,
10122
10168
  applyFixes,
10123
10169
  autopilot,
10124
10170
  debug,
@@ -10249,6 +10295,7 @@ async function run$N(argv, importMeta, {
10249
10295
  } = constants.default;
10250
10296
  await handleFix({
10251
10297
  all,
10298
+ allowOverrides,
10252
10299
  applyFixes,
10253
10300
  autopilot,
10254
10301
  coanaVersion: fixVersion,
@@ -24420,5 +24467,5 @@ process.on('unhandledRejection', async (reason, promise) => {
24420
24467
  // eslint-disable-next-line n/no-process-exit
24421
24468
  process.exit(1);
24422
24469
  });
24423
- //# debugId=71bcae26-79e9-4006-9570-248817c517a
24470
+ //# debugId=b7761d71-38de-4772-91bc-d1db319250b4
24424
24471
  //# sourceMappingURL=cli.js.map