@socketsecurity/cli-with-sentry 1.6.2 → 1.7.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.
Files changed (32) hide show
  1. package/CHANGELOG.md +7 -0
  2. package/README.md +5 -5
  3. package/dist/cli.js +92 -65
  4. package/dist/cli.js.map +1 -1
  5. package/dist/constants.js +4 -4
  6. package/dist/constants.js.map +1 -1
  7. package/dist/manifest-scripts/maven-extension/coana-maven-extension.jar +0 -0
  8. package/dist/tsconfig.dts.tsbuildinfo +1 -1
  9. package/dist/types/commands/manifest/cmd-manifest-dynamic-sbom-inference.d.mts.map +1 -1
  10. package/dist/types/commands/manifest/convert-gradle-to-facts.d.mts +2 -1
  11. package/dist/types/commands/manifest/convert-gradle-to-facts.d.mts.map +1 -1
  12. package/dist/types/commands/manifest/convert-maven-to-facts.d.mts +2 -1
  13. package/dist/types/commands/manifest/convert-maven-to-facts.d.mts.map +1 -1
  14. package/dist/types/commands/manifest/convert-sbt-to-facts.d.mts +1 -1
  15. package/dist/types/commands/manifest/convert-sbt-to-facts.d.mts.map +1 -1
  16. package/dist/types/commands/manifest/run-manifest-facts.d.mts +3 -2
  17. package/dist/types/commands/manifest/run-manifest-facts.d.mts.map +1 -1
  18. package/dist/types/commands/manifest/scripts/assemble.d.mts +4 -1
  19. package/dist/types/commands/manifest/scripts/assemble.d.mts.map +1 -1
  20. package/dist/types/commands/manifest/scripts/build-tool.d.mts +2 -0
  21. package/dist/types/commands/manifest/scripts/build-tool.d.mts.map +1 -1
  22. package/dist/types/commands/manifest/scripts/records.d.mts +4 -0
  23. package/dist/types/commands/manifest/scripts/records.d.mts.map +1 -1
  24. package/dist/types/commands/manifest/scripts/run.d.mts +2 -0
  25. package/dist/types/commands/manifest/scripts/run.d.mts.map +1 -1
  26. package/dist/types/commands/scan/handle-create-new-scan.d.mts.map +1 -1
  27. package/dist/types/commands/scan/perform-reachability-analysis.d.mts.map +1 -1
  28. package/dist/types/utils/coana.d.mts +7 -0
  29. package/dist/types/utils/coana.d.mts.map +1 -1
  30. package/dist/utils.js +16 -1
  31. package/dist/utils.js.map +1 -1
  32. package/package.json +2 -2
package/CHANGELOG.md CHANGED
@@ -4,6 +4,13 @@ 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.7.0](https://github.com/SocketDev/socket-cli/releases/tag/v1.7.0) - 2026-10-09
8
+
9
+ ### Changed
10
+ - Socket facts for Maven, Gradle and sbt builds are now written per build — `pom.xml.socket.facts.json` (named after the POM Maven runs on, so `-f other-pom.xml` gets its own), `gradle.socket.facts.json` and `sbt.socket.facts.json` — so builds sharing a directory no longer overwrite each other. Delete any `.socket.facts.json` an earlier run left behind.
11
+ - Reachability scans no longer feed a leftover `.socket.facts.json` report from an earlier run back into the analysis.
12
+ - Updated the Coana CLI to v `15.12.4`.
13
+
7
14
  ## [1.6.2](https://github.com/SocketDev/socket-cli/releases/tag/v1.6.2) - 2026-10-09
8
15
 
9
16
  ### 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.6.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.6.2/assets/fleet/badge-follow-bluesky.svg)](https://bsky.app/profile/socket.dev)
4
+ [![Follow @SocketSecurity](https://raw.githubusercontent.com/SocketDev/socket-cli/v1.7.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.7.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.6.2/assets/fleet/socket-combomark-dark.svg">
175
- <source media="(prefers-color-scheme: light)" srcset="https://raw.githubusercontent.com/SocketDev/socket-cli/v1.6.2/assets/fleet/socket-combomark-light.svg">
176
- <img width="324" height="104" alt="Socket" src="https://raw.githubusercontent.com/SocketDev/socket-cli/v1.6.2/assets/fleet/socket-combomark-light.svg">
174
+ <source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/SocketDev/socket-cli/v1.7.0/assets/fleet/socket-combomark-dark.svg">
175
+ <source media="(prefers-color-scheme: light)" srcset="https://raw.githubusercontent.com/SocketDev/socket-cli/v1.7.0/assets/fleet/socket-combomark-light.svg">
176
+ <img width="324" height="104" alt="Socket" src="https://raw.githubusercontent.com/SocketDev/socket-cli/v1.7.0/assets/fleet/socket-combomark-light.svg">
177
177
  </picture>
178
178
  </div>
package/dist/cli.js CHANGED
@@ -1955,15 +1955,13 @@ async function performReachabilityAnalysis(options) {
1955
1955
  }
1956
1956
  const sockSdk = sockSdkCResult.data;
1957
1957
  spinner?.start('Uploading manifests for reachability analysis...');
1958
+ const outputFilePath = outputPath || constants.default.DOT_SOCKET_DOT_FACTS_JSON;
1958
1959
 
1959
1960
  // Ensure uploaded manifest files are relative to analysis target as coana resolves SBOM manifest files relative to this path
1960
- // NOTE: previously stripped any `.socket.facts.json` from packagePaths
1961
- // here to avoid uploading leftover post-reachability output. With the
1962
- // producer flow (`socket manifest gradle --facts`) those files are
1963
- // legitimate INPUT to compute-artifacts, so we now upload them. Stale
1964
- // facts files are cleaned up downstream — see the post-success
1965
- // deletion in handle-create-new-scan.mts.
1966
- const uploadCResult = await utils.handleApiCall(sockSdk.uploadManifestFiles(orgSlug, packagePaths, {
1961
+ const uploadCResult = await utils.handleApiCall(sockSdk.uploadManifestFiles(orgSlug, packagePaths.filter(p => !utils.isReachabilityReportPath(p, {
1962
+ cwd,
1963
+ outputPath: outputFilePath
1964
+ })), {
1967
1965
  pathsRelativeTo: path.resolve(cwd, analysisTarget)
1968
1966
  }), {
1969
1967
  description: 'upload manifests',
@@ -1991,7 +1989,6 @@ async function performReachabilityAnalysis(options) {
1991
1989
  spinner?.success(`Manifests uploaded successfully. Tar hash: ${tarHash}`);
1992
1990
  spinner?.start();
1993
1991
  spinner?.infoAndStop('Running reachability analysis with Coana...');
1994
- const outputFilePath = outputPath || constants.default.DOT_SOCKET_DOT_FACTS_JSON;
1995
1992
 
1996
1993
  // Temp file for --compute-artifacts-sidecar, removed in the finally below.
1997
1994
  // Written even when empty under dynamicSbomInference, since the
@@ -2282,6 +2279,15 @@ const BUILD_TOOL_WRAPPER = {
2282
2279
  maven: 'mvnw'
2283
2280
  };
2284
2281
 
2282
+ // Gradle (8+) and sbt hold one build per directory; Maven builds are addressed
2283
+ // by POM file, so `mvn -f other-pom.xml` puts a second build in the directory.
2284
+ const ADDRESSED_BY_FILE = {
2285
+ __proto__: null,
2286
+ gradle: false,
2287
+ maven: true,
2288
+ sbt: false
2289
+ };
2290
+
2285
2291
  // sbt happily runs in any directory, synthesizing a default project from its
2286
2292
  // name, so an sbt run outside a build yields a plausible but bogus SBOM. Maven
2287
2293
  // and Gradle refuse such a directory themselves.
@@ -2299,6 +2305,14 @@ function resolveBuildToolBin(tool, projectDir, bin) {
2299
2305
  return DEFAULT_BUILD_TOOL_BIN[tool];
2300
2306
  }
2301
2307
 
2308
+ // Distinct for every build sharing a directory.
2309
+ function socketFactsFileName(tool, entryFile) {
2310
+ if (!ADDRESSED_BY_FILE[tool]) {
2311
+ return `${tool}${constants.default.DOT_SOCKET_DOT_FACTS_JSON}`;
2312
+ }
2313
+ return entryFile ? `${path.basename(entryFile)}${constants.default.DOT_SOCKET_DOT_FACTS_JSON}` : undefined;
2314
+ }
2315
+
2302
2316
  // Gradle's variant-aware resolver: distinct exceptions give mutually-exclusive
2303
2317
  // phrasing, so most-specific-first substring checks classify reliably.
2304
2318
  function classifyGradleFailure(detail) {
@@ -2656,7 +2670,7 @@ function renderResolutionErrorReport(failures, scannedConfigs = [], tool = 'grad
2656
2670
  }
2657
2671
 
2658
2672
  const PURL_TYPE_MAVEN = 'maven';
2659
- function assembleFacts(parsed, opts = {}) {
2673
+ function assembleFacts(parsed, opts) {
2660
2674
  const fileExists = opts.fileExists ?? fs$1.existsSync;
2661
2675
  const perRoot = buildPerRoot(parsed);
2662
2676
  const {
@@ -2664,7 +2678,7 @@ function assembleFacts(parsed, opts = {}) {
2664
2678
  finalNodes
2665
2679
  } = mergeById(perRoot);
2666
2680
  const tool = parsed.tool || 'gradle';
2667
- const components = buildComponents(finalNodes, buildManifestFilesById(parsed, directByRoot, perRoot));
2681
+ const components = buildComponents(finalNodes, buildManifestFilesById(parsed, directByRoot, perRoot, opts.factsFileName));
2668
2682
  const projects = opts.emitProjects === false ? [] : buildProjects(parsed, directByRoot, perRoot);
2669
2683
  const metadata = {
2670
2684
  format: 'socket-facts-sbom',
@@ -2789,7 +2803,7 @@ function mergeById(perRoot) {
2789
2803
  directByRoot
2790
2804
  };
2791
2805
  }
2792
- function buildManifestFilesById(parsed, directByRoot, perRoot) {
2806
+ function buildManifestFilesById(parsed, directByRoot, perRoot, factsFileName) {
2793
2807
  const buildFilesByCoord = new Map();
2794
2808
  for (const [rootId, ids] of directByRoot) {
2795
2809
  const root = perRoot.get(rootId);
@@ -2813,7 +2827,7 @@ function buildManifestFilesById(parsed, directByRoot, perRoot) {
2813
2827
  return new Map([...buildFilesByCoord].map(({
2814
2828
  0: id,
2815
2829
  1: buildFiles
2816
- }) => [id, [constants.default.DOT_SOCKET_DOT_FACTS_JSON, ...[...buildFiles].sort()].map(file => ({
2830
+ }) => [id, [...(factsFileName ? [factsFileName] : []), ...[...buildFiles].sort()].map(file => ({
2817
2831
  file
2818
2832
  }))]));
2819
2833
  }
@@ -3128,6 +3142,7 @@ function serializeExcludePathPatterns(paths) {
3128
3142
  //
3129
3143
  // meta tool toolVersion javaVersion
3130
3144
  // buildRoot path (absolute; the facts file's directory)
3145
+ // entry path (file-addressed builds; build-root-relative)
3131
3146
  // project projectKey group name version dir
3132
3147
  // projectSrc projectKey path (--with-files only)
3133
3148
  // projectTgt projectKey path (--with-files only)
@@ -3173,6 +3188,7 @@ function parseRecords(text) {
3173
3188
  toolVersion: '',
3174
3189
  javaVersion: '',
3175
3190
  buildRoot: '',
3191
+ entry: '',
3176
3192
  projects: new Map(),
3177
3193
  roots: new Map(),
3178
3194
  scannedConfigs: [],
@@ -3228,6 +3244,9 @@ function parseRecords(text) {
3228
3244
  case 'buildRoot':
3229
3245
  result.buildRoot = f[1] ?? '';
3230
3246
  break;
3247
+ case 'entry':
3248
+ result.entry = f[1] ?? '';
3249
+ break;
3231
3250
  case 'project':
3232
3251
  {
3233
3252
  const p = project(f[1] ?? '');
@@ -3392,18 +3411,22 @@ async function writeSbtPlugin(globalBase, sourceFilename, destFilename) {
3392
3411
  });
3393
3412
  await fs$1.promises.writeFile(path.join(pluginsDir, destFilename), src);
3394
3413
  }
3395
- async function assembleFromRecords(out, recordsFile) {
3414
+ async function assembleFromRecords(tool, out, recordsFile) {
3396
3415
  const text = fs$1.existsSync(recordsFile) ? await fs$1.promises.readFile(recordsFile, 'utf8') : '';
3397
3416
  const parsed = parseRecords(text);
3417
+ const factsFileName = socketFactsFileName(tool, parsed.entry || undefined);
3398
3418
  const {
3399
3419
  artifactPaths,
3400
3420
  facts,
3401
3421
  report
3402
- } = assembleFacts(parsed);
3422
+ } = assembleFacts(parsed, {
3423
+ factsFileName
3424
+ });
3403
3425
  return {
3404
3426
  buildRoot: parsed.buildRoot || undefined,
3405
3427
  code: out.code,
3406
3428
  facts,
3429
+ factsFileName,
3407
3430
  report,
3408
3431
  artifactPaths,
3409
3432
  stderr: out.stderr,
@@ -3476,7 +3499,7 @@ async function invokeGradle(opts, initScriptFilename, task, tmpDirPrefix) {
3476
3499
  // resolvedConfiguration API and shared accumulator aren't cache-safe.
3477
3500
  const args = ['--init-script', initScript, '-Dorg.gradle.configuration-cache=false', `-Psocket.recordsFile=${recordsFile}`, ...commonProps(opts, '-P'), ...(opts.toolOpts ?? []), task, '--no-daemon', '--console=plain'];
3478
3501
  const out = await runNeverThrow(bin, args, opts);
3479
- return await assembleFromRecords(out, recordsFile);
3502
+ return await assembleFromRecords('gradle', out, recordsFile);
3480
3503
  });
3481
3504
  }
3482
3505
  async function runGradle(opts) {
@@ -3502,7 +3525,7 @@ async function invokeSbtIn(globalBase, opts, pluginSourceFilename, pluginDestFil
3502
3525
  const javaHomeOpt = javaHome && !(opts.toolOpts ?? []).includes('--java-home') ? ['--java-home', javaHome] : [];
3503
3526
  const args = [...javaHomeOpt, ...props, ...(opts.toolOpts ?? []), '--batch', task];
3504
3527
  const out = await runNeverThrow(bin, args, opts);
3505
- return await assembleFromRecords(out, recordsFile);
3528
+ return await assembleFromRecords('sbt', out, recordsFile);
3506
3529
  }
3507
3530
  async function runSbt(opts) {
3508
3531
  const run = globalBase => invokeSbtIn(globalBase, opts, 'socket-facts.plugin.scala', SBT_FACTS_PLUGIN_FILENAME, FACTS_TASK);
@@ -3529,7 +3552,7 @@ async function invokeMaven(opts, coanaTask, tmpDirPrefix) {
3529
3552
  const props = [`-Dmaven.ext.class.path=${jarPath}`, `-Dcoana.task=${coanaTask}`, `-Dsocket.recordsFile=${recordsFile}`, ...commonProps(opts, '-D')];
3530
3553
  const args = [...props, ...(opts.toolOpts ?? []), '--batch-mode', 'validate'];
3531
3554
  const out = await runNeverThrow(bin, args, opts);
3532
- return await assembleFromRecords(out, recordsFile);
3555
+ return await assembleFromRecords('maven', out, recordsFile);
3533
3556
  });
3534
3557
  }
3535
3558
  async function runMaven(opts) {
@@ -3552,8 +3575,9 @@ function tailBuildOutput(stdout, stderr) {
3552
3575
  // `process.exitCode`, which can already be non-zero for an unrelated reason.
3553
3576
 
3554
3577
  // Runs the bundled build-tool resolution script for a JVM project and writes
3555
- // `.socket.facts.json`. `withFiles` (reachability only) additionally folds
3556
- // resolved artifact paths into `sidecarAcc`. A blocking resolution failure sets
3578
+ // its `<entry>.socket.facts.json` (see socketFactsFileName). `withFiles`
3579
+ // (reachability only) additionally folds resolved artifact paths into
3580
+ // `sidecarAcc`. A blocking resolution failure sets
3557
3581
  // a non-zero exit code and returns (matching the `--pom` generator) unless
3558
3582
  // `ignoreUnresolved`; a crashed build — a process failure, not an unresolved
3559
3583
  // dependency — always fails.
@@ -3639,6 +3663,7 @@ async function runManifestFacts({
3639
3663
  buildRoot,
3640
3664
  code,
3641
3665
  facts,
3666
+ factsFileName,
3642
3667
  report,
3643
3668
  stderr,
3644
3669
  stdout
@@ -3697,14 +3722,20 @@ async function runManifestFacts({
3697
3722
  logger.logger.warn(`No resolvable ${ecosystem} dependencies found; nothing to upload.`);
3698
3723
  return;
3699
3724
  }
3700
- if (!buildRoot) {
3725
+ if (!buildRoot || !factsFileName) {
3701
3726
  process.exitCode = 1;
3702
- logger.logger.fail(`The ${ecosystem} build did not report its root directory, so its Socket facts file cannot be placed.`);
3727
+ logger.logger.fail(`The ${ecosystem} build did not report its ${buildRoot ? 'entry build file' : 'root directory'}, so its Socket facts file cannot be placed.`);
3703
3728
  return null;
3704
3729
  }
3705
3730
  // Every path in the facts is relative to the build root, which `-f`/`-p`
3706
3731
  // can move away from cwd.
3707
- const factsPath = path.join(buildRoot, constants.default.DOT_SOCKET_DOT_FACTS_JSON);
3732
+ const factsPath = path.join(buildRoot, factsFileName);
3733
+ // Not a name producers write, so a copy here is stale and would be uploaded
3734
+ // alongside the new file.
3735
+ const legacyFactsPath = path.join(buildRoot, constants.default.DOT_SOCKET_DOT_FACTS_JSON);
3736
+ if (fs$1.existsSync(legacyFactsPath)) {
3737
+ logger.logger.warn(`Found \`${legacyFactsPath}\`, which is uploaded alongside \`${factsFileName}\`. Delete it if an earlier \`socket manifest\` run left it behind.`);
3738
+ }
3708
3739
  const socketCliVersion = constants.default.ENV.INLINED_SOCKET_CLI_VERSION;
3709
3740
  if (facts.metadata && socketCliVersion) {
3710
3741
  facts.metadata.socketCliVersion = socketCliVersion;
@@ -6385,7 +6416,8 @@ async function extractBazelToMaven(opts) {
6385
6416
  }
6386
6417
  }
6387
6418
 
6388
- // Generates `.socket.facts.json` for a Gradle project via the bundled init script.
6419
+ // Generates `gradle.socket.facts.json` for a Gradle project via the bundled
6420
+ // init script.
6389
6421
  async function convertGradleToFacts({
6390
6422
  bin,
6391
6423
  cwd,
@@ -6415,7 +6447,8 @@ async function convertGradleToFacts({
6415
6447
  });
6416
6448
  }
6417
6449
 
6418
- // Generates `.socket.facts.json` for a Maven project via the bundled extension.
6450
+ // Generates `pom.xml.socket.facts.json` (named after the POM Maven runs on)
6451
+ // for a Maven project via the bundled extension.
6419
6452
  async function convertMavenToFacts({
6420
6453
  bin,
6421
6454
  cwd,
@@ -6445,7 +6478,7 @@ async function convertMavenToFacts({
6445
6478
  });
6446
6479
  }
6447
6480
 
6448
- // Generates `.socket.facts.json` for an sbt project via the bundled sbt plugin.
6481
+ // Generates `sbt.socket.facts.json` for an sbt project via the bundled sbt plugin.
6449
6482
  // sbt 0.13/early 1.x can't run on modern JDKs — pass a compatible JDK via
6450
6483
  // `--sbt-opts "--java-home <path>"` or `JAVA_HOME`.
6451
6484
  async function convertSbtToFacts({
@@ -7342,12 +7375,12 @@ async function createNewScan({
7342
7375
  logger.logger.success('Reachability analysis completed successfully');
7343
7376
  reachabilityReport = reachResult.data?.reachabilityReport;
7344
7377
 
7345
- // When using only pre-generated SBOMs, build the scan from those inputs —
7346
- // CycloneDX, SPDX, and Socket facts — matching Coana's
7347
- // `--use-only-pregenerated-sboms` selection. Otherwise drop every facts
7348
- // file; coana's fresh reachability report (appended below) is the
7349
- // authoritative facts file for the scan.
7350
- const pathsForScan = reach.reachUseOnlyPregeneratedSboms ? filterToPregeneratedSboms(packagePaths, supportedFiles) : packagePaths.filter(p => !utils.isSocketFactsFile(p));
7378
+ // Mirror the SBOM inputs Coana analyzed; otherwise its fresh report
7379
+ // (appended below) supersedes every facts file.
7380
+ const pathsForScan = reach.reachUseOnlyPregeneratedSboms ? filterToPregeneratedSboms(packagePaths, supportedFiles).filter(p => !utils.isReachabilityReportPath(p, {
7381
+ cwd,
7382
+ outputPath: constants.default.DOT_SOCKET_DOT_FACTS_JSON
7383
+ })) : packagePaths.filter(p => !utils.isSocketFactsFile(p));
7351
7384
 
7352
7385
  // Append coana's reachability report, but not twice: a pre-generated facts
7353
7386
  // input can resolve to the same path coana wrote its report to.
@@ -7396,17 +7429,8 @@ async function createNewScan({
7396
7429
  logger.logger.warn('Reachability analysis ran but no full application reachability scan ID was found; skipping reachability finalize. The scan was created but its reachability report was not linked.');
7397
7430
  }
7398
7431
 
7399
- // On a successful scan, clean up the `.socket.facts.json` coana wrote at
7400
- // the path we instructed it to write to (via `--socket-mode`). Failed
7401
- // scans leave the file in place for debugging. Producer-written files
7402
- // (e.g. from `socket manifest gradle --facts`) are NOT touched here —
7403
- // those are user-owned input that the user can clean up themselves; in
7404
- // the --reach path coana overwrites that file with its enriched output
7405
- // anyway, so it's the same path that gets removed. `--reach-retain-facts-file`
7406
- // opts out of this cleanup so the report can be inspected; the user is then
7407
- // responsible for deleting it before the next full application reachability
7408
- // scan (a stale file is picked up as pre-generated input and would make those
7409
- // results unreliable).
7432
+ // A scan without --reach would upload a leftover report as an SBOM with
7433
+ // stale reachability results; a failed scan keeps it for debugging.
7410
7434
  if (fullScanCResult.ok && scanId && reachabilityReport && !reach.reachRetainFactsFile) {
7411
7435
  try {
7412
7436
  await fs.unlink(path.resolve(cwd, reachabilityReport));
@@ -9897,7 +9921,7 @@ const reachabilityFlags = {
9897
9921
  reachRetainFactsFile: {
9898
9922
  type: 'boolean',
9899
9923
  default: false,
9900
- description: 'Keep the `.socket.facts.json` reachability report that the analysis writes to the scan directory instead of deleting it after a successful scan. IMPORTANT: you must delete this file before running a fresh full application reachability scan. A stale `.socket.facts.json` 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.'
9924
+ description: 'Keep the `.socket.facts.json` reachability report that the analysis writes to the scan directory instead of deleting it after a successful scan. Delete it once inspected: later reachability scans ignore it, but a scan without --reach uploads it as an SBOM carrying stale reachability results.'
9901
9925
  },
9902
9926
  reachSkipCache: {
9903
9927
  type: 'boolean',
@@ -12904,7 +12928,10 @@ const config$d = {
12904
12928
  $ ${command} [options] [CWD=.]
12905
12929
 
12906
12930
  Recursively walks CWD, discovers independent gradle, sbt, and maven build
12907
- roots, and generates a Socket facts SBOM (.socket.facts.json) for each,
12931
+ roots, and generates a Socket facts SBOM for each
12932
+ (pom.xml.socket.facts.json, gradle.socket.facts.json, or
12933
+ sbt.socket.facts.json, so builds sharing a directory never overwrite each
12934
+ other),
12908
12935
  skipping subproject/reactor-module directories a parent build root already
12909
12936
  covers. Unlike \`socket manifest auto\`, this looks beyond CWD itself.
12910
12937
 
@@ -12993,11 +13020,11 @@ const config$c = {
12993
13020
  },
12994
13021
  facts: {
12995
13022
  type: 'boolean',
12996
- description: 'Emit a Socket facts JSON file (`.socket.facts.json`) describing the resolved dependency graph. This is the default; pass `--pom` to generate `pom.xml` files instead'
13023
+ description: 'Emit a Socket facts JSON file (`gradle.socket.facts.json`) describing the resolved dependency graph. This is the default; pass `--pom` to generate `pom.xml` files instead'
12997
13024
  },
12998
13025
  pom: {
12999
13026
  type: 'boolean',
13000
- description: 'Generate `pom.xml` manifest file(s) instead of the default Socket facts file (`.socket.facts.json`)'
13027
+ description: 'Generate `pom.xml` manifest file(s) instead of the default Socket facts file (`gradle.socket.facts.json`)'
13001
13028
  },
13002
13029
  includeConfigs: {
13003
13030
  type: 'string',
@@ -13028,9 +13055,9 @@ const config$c = {
13028
13055
  Options
13029
13056
  ${utils.getFlagListOutput(config.flags)}
13030
13057
 
13031
- By default, emits a single \`.socket.facts.json\` describing the resolved
13032
- dependency graph of the whole build, using gradle (preferably your local
13033
- \`gradlew\`). An unresolved dependency is a fatal error. You can pass
13058
+ By default, emits a single \`gradle.socket.facts.json\` describing the
13059
+ resolved dependency graph of the whole build, using gradle (preferably your
13060
+ local \`gradlew\`). An unresolved dependency is a fatal error. You can pass
13034
13061
  --include-configs / --exclude-configs (comma-separated glob patterns) to
13035
13062
  control which configurations are resolved (e.g.
13036
13063
  --include-configs=\`*CompileClasspath,*RuntimeClasspath\`), and
@@ -13247,11 +13274,11 @@ const config$b = {
13247
13274
  },
13248
13275
  facts: {
13249
13276
  type: 'boolean',
13250
- description: 'Emit a Socket facts JSON file (`.socket.facts.json`) describing the resolved dependency graph. This is the default; pass `--pom` to generate `pom.xml` files instead'
13277
+ description: 'Emit a Socket facts JSON file (`gradle.socket.facts.json`) describing the resolved dependency graph. This is the default; pass `--pom` to generate `pom.xml` files instead'
13251
13278
  },
13252
13279
  pom: {
13253
13280
  type: 'boolean',
13254
- description: 'Generate `pom.xml` manifest file(s) instead of the default Socket facts file (`.socket.facts.json`)'
13281
+ description: 'Generate `pom.xml` manifest file(s) instead of the default Socket facts file (`gradle.socket.facts.json`)'
13255
13282
  },
13256
13283
  includeConfigs: {
13257
13284
  type: 'string',
@@ -13282,9 +13309,9 @@ const config$b = {
13282
13309
  Options
13283
13310
  ${utils.getFlagListOutput(config.flags)}
13284
13311
 
13285
- By default, emits a single \`.socket.facts.json\` describing the resolved
13286
- dependency graph of the whole build, using gradle (preferably your local
13287
- \`gradlew\`). An unresolved dependency is a fatal error. You can pass
13312
+ By default, emits a single \`gradle.socket.facts.json\` describing the
13313
+ resolved dependency graph of the whole build, using gradle (preferably your
13314
+ local \`gradlew\`). An unresolved dependency is a fatal error. You can pass
13288
13315
  --include-configs / --exclude-configs (comma-separated glob patterns) to
13289
13316
  control which configurations are resolved (e.g.
13290
13317
  --include-configs=\`*CompileClasspath,*RuntimeClasspath\`), and
@@ -13521,8 +13548,8 @@ const config$a = {
13521
13548
  Options
13522
13549
  ${utils.getFlagListOutput(config.flags)}
13523
13550
 
13524
- Emits a single \`.socket.facts.json\` describing the resolved dependency
13525
- graph of your Maven project, using maven (\`mvn\` on PATH by default). It
13551
+ Emits a single \`pom.xml.socket.facts.json\` (named after the POM Maven
13552
+ runs on) describing the resolved dependency graph of your Maven project, using maven (\`mvn\` on PATH by default). It
13526
13553
  reads dependency metadata only and never downloads artifacts; an unresolved
13527
13554
  dependency is a fatal error. You can pass --include-configs /
13528
13555
  --exclude-configs (comma-separated glob patterns) to control which Maven
@@ -13685,11 +13712,11 @@ const config$9 = {
13685
13712
  },
13686
13713
  facts: {
13687
13714
  type: 'boolean',
13688
- description: 'Emit a Socket facts JSON file (`.socket.facts.json`) describing the resolved dependency graph. This is the default; pass `--pom` to generate `pom.xml` files instead'
13715
+ description: 'Emit a Socket facts JSON file (`sbt.socket.facts.json`) describing the resolved dependency graph. This is the default; pass `--pom` to generate `pom.xml` files instead'
13689
13716
  },
13690
13717
  pom: {
13691
13718
  type: 'boolean',
13692
- description: 'Generate `pom.xml` manifest file(s) instead of the default Socket facts file (`.socket.facts.json`)'
13719
+ description: 'Generate `pom.xml` manifest file(s) instead of the default Socket facts file (`sbt.socket.facts.json`)'
13693
13720
  },
13694
13721
  includeConfigs: {
13695
13722
  type: 'string',
@@ -13706,7 +13733,7 @@ const config$9 = {
13706
13733
  },
13707
13734
  out: {
13708
13735
  type: 'string',
13709
- description: 'Only with --pom: path of the output `pom.xml`, see also --stdout. Does not apply when generating Socket facts (always written to the project root as `.socket.facts.json`)'
13736
+ description: 'Only with --pom: path of the output `pom.xml`, see also --stdout. Does not apply when generating Socket facts (always written to the project root as `sbt.socket.facts.json`)'
13710
13737
  },
13711
13738
  stdout: {
13712
13739
  type: 'boolean',
@@ -13728,8 +13755,8 @@ const config$9 = {
13728
13755
  Options
13729
13756
  ${utils.getFlagListOutput(config.flags)}
13730
13757
 
13731
- By default, emits a single \`.socket.facts.json\` describing the resolved
13732
- dependency graph of the whole build. It reads dependency metadata only and
13758
+ By default, emits a single \`sbt.socket.facts.json\` describing the
13759
+ resolved dependency graph of the whole build. It reads dependency metadata only and
13733
13760
  never downloads artifacts; an unresolved dependency is a fatal error. You
13734
13761
  can pass --include-configs / --exclude-configs (comma-separated glob
13735
13762
  patterns) to control which sbt configurations are resolved (e.g.
@@ -13910,7 +13937,7 @@ async function run$A(argv, importMeta, {
13910
13937
  // would the file name be?
13911
13938
 
13912
13939
  // --out / --stdout only affect the pom path. Socket facts are always written
13913
- // to the project root as `.socket.facts.json` so that `socket scan create`
13940
+ // to the project root as `sbt.socket.facts.json` so that `socket scan create`
13914
13941
  // picks them up, so reject these flags in facts mode rather than silently
13915
13942
  // ignoring an explicitly-passed output location.
13916
13943
  const wasValidInput = utils.checkCommandInput(outputKind, {
@@ -13921,7 +13948,7 @@ async function run$A(argv, importMeta, {
13921
13948
  }, {
13922
13949
  nook: true,
13923
13950
  test: !(facts && (cli.flags['out'] !== undefined || cli.flags['stdout'] !== undefined)),
13924
- message: 'The `--out` and `--stdout` options only apply with `--pom`; Socket facts are always written to the project root as `.socket.facts.json`',
13951
+ message: 'The `--out` and `--stdout` options only apply with `--pom`; Socket facts are always written to the project root as `sbt.socket.facts.json`',
13925
13952
  fail: 'remove --out/--stdout, or pass --pom'
13926
13953
  });
13927
13954
  if (!wasValidInput) {
@@ -14514,7 +14541,7 @@ async function askForFactsFlag(current) {
14514
14541
  choices: [{
14515
14542
  name: 'Socket facts (default)',
14516
14543
  value: 'yes',
14517
- description: 'Generate a .socket.facts.json file describing the resolved dependency graph'
14544
+ description: 'Generate a Socket facts file (*.socket.facts.json) describing the resolved dependency graph'
14518
14545
  }, {
14519
14546
  name: 'pom.xml',
14520
14547
  value: 'no',
@@ -24478,5 +24505,5 @@ process.on('unhandledRejection', async (reason, promise) => {
24478
24505
  // eslint-disable-next-line n/no-process-exit
24479
24506
  process.exit(1);
24480
24507
  });
24481
- //# debugId=40113ed0-ae58-43eb-a197-d1810801160e
24508
+ //# debugId=679b39e8-2ace-4602-9ad0-c5cf11bec9e3
24482
24509
  //# sourceMappingURL=cli.js.map