socket 1.1.165 → 1.1.166

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,15 @@ 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.1.166](https://github.com/SocketDev/socket-cli/releases/tag/v1.1.166) - 2026-09-03
8
+
9
+ ### Changed
10
+ - Updated the Coana CLI to v `15.10.33`.
11
+
12
+ ### Fixed
13
+ - `socket scan create --dynamic-sbom-inference` works without `--reach` again, so a single command produces a per-build-root Socket facts SBOM for Gradle, sbt, and Maven projects. It is a standalone flag now, no longer a reachability modifier.
14
+ - `--dynamic-sbom-inference` no longer generates Conda or Bazel manifests as a side effect. It touches Gradle, sbt, and Maven only; pass `--auto-manifest` alongside it if you want the other ecosystems too.
15
+
7
16
  ## [1.1.165](https://github.com/SocketDev/socket-cli/releases/tag/v1.1.165) - 2026-09-02
8
17
 
9
18
  ### 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.1.165/assets/fleet/badge-follow-x.svg)](https://twitter.com/SocketSecurity)
5
- [![Follow @socket.dev on Bluesky](https://raw.githubusercontent.com/SocketDev/socket-cli/v1.1.165/assets/fleet/badge-follow-bluesky.svg)](https://bsky.app/profile/socket.dev)
4
+ [![Follow @SocketSecurity](https://raw.githubusercontent.com/SocketDev/socket-cli/v1.1.166/assets/fleet/badge-follow-x.svg)](https://twitter.com/SocketSecurity)
5
+ [![Follow @socket.dev on Bluesky](https://raw.githubusercontent.com/SocketDev/socket-cli/v1.1.166/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
 
@@ -138,8 +138,8 @@ MIT
138
138
  <br/>
139
139
  <div align="center">
140
140
  <picture>
141
- <source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/SocketDev/socket-cli/v1.1.165/assets/fleet/socket-combomark-dark.svg">
142
- <source media="(prefers-color-scheme: light)" srcset="https://raw.githubusercontent.com/SocketDev/socket-cli/v1.1.165/assets/fleet/socket-combomark-light.svg">
143
- <img width="324" height="104" alt="Socket" src="https://raw.githubusercontent.com/SocketDev/socket-cli/v1.1.165/assets/fleet/socket-combomark-light.svg">
141
+ <source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/SocketDev/socket-cli/v1.1.166/assets/fleet/socket-combomark-dark.svg">
142
+ <source media="(prefers-color-scheme: light)" srcset="https://raw.githubusercontent.com/SocketDev/socket-cli/v1.1.166/assets/fleet/socket-combomark-light.svg">
143
+ <img width="324" height="104" alt="Socket" src="https://raw.githubusercontent.com/SocketDev/socket-cli/v1.1.166/assets/fleet/socket-combomark-light.svg">
144
144
  </picture>
145
145
  </div>
package/dist/cli.js CHANGED
@@ -7145,21 +7145,14 @@ async function handleCreateNewScan({
7145
7145
  // paths. Always allocated (even when unused) to keep this uniform rather
7146
7146
  // than conditional on autoManifest/reach.
7147
7147
  await utils.withTmpDir('socket-auto-manifest-', async manifestTmpDir => {
7148
- if (autoManifest) {
7148
+ if (autoManifest || reach.dynamicSbomInference) {
7149
7149
  logger.logger.info('Auto-generating manifest files ...');
7150
- debug.debugFn('notice', 'Auto-manifest mode enabled');
7151
- const sockJson = utils.readOrDefaultSocketJson(cwd);
7152
- const detected = await detectManifestActions(sockJson, cwd);
7153
- debug.debugDir('inspect', {
7154
- detected
7155
- });
7150
+ debug.debugFn('notice', 'Manifest auto-generation enabled');
7156
7151
  if (reach.dynamicSbomInference) {
7157
7152
  // Recursively discover and generate Socket facts for every
7158
7153
  // independent gradle/sbt/maven build root instead of only the one at
7159
- // cwd; generateAutoManifest below is left to handle conda/bazel only.
7160
- detected.gradle = false;
7161
- detected.sbt = false;
7162
- detected.maven = false;
7154
+ // cwd. This runs on its own, so nothing outside those three
7155
+ // ecosystems is generated unless --auto-manifest also asked for it.
7163
7156
  const dynamicResult = await runDynamicSbomInference({
7164
7157
  cwd,
7165
7158
  excludePaths: reach.excludePaths,
@@ -7174,20 +7167,34 @@ async function handleCreateNewScan({
7174
7167
  scanTargets = Array.from(new Set([...scanTargets, ...dynamicResult.factsPaths]));
7175
7168
  resolvedPathsSidecar = dynamicResult.resolvedPathsSidecar;
7176
7169
  }
7177
- const autoManifestResult = await generateAutoManifest({
7178
- computeArtifactsSidecar: reach.runReachabilityAnalysis,
7179
- cwd,
7180
- detected,
7181
- excludePaths: reach.excludePaths,
7182
- outputKind,
7183
- tmpDir: manifestTmpDir,
7184
- verbose: false
7185
- });
7186
- if (autoManifestResult.resolvedPathsSidecar) {
7187
- resolvedPathsSidecar = resolvedPathsSidecar ? mergeResolvedPathsSidecars(resolvedPathsSidecar, autoManifestResult.resolvedPathsSidecar) : autoManifestResult.resolvedPathsSidecar;
7188
- }
7189
- if (autoManifestResult.generatedFiles.length) {
7190
- scanTargets = Array.from(new Set([...scanTargets, ...autoManifestResult.generatedFiles]));
7170
+ if (autoManifest) {
7171
+ const sockJson = utils.readOrDefaultSocketJson(cwd);
7172
+ const detected = await detectManifestActions(sockJson, cwd);
7173
+ debug.debugDir('inspect', {
7174
+ detected
7175
+ });
7176
+ if (reach.dynamicSbomInference) {
7177
+ // Already generated recursively above; resolving cwd's own build
7178
+ // root a second time would race on the same .socket.facts.json.
7179
+ detected.gradle = false;
7180
+ detected.sbt = false;
7181
+ detected.maven = false;
7182
+ }
7183
+ const autoManifestResult = await generateAutoManifest({
7184
+ computeArtifactsSidecar: reach.runReachabilityAnalysis,
7185
+ cwd,
7186
+ detected,
7187
+ excludePaths: reach.excludePaths,
7188
+ outputKind,
7189
+ tmpDir: manifestTmpDir,
7190
+ verbose: false
7191
+ });
7192
+ if (autoManifestResult.resolvedPathsSidecar) {
7193
+ resolvedPathsSidecar = resolvedPathsSidecar ? mergeResolvedPathsSidecars(resolvedPathsSidecar, autoManifestResult.resolvedPathsSidecar) : autoManifestResult.resolvedPathsSidecar;
7194
+ }
7195
+ if (autoManifestResult.generatedFiles.length) {
7196
+ scanTargets = Array.from(new Set([...scanTargets, ...autoManifestResult.generatedFiles]));
7197
+ }
7191
7198
  }
7192
7199
  logger.logger.info('Auto-generation finished. Proceeding with Scan creation.');
7193
7200
  }
@@ -19284,16 +19291,11 @@ const cmdRepository = {
19284
19291
  }
19285
19292
  };
19286
19293
 
19287
- // Shared prefix so each command can append how it obtains the per-build-root
19288
- // SBOMs, which differs: `scan create` piggybacks on --auto-manifest, while
19289
- // `scan reach` runs the build tools itself.
19290
- const DYNAMIC_SBOM_INFERENCE_DESCRIPTION = 'For Gradle, sbt, and Maven: splits reachability analysis per project/module using a Socket facts SBOM (generated directly by each package manager) per build root, instead of one synthetic root.';
19294
+ // Shared prefix so each command can append what the SBOMs are used for, which
19295
+ // differs: reachability is optional on `scan create` and always on for
19296
+ // `scan reach`.
19297
+ const DYNAMIC_SBOM_INFERENCE_DESCRIPTION = 'For Gradle, sbt, and Maven: generate a Socket facts SBOM (produced directly by each package manager) per independent build root, instead of one synthetic root.';
19291
19298
  const reachabilityFlags = {
19292
- dynamicSbomInference: {
19293
- type: 'boolean',
19294
- default: false,
19295
- description: `${DYNAMIC_SBOM_INFERENCE_DESCRIPTION} Reachability analysis only; implies --auto-manifest.`
19296
- },
19297
19299
  reachVersion: {
19298
19300
  type: 'string',
19299
19301
  description: `Override the version of @coana-tech/cli used for reachability analysis. Default: ${constants.default.ENV.INLINED_SOCKET_CLI_COANA_TECH_CLI_VERSION}.`
@@ -19466,7 +19468,7 @@ const generalFlags$1 = {
19466
19468
  ...flags.outputFlags,
19467
19469
  autoManifest: {
19468
19470
  type: 'boolean',
19469
- description: 'Run `socket manifest auto` before collecting manifest files. This is necessary for languages like Scala, Gradle, and Kotlin, See `socket manifest auto --help`.'
19471
+ description: 'Run `socket manifest auto` before collecting manifest files, which generates them for ecosystems that need their build tool to resolve dependencies, such as Scala, Gradle, and Kotlin. See `socket manifest auto --help`. For Gradle, sbt, and Maven, --dynamic-sbom-inference generates a Socket facts SBOM per build root instead.'
19470
19472
  },
19471
19473
  branch: {
19472
19474
  type: 'string',
@@ -19502,6 +19504,11 @@ const generalFlags$1 = {
19502
19504
  default: false,
19503
19505
  description: 'Set the default branch of the repository to the branch of this full-scan. Should only need to be done once, for example for the "main" or "master" branch.'
19504
19506
  },
19507
+ dynamicSbomInference: {
19508
+ type: 'boolean',
19509
+ default: false,
19510
+ description: `${DYNAMIC_SBOM_INFERENCE_DESCRIPTION} Combine with --reach to split the reachability analysis per project/module.`
19511
+ },
19505
19512
  interactive: {
19506
19513
  type: 'boolean',
19507
19514
  default: true,
@@ -19698,11 +19705,6 @@ async function run$d(argv, importMeta, {
19698
19705
  autoManifest = false;
19699
19706
  }
19700
19707
  }
19701
- // --dynamic-sbom-inference requires auto-manifest to generate the
19702
- // per-workspace facts it feeds to Coana.
19703
- if (dynamicSbomInference) {
19704
- autoManifest = true;
19705
- }
19706
19708
  if (!branchName) {
19707
19709
  if (sockJson.defaults?.scan?.create?.branch) {
19708
19710
  branchName = sockJson.defaults.scan.create.branch;
@@ -19789,7 +19791,7 @@ async function run$d(argv, importMeta, {
19789
19791
  // to regenerate it would be misleading; the manifest data is already there
19790
19792
  // and will be picked up by the scan.
19791
19793
  const hasFactsFile = fs$1.existsSync(path.join(cwd, constants.default.DOT_SOCKET_DOT_FACTS_JSON));
19792
- if (detected.count > 0 && !autoManifest && !hasFactsFile) {
19794
+ if (detected.count > 0 && !autoManifest && !dynamicSbomInference && !hasFactsFile) {
19793
19795
  logger.logger.info(`Detected ${detected.count} manifest targets we could try to generate. Please set the --auto-manifest flag if you want to include languages covered by \`socket manifest auto\` in the Scan.`);
19794
19796
  }
19795
19797
  if (updatedInput && orgSlug && targets.length) {
@@ -21932,15 +21934,15 @@ const CMD_NAME$4 = 'reach';
21932
21934
  const description$6 = 'Compute full application reachability';
21933
21935
  const hidden$4 = true;
21934
21936
 
21935
- // `scan create` gets its per-build-root facts from --auto-manifest, a flag
21936
- // this command doesn't have; here the build tools are run directly instead,
21937
- // so the flag's description differs.
21937
+ // Not in reachabilityFlags: on `scan create` it is a general flag the --reach
21938
+ // guard must not reject. Reachability is always on here, so the description
21939
+ // drops that command's --reach caveat.
21938
21940
  const reachabilityFlagsForReach = {
21939
21941
  ...reachabilityFlags,
21940
21942
  dynamicSbomInference: {
21941
21943
  type: 'boolean',
21942
21944
  default: false,
21943
- description: `${DYNAMIC_SBOM_INFERENCE_DESCRIPTION} Each discovered build root is built first to generate its SBOM.`
21945
+ description: `${DYNAMIC_SBOM_INFERENCE_DESCRIPTION} The reachability analysis is split per project/module accordingly.`
21944
21946
  }
21945
21947
  };
21946
21948
  const generalFlags = {
@@ -24096,5 +24098,5 @@ process.on('unhandledRejection', async (reason, promise) => {
24096
24098
  // eslint-disable-next-line n/no-process-exit
24097
24099
  process.exit(1);
24098
24100
  });
24099
- //# debugId=5f7c5659-2323-4182-a73a-b5a96997ea01
24101
+ //# debugId=33f14952-bd82-49b9-8fcf-7a7cc5bf3926
24100
24102
  //# sourceMappingURL=cli.js.map