@socketsecurity/cli-with-sentry 1.1.40 → 1.1.41

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,12 @@ 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.41](https://github.com/SocketDev/socket-cli/releases/tag/v1.1.40) - 2025-12-02
8
+
9
+ ### Added
10
+ - Added `--reach-version` flag to `socket scan create` and `socket scan reach` to override the @coana-tech/cli version used for reachability analysis.
11
+ - Added `--fix-version` flag to `socket fix` to override the @coana-tech/cli version used for fix analysis.
12
+
7
13
  ## [1.1.40](https://github.com/SocketDev/socket-cli/releases/tag/v1.1.40) - 2025-12-02
8
14
 
9
15
  ### Fixed
package/dist/cli.js CHANGED
@@ -1658,6 +1658,7 @@ async function performReachabilityAnalysis(options) {
1658
1658
 
1659
1659
  // Run Coana with the manifests tar hash.
1660
1660
  const coanaResult = await utils.spawnCoanaDlx(coanaArgs, orgSlug, {
1661
+ coanaVersion: reachabilityOptions.reachVersion,
1661
1662
  cwd,
1662
1663
  env: coanaEnv,
1663
1664
  spinner,
@@ -2380,15 +2381,16 @@ async function handleCi(autoManifest) {
2380
2381
  pendingHead: true,
2381
2382
  pullRequest: 0,
2382
2383
  reach: {
2383
- reachAnalysisTimeout: 0,
2384
2384
  reachAnalysisMemoryLimit: 0,
2385
+ reachAnalysisTimeout: 0,
2385
2386
  reachConcurrency: 1,
2386
2387
  reachDebug: false,
2387
- reachDisableAnalytics: false,
2388
2388
  reachDisableAnalysisSplitting: false,
2389
+ reachDisableAnalytics: false,
2389
2390
  reachEcosystems: [],
2390
2391
  reachExcludePaths: [],
2391
2392
  reachSkipCache: false,
2393
+ reachVersion: undefined,
2392
2394
  runReachabilityAnalysis: false
2393
2395
  },
2394
2396
  repoName,
@@ -3700,7 +3702,8 @@ async function discoverGhsaIds(orgSlug, tarHash, options) {
3700
3702
  };
3701
3703
  const foundCResult = await utils.spawnCoanaDlx(['find-vulnerabilities', cwd, '--manifests-tar-hash', tarHash], orgSlug, {
3702
3704
  cwd,
3703
- spinner
3705
+ spinner,
3706
+ coanaVersion: options?.coanaVersion
3704
3707
  }, {
3705
3708
  stdio: 'pipe'
3706
3709
  });
@@ -3721,6 +3724,7 @@ async function coanaFix(fixConfig) {
3721
3724
  const {
3722
3725
  applyFixes,
3723
3726
  autopilot,
3727
+ coanaVersion,
3724
3728
  cwd,
3725
3729
  disableMajorUpdates,
3726
3730
  exclude,
@@ -3793,7 +3797,8 @@ async function coanaFix(fixConfig) {
3793
3797
  ids = await discoverGhsaIds(orgSlug, tarHash, {
3794
3798
  cwd,
3795
3799
  limit,
3796
- spinner
3800
+ spinner,
3801
+ coanaVersion
3797
3802
  });
3798
3803
  } else if (limit > 0) {
3799
3804
  ids = ghsas.slice(0, limit);
@@ -3815,6 +3820,7 @@ async function coanaFix(fixConfig) {
3815
3820
  const tmpFile = path.join(tmpDir, `socket-fix-${Date.now()}.json`);
3816
3821
  try {
3817
3822
  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] : []), ...(exclude.length ? ['--exclude', ...exclude] : []), ...(!applyFixes ? [constants.FLAG_DRY_RUN] : []), '--output-file', tmpFile, ...(disableMajorUpdates ? ['--disable-major-updates'] : []), ...(showAffectedDirectDependencies ? ['--show-affected-direct-dependencies'] : []), ...fixConfig.unknownFlags], fixConfig.orgSlug, {
3823
+ coanaVersion,
3818
3824
  cwd,
3819
3825
  spinner,
3820
3826
  stdio: 'inherit'
@@ -3876,7 +3882,8 @@ async function coanaFix(fixConfig) {
3876
3882
  ids = await discoverGhsaIds(orgSlug, tarHash, {
3877
3883
  cwd,
3878
3884
  limit: adjustedLimit,
3879
- spinner
3885
+ spinner,
3886
+ coanaVersion
3880
3887
  });
3881
3888
  } else if (shouldSpawnCoana) {
3882
3889
  ids = ghsas.slice(0, adjustedLimit);
@@ -3913,6 +3920,7 @@ async function coanaFix(fixConfig) {
3913
3920
  // Apply fix for single GHSA ID.
3914
3921
  // eslint-disable-next-line no-await-in-loop
3915
3922
  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] : []), ...(exclude.length ? ['--exclude', ...exclude] : []), ...(disableMajorUpdates ? ['--disable-major-updates'] : []), ...(showAffectedDirectDependencies ? ['--show-affected-direct-dependencies'] : []), ...fixConfig.unknownFlags], fixConfig.orgSlug, {
3923
+ coanaVersion,
3916
3924
  cwd,
3917
3925
  spinner,
3918
3926
  stdio: 'inherit'
@@ -4169,6 +4177,7 @@ async function convertIdsToGhsas(ids) {
4169
4177
  async function handleFix({
4170
4178
  applyFixes,
4171
4179
  autopilot,
4180
+ coanaVersion,
4172
4181
  cwd,
4173
4182
  disableMajorUpdates,
4174
4183
  exclude,
@@ -4190,6 +4199,7 @@ async function handleFix({
4190
4199
  require$$9.debugDir('inspect', {
4191
4200
  applyFixes,
4192
4201
  autopilot,
4202
+ coanaVersion,
4193
4203
  cwd,
4194
4204
  disableMajorUpdates,
4195
4205
  exclude,
@@ -4208,6 +4218,7 @@ async function handleFix({
4208
4218
  await outputFixResult(await coanaFix({
4209
4219
  applyFixes,
4210
4220
  autopilot,
4221
+ coanaVersion,
4211
4222
  cwd,
4212
4223
  disableMajorUpdates,
4213
4224
  exclude,
@@ -4242,6 +4253,10 @@ const generalFlags$2 = {
4242
4253
  default: false,
4243
4254
  description: `Enable auto-merge for pull requests that Socket opens.\nSee ${vendor.terminalLinkExports('GitHub documentation', 'https://docs.github.com/en/repositories/configuring-branches-and-merges-in-your-repository/configuring-pull-request-merges/managing-auto-merge-for-pull-requests-in-your-repository')} for managing auto-merge for pull requests in your repository.`
4244
4255
  },
4256
+ fixVersion: {
4257
+ type: 'string',
4258
+ description: `Override the version of @coana-tech/cli used for fix analysis. Default: ${constants.default.ENV.INLINED_SOCKET_CLI_COANA_TECH_CLI_VERSION}.`
4259
+ },
4245
4260
  applyFixes: {
4246
4261
  aliases: ['onlyCompute'],
4247
4262
  type: 'boolean',
@@ -4420,6 +4435,7 @@ async function run$K(argv, importMeta, {
4420
4435
  applyFixes,
4421
4436
  autopilot,
4422
4437
  exclude,
4438
+ fixVersion,
4423
4439
  include,
4424
4440
  json,
4425
4441
  limit,
@@ -4476,6 +4492,7 @@ async function run$K(argv, importMeta, {
4476
4492
  await handleFix({
4477
4493
  applyFixes,
4478
4494
  autopilot,
4495
+ coanaVersion: fixVersion,
4479
4496
  cwd,
4480
4497
  disableMajorUpdates,
4481
4498
  exclude: excludePatterns,
@@ -11068,6 +11085,10 @@ const cmdRepository = {
11068
11085
  };
11069
11086
 
11070
11087
  const reachabilityFlags = {
11088
+ reachVersion: {
11089
+ type: 'string',
11090
+ description: `Override the version of @coana-tech/cli used for reachability analysis. Default: ${constants.default.ENV.INLINED_SOCKET_CLI_COANA_TECH_CLI_VERSION}.`
11091
+ },
11071
11092
  reachAnalysisMemoryLimit: {
11072
11093
  type: 'number',
11073
11094
  default: 8192,
@@ -11356,6 +11377,7 @@ async function run$d(argv, importMeta, {
11356
11377
  reachDisableAnalysisSplitting,
11357
11378
  reachDisableAnalytics,
11358
11379
  reachSkipCache,
11380
+ reachVersion,
11359
11381
  readOnly,
11360
11382
  reportLevel,
11361
11383
  setAsAlertsPage: pendingHeadFlag,
@@ -11483,7 +11505,8 @@ async function run$d(argv, importMeta, {
11483
11505
  const isUsingNonDefaultTimeout = reachAnalysisTimeout !== reachabilityFlags['reachAnalysisTimeout']?.default;
11484
11506
  const isUsingNonDefaultConcurrency = reachConcurrency !== reachabilityFlags['reachConcurrency']?.default;
11485
11507
  const isUsingNonDefaultAnalytics = reachDisableAnalytics !== reachabilityFlags['reachDisableAnalytics']?.default;
11486
- const isUsingAnyReachabilityFlags = isUsingNonDefaultMemoryLimit || isUsingNonDefaultTimeout || isUsingNonDefaultConcurrency || isUsingNonDefaultAnalytics || hasReachEcosystems || hasReachExcludePaths || reachSkipCache || reachDisableAnalysisSplitting;
11508
+ const isUsingNonDefaultVersion = reachVersion !== reachabilityFlags['reachVersion']?.default;
11509
+ const isUsingAnyReachabilityFlags = hasReachEcosystems || hasReachExcludePaths || isUsingNonDefaultAnalytics || isUsingNonDefaultConcurrency || isUsingNonDefaultMemoryLimit || isUsingNonDefaultTimeout || isUsingNonDefaultVersion || reachDisableAnalysisSplitting || reachSkipCache;
11487
11510
 
11488
11511
  // Validate target constraints when --reach is enabled.
11489
11512
  const reachTargetValidation = reach ? await validateReachabilityTarget(targets, cwd) : {
@@ -11568,16 +11591,17 @@ async function run$d(argv, importMeta, {
11568
11591
  pendingHead: Boolean(pendingHead),
11569
11592
  pullRequest: Number(pullRequest),
11570
11593
  reach: {
11571
- runReachabilityAnalysis: Boolean(reach),
11572
- reachDisableAnalytics: Boolean(reachDisableAnalytics),
11573
- reachAnalysisTimeout: Number(reachAnalysisTimeout),
11574
11594
  reachAnalysisMemoryLimit: Number(reachAnalysisMemoryLimit),
11595
+ reachAnalysisTimeout: Number(reachAnalysisTimeout),
11575
11596
  reachConcurrency: Number(reachConcurrency),
11576
11597
  reachDebug: Boolean(reachDebug),
11577
11598
  reachDisableAnalysisSplitting: Boolean(reachDisableAnalysisSplitting),
11599
+ reachDisableAnalytics: Boolean(reachDisableAnalytics),
11578
11600
  reachEcosystems,
11579
11601
  reachExcludePaths,
11580
- reachSkipCache: Boolean(reachSkipCache)
11602
+ reachSkipCache: Boolean(reachSkipCache),
11603
+ reachVersion,
11604
+ runReachabilityAnalysis: Boolean(reach)
11581
11605
  },
11582
11606
  readOnly: Boolean(readOnly),
11583
11607
  repoName,
@@ -12216,16 +12240,17 @@ async function scanOneRepo(repoSlug, {
12216
12240
  pendingHead: true,
12217
12241
  pullRequest: 0,
12218
12242
  reach: {
12219
- runReachabilityAnalysis: false,
12220
- reachDisableAnalytics: false,
12221
- reachAnalysisTimeout: 0,
12222
12243
  reachAnalysisMemoryLimit: 0,
12244
+ reachAnalysisTimeout: 0,
12223
12245
  reachConcurrency: 1,
12224
12246
  reachDebug: false,
12225
12247
  reachDisableAnalysisSplitting: false,
12248
+ reachDisableAnalytics: false,
12226
12249
  reachEcosystems: [],
12227
12250
  reachExcludePaths: [],
12228
- reachSkipCache: false
12251
+ reachSkipCache: false,
12252
+ reachVersion: undefined,
12253
+ runReachabilityAnalysis: false
12229
12254
  },
12230
12255
  readOnly: false,
12231
12256
  repoName: repoSlug,
@@ -13511,7 +13536,8 @@ async function run$7(argv, importMeta, {
13511
13536
  reachDebug,
13512
13537
  reachDisableAnalysisSplitting,
13513
13538
  reachDisableAnalytics,
13514
- reachSkipCache
13539
+ reachSkipCache,
13540
+ reachVersion
13515
13541
  } = cli.flags;
13516
13542
  const dryRun = !!cli.flags['dryRun'];
13517
13543
 
@@ -13601,15 +13627,16 @@ async function run$7(argv, importMeta, {
13601
13627
  outputKind,
13602
13628
  outputPath: outputPath || '',
13603
13629
  reachabilityOptions: {
13604
- reachAnalysisTimeout: Number(reachAnalysisTimeout),
13605
13630
  reachAnalysisMemoryLimit: Number(reachAnalysisMemoryLimit),
13631
+ reachAnalysisTimeout: Number(reachAnalysisTimeout),
13606
13632
  reachConcurrency: Number(reachConcurrency),
13607
13633
  reachDebug: Boolean(reachDebug),
13608
- reachDisableAnalytics: Boolean(reachDisableAnalytics),
13609
13634
  reachDisableAnalysisSplitting: Boolean(reachDisableAnalysisSplitting),
13635
+ reachDisableAnalytics: Boolean(reachDisableAnalytics),
13610
13636
  reachEcosystems,
13611
13637
  reachExcludePaths,
13612
- reachSkipCache: Boolean(reachSkipCache)
13638
+ reachSkipCache: Boolean(reachSkipCache),
13639
+ reachVersion
13613
13640
  },
13614
13641
  targets
13615
13642
  });
@@ -15448,5 +15475,5 @@ void (async () => {
15448
15475
  await utils.captureException(e);
15449
15476
  }
15450
15477
  })();
15451
- //# debugId=abe9e0d9-90ff-4e73-99b1-648bc5ca3347
15478
+ //# debugId=3354d2a8-858e-47ae-8d62-34c8832fddf8
15452
15479
  //# sourceMappingURL=cli.js.map