@socketsecurity/cli-with-sentry 1.1.133 → 1.1.134

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,11 @@ 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.134](https://github.com/SocketDev/socket-cli/releases/tag/v1.1.134) - 2026-07-01
8
+
9
+ ### Fixed
10
+ - `--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.
11
+
7
12
  ## [1.1.133](https://github.com/SocketDev/socket-cli/releases/tag/v1.1.133) - 2026-07-01
8
13
 
9
14
  ### Changed
package/dist/cli.js CHANGED
@@ -6244,11 +6244,14 @@ async function generateAutoManifest({
6244
6244
  };
6245
6245
  }
6246
6246
 
6247
- // Keys for CDX and SPDX in the supported files response.
6248
- const CDX_SPDX_KEYS = ['cdx', 'spdx'];
6249
- function getCdxSpdxPatterns(supportedFiles) {
6247
+ // Supported-files response keys whose files count as pre-generated SBOMs:
6248
+ // CycloneDX, SPDX, and Socket facts (`.socket.facts.json`, under `socket`).
6249
+ // Kept in sync with Coana's `--use-only-pregenerated-sboms` selection
6250
+ // (extractPregeneratedSbomPatterns), which matches the same three keys.
6251
+ const PREGENERATED_SBOM_KEYS = ['cdx', 'socket', 'spdx'];
6252
+ function getPregeneratedSbomPatterns(supportedFiles) {
6250
6253
  const patterns = [];
6251
- for (const key of CDX_SPDX_KEYS) {
6254
+ for (const key of PREGENERATED_SBOM_KEYS) {
6252
6255
  const supported = supportedFiles[key];
6253
6256
  if (supported) {
6254
6257
  for (const entry of Object.values(supported)) {
@@ -6258,9 +6261,12 @@ function getCdxSpdxPatterns(supportedFiles) {
6258
6261
  }
6259
6262
  return patterns;
6260
6263
  }
6261
- function filterToCdxSpdxOnly(filepaths, supportedFiles) {
6262
- const patterns = getCdxSpdxPatterns(supportedFiles);
6264
+ function filterToPregeneratedSboms(filepaths, supportedFiles) {
6265
+ const patterns = getPregeneratedSbomPatterns(supportedFiles);
6266
+ // `dot: true` lets `*`-prefixed patterns match leading-dot filenames such as
6267
+ // `.socket.facts.json` (advertised as `*.socket.facts.json`).
6263
6268
  return filepaths.filter(filepath => vendor.micromatchExports.some(filepath, patterns, {
6269
+ dot: true,
6264
6270
  nocase: true
6265
6271
  }));
6266
6272
  }
@@ -6420,13 +6426,17 @@ async function handleCreateNewScan({
6420
6426
  logger.logger.success('Reachability analysis completed successfully');
6421
6427
  reachabilityReport = reachResult.data?.reachabilityReport;
6422
6428
 
6423
- // Ensure the .socket.facts.json isn't duplicated in case it happened
6424
- // to be in the scan folder before the analysis was run.
6425
- const filteredPackagePaths = packagePaths.filter(p => path.basename(p) !== constants.default.DOT_SOCKET_DOT_FACTS_JSON);
6426
-
6427
- // When using pregenerated SBOMs only, filter to CDX/SPDX files.
6428
- const pathsForScan = reach.reachUseOnlyPregeneratedSboms ? filterToCdxSpdxOnly(filteredPackagePaths, supportedFiles) : filteredPackagePaths;
6429
- scanPaths = [...pathsForScan, ...(reachabilityReport ? [reachabilityReport] : [])];
6429
+ // When using only pre-generated SBOMs, build the scan from those inputs —
6430
+ // CycloneDX, SPDX, and Socket facts (`.socket.facts.json`) matching
6431
+ // Coana's `--use-only-pregenerated-sboms` selection. Otherwise drop any
6432
+ // stray `.socket.facts.json`; coana's fresh reachability report (appended
6433
+ // below) is the authoritative facts file for the scan.
6434
+ const pathsForScan = reach.reachUseOnlyPregeneratedSboms ? filterToPregeneratedSboms(packagePaths, supportedFiles) : packagePaths.filter(p => path.basename(p) !== constants.default.DOT_SOCKET_DOT_FACTS_JSON);
6435
+
6436
+ // Append coana's reachability report, but not twice: a pre-generated facts
6437
+ // input can resolve to the same path coana wrote its report to.
6438
+ const reportPath = reachabilityReport ? path.resolve(cwd, reachabilityReport) : undefined;
6439
+ scanPaths = [...pathsForScan.filter(p => path.resolve(cwd, p) !== reportPath), ...(reachabilityReport ? [reachabilityReport] : [])];
6430
6440
  tier1ReachabilityScanId = reachResult.data?.tier1ReachabilityScanId;
6431
6441
  }
6432
6442
 
@@ -21830,5 +21840,5 @@ process.on('unhandledRejection', async (reason, promise) => {
21830
21840
  // eslint-disable-next-line n/no-process-exit
21831
21841
  process.exit(1);
21832
21842
  });
21833
- //# debugId=124ab184-9379-4139-921b-7d32dd1456f3
21843
+ //# debugId=d8a70f18-1fe0-4a46-92e4-b0faf786bd57
21834
21844
  //# sourceMappingURL=cli.js.map