Skip to content

Commit 79cd44d

Browse files
authored
Disable analysis splitting by default (#1043)
* disable analysis splitting by default * add flag for printing the path to the detailed analysis log file
1 parent dfe019d commit 79cd44d

11 files changed

+82
-23
lines changed

CHANGELOG.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,15 @@ All notable changes to this project will be documented in this file.
44

55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/).
66

7+
## [1.1.58](https://github.com/SocketDev/socket-cli/releases/tag/v1.1.58) - 2026-01-14
8+
9+
### Changed
10+
- Analysis splitting is now disabled by default for reachability scans.
11+
- Added `--reach-enable-analysis-splitting` flag to opt-in to multiple analysis runs per workspace when needed.
12+
- Deprecated `--reach-disable-analysis-splitting` flag (now a no-op for backwards compatibility).
13+
- Updated the Coana CLI to v `14.12.154`.
14+
15+
716
## [1.1.57](https://github.com/SocketDev/socket-cli/releases/tag/v1.1.57) - 2026-01-10
817

918
### Changed

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "socket",
3-
"version": "1.1.57",
3+
"version": "1.1.58",
44
"description": "CLI for Socket.dev",
55
"homepage": "https://github.com/SocketDev/socket-cli",
66
"license": "MIT AND OFL-1.1",
@@ -94,7 +94,7 @@
9494
"@babel/preset-typescript": "7.27.1",
9595
"@babel/runtime": "7.28.4",
9696
"@biomejs/biome": "2.2.4",
97-
"@coana-tech/cli": "14.12.148",
97+
"@coana-tech/cli": "14.12.154",
9898
"@cyclonedx/cdxgen": "11.11.0",
9999
"@dotenvx/dotenvx": "1.49.0",
100100
"@eslint/compat": "1.3.2",

pnpm-lock.yaml

Lines changed: 5 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/commands/ci/handle-ci.mts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,9 +55,10 @@ export async function handleCi(autoManifest: boolean): Promise<void> {
5555
reachAnalysisTimeout: 0,
5656
reachConcurrency: 1,
5757
reachDebug: false,
58-
reachDisableAnalysisSplitting: false,
58+
reachDetailedAnalysisLogFile: false,
5959
reachDisableAnalytics: false,
6060
reachEcosystems: [],
61+
reachEnableAnalysisSplitting: false,
6162
reachExcludePaths: [],
6263
reachLazyMode: false,
6364
reachSkipCache: false,

src/commands/scan/cmd-scan-create.mts

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -241,8 +241,10 @@ async function run(
241241
reachAnalysisTimeout,
242242
reachConcurrency,
243243
reachDebug,
244-
reachDisableAnalysisSplitting,
244+
reachDetailedAnalysisLogFile,
245+
reachDisableAnalysisSplitting: _reachDisableAnalysisSplitting,
245246
reachDisableAnalytics,
247+
reachEnableAnalysisSplitting,
246248
reachLazyMode,
247249
reachSkipCache,
248250
reachUseOnlyPregeneratedSboms,
@@ -272,8 +274,10 @@ async function run(
272274
reachAnalysisTimeout: number
273275
reachConcurrency: number
274276
reachDebug: boolean
277+
reachDetailedAnalysisLogFile: boolean
275278
reachDisableAnalysisSplitting: boolean
276279
reachDisableAnalytics: boolean
280+
reachEnableAnalysisSplitting: boolean
277281
reachLazyMode: boolean
278282
reachSkipCache: boolean
279283
reachUseOnlyPregeneratedSboms: boolean
@@ -461,7 +465,7 @@ async function run(
461465
isUsingNonDefaultMemoryLimit ||
462466
isUsingNonDefaultTimeout ||
463467
isUsingNonDefaultVersion ||
464-
reachDisableAnalysisSplitting ||
468+
reachEnableAnalysisSplitting ||
465469
reachLazyMode ||
466470
reachSkipCache ||
467471
reachUseOnlyPregeneratedSboms
@@ -574,9 +578,10 @@ async function run(
574578
reachAnalysisTimeout: Number(reachAnalysisTimeout),
575579
reachConcurrency: Number(reachConcurrency),
576580
reachDebug: Boolean(reachDebug),
577-
reachDisableAnalysisSplitting: Boolean(reachDisableAnalysisSplitting),
581+
reachDetailedAnalysisLogFile: Boolean(reachDetailedAnalysisLogFile),
578582
reachDisableAnalytics: Boolean(reachDisableAnalytics),
579583
reachEcosystems,
584+
reachEnableAnalysisSplitting: Boolean(reachEnableAnalysisSplitting),
580585
reachExcludePaths,
581586
reachLazyMode: Boolean(reachLazyMode),
582587
reachSkipCache: Boolean(reachSkipCache),

src/commands/scan/cmd-scan-create.test.mts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,9 +58,10 @@ describe('socket scan create', async () => {
5858
--reach-analysis-timeout Set timeout for the reachability analysis. Split analysis runs may cause the total scan time to exceed this timeout significantly.
5959
--reach-concurrency Set the maximum number of concurrent reachability analysis runs. It is recommended to choose a concurrency level that ensures each analysis run has at least the --reach-analysis-memory-limit amount of memory available. NPM reachability analysis does not support concurrent execution, so the concurrency level is ignored for NPM.
6060
--reach-debug Enable debug mode for reachability analysis. Provides verbose logging from the reachability CLI.
61-
--reach-disable-analysis-splitting Limits Coana to at most 1 reachability analysis run per workspace.
61+
--reach-detailed-analysis-log-file A log file with detailed analysis logs is written to root of each analyzed workspace.
6262
--reach-disable-analytics Disable reachability analytics sharing with Socket. Also disables caching-based optimizations.
6363
--reach-ecosystems List of ecosystems to conduct reachability analysis on, as either a comma separated value or as multiple flags. Defaults to all ecosystems.
64+
--reach-enable-analysis-splitting Allow the reachability analysis to partition CVEs into buckets that are processed in separate analysis runs. May improve accuracy, but not recommended by default.
6465
--reach-exclude-paths List of paths to exclude from reachability analysis, as either a comma separated value or as multiple flags.
6566
--reach-skip-cache Skip caching-based optimizations. By default, the reachability analysis will use cached configurations from previous runs to speed up the analysis.
6667
--reach-use-only-pregenerated-sboms When using this option, the scan is created based only on pre-generated CDX and SPDX files in your project.

src/commands/scan/cmd-scan-reach.mts

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -125,8 +125,10 @@ async function run(
125125
reachAnalysisTimeout,
126126
reachConcurrency,
127127
reachDebug,
128-
reachDisableAnalysisSplitting,
128+
reachDetailedAnalysisLogFile,
129+
reachDisableAnalysisSplitting: _reachDisableAnalysisSplitting,
129130
reachDisableAnalytics,
131+
reachEnableAnalysisSplitting,
130132
reachLazyMode,
131133
reachSkipCache,
132134
reachUseOnlyPregeneratedSboms,
@@ -142,8 +144,10 @@ async function run(
142144
reachAnalysisTimeout: number
143145
reachConcurrency: number
144146
reachDebug: boolean
147+
reachDetailedAnalysisLogFile: boolean
145148
reachDisableAnalysisSplitting: boolean
146149
reachDisableAnalytics: boolean
150+
reachEnableAnalysisSplitting: boolean
147151
reachLazyMode: boolean
148152
reachSkipCache: boolean
149153
reachUseOnlyPregeneratedSboms: boolean
@@ -262,9 +266,10 @@ async function run(
262266
reachAnalysisTimeout: Number(reachAnalysisTimeout),
263267
reachConcurrency: Number(reachConcurrency),
264268
reachDebug: Boolean(reachDebug),
265-
reachDisableAnalysisSplitting: Boolean(reachDisableAnalysisSplitting),
269+
reachDetailedAnalysisLogFile: Boolean(reachDetailedAnalysisLogFile),
266270
reachDisableAnalytics: Boolean(reachDisableAnalytics),
267271
reachEcosystems,
272+
reachEnableAnalysisSplitting: Boolean(reachEnableAnalysisSplitting),
268273
reachExcludePaths,
269274
reachLazyMode: Boolean(reachLazyMode),
270275
reachSkipCache: Boolean(reachSkipCache),

src/commands/scan/cmd-scan-reach.test.mts

Lines changed: 23 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,10 @@ describe('socket scan reach', async () => {
4141
--reach-analysis-timeout Set timeout for the reachability analysis. Split analysis runs may cause the total scan time to exceed this timeout significantly.
4242
--reach-concurrency Set the maximum number of concurrent reachability analysis runs. It is recommended to choose a concurrency level that ensures each analysis run has at least the --reach-analysis-memory-limit amount of memory available. NPM reachability analysis does not support concurrent execution, so the concurrency level is ignored for NPM.
4343
--reach-debug Enable debug mode for reachability analysis. Provides verbose logging from the reachability CLI.
44-
--reach-disable-analysis-splitting Limits Coana to at most 1 reachability analysis run per workspace.
44+
--reach-detailed-analysis-log-file A log file with detailed analysis logs is written to root of each analyzed workspace.
4545
--reach-disable-analytics Disable reachability analytics sharing with Socket. Also disables caching-based optimizations.
4646
--reach-ecosystems List of ecosystems to conduct reachability analysis on, as either a comma separated value or as multiple flags. Defaults to all ecosystems.
47+
--reach-enable-analysis-splitting Allow the reachability analysis to partition CVEs into buckets that are processed in separate analysis runs. May improve accuracy, but not recommended by default.
4748
--reach-exclude-paths List of paths to exclude from reachability analysis, as either a comma separated value or as multiple flags.
4849
--reach-skip-cache Skip caching-based optimizations. By default, the reachability analysis will use cached configurations from previous runs to speed up the analysis.
4950
--reach-use-only-pregenerated-sboms When using this option, the scan is created based only on pre-generated CDX and SPDX files in your project.
@@ -195,7 +196,26 @@ describe('socket scan reach', async () => {
195196
FLAG_CONFIG,
196197
'{"apiToken":"fakeToken"}',
197198
],
198-
'should accept --reach-disable-analysis-splitting flag',
199+
'should accept deprecated --reach-disable-analysis-splitting flag (noop)',
200+
async cmd => {
201+
const { code, stdout } = await spawnSocketCli(binCliPath, cmd)
202+
expect(stdout).toMatchInlineSnapshot(`"[DryRun]: Bailing now"`)
203+
expect(code, 'should exit with code 0').toBe(0)
204+
},
205+
)
206+
207+
cmdit(
208+
[
209+
'scan',
210+
'reach',
211+
FLAG_DRY_RUN,
212+
'--reach-enable-analysis-splitting',
213+
'--org',
214+
'fakeOrg',
215+
FLAG_CONFIG,
216+
'{"apiToken":"fakeToken"}',
217+
],
218+
'should accept --reach-enable-analysis-splitting flag',
199219
async cmd => {
200220
const { code, stdout } = await spawnSocketCli(binCliPath, cmd)
201221
expect(stdout).toMatchInlineSnapshot(`"[DryRun]: Bailing now"`)
@@ -319,7 +339,7 @@ describe('socket scan reach', async () => {
319339
'3600',
320340
'--reach-concurrency',
321341
'2',
322-
'--reach-disable-analysis-splitting',
342+
'--reach-enable-analysis-splitting',
323343
'--reach-ecosystems',
324344
'npm,pypi',
325345
'--reach-exclude-paths',

src/commands/scan/create-scan-from-github.mts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -253,9 +253,10 @@ async function scanOneRepo(
253253
reachAnalysisTimeout: 0,
254254
reachConcurrency: 1,
255255
reachDebug: false,
256-
reachDisableAnalysisSplitting: false,
256+
reachDetailedAnalysisLogFile: false,
257257
reachDisableAnalytics: false,
258258
reachEcosystems: [],
259+
reachEnableAnalysisSplitting: false,
259260
reachExcludePaths: [],
260261
reachLazyMode: false,
261262
reachSkipCache: false,

src/commands/scan/perform-reachability-analysis.mts

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,10 @@ export type ReachabilityOptions = {
1818
reachAnalysisTimeout: number
1919
reachConcurrency: number
2020
reachDebug: boolean
21-
reachDisableAnalysisSplitting: boolean
21+
reachDetailedAnalysisLogFile: boolean
2222
reachDisableAnalytics: boolean
2323
reachEcosystems: PURL_Type[]
24+
reachEnableAnalysisSplitting: boolean
2425
reachExcludePaths: string[]
2526
reachLazyMode: boolean
2627
reachSkipCache: boolean
@@ -172,12 +173,15 @@ export async function performReachabilityAnalysis(
172173
? ['--concurrency', `${reachabilityOptions.reachConcurrency}`]
173174
: []),
174175
...(reachabilityOptions.reachDebug ? ['--debug'] : []),
176+
...(reachabilityOptions.reachDetailedAnalysisLogFile
177+
? ['--print-analysis-log-file']
178+
: []),
175179
...(reachabilityOptions.reachDisableAnalytics
176180
? ['--disable-analytics-sharing']
177181
: []),
178-
...(reachabilityOptions.reachDisableAnalysisSplitting
179-
? ['--disable-analysis-splitting']
180-
: []),
182+
...(reachabilityOptions.reachEnableAnalysisSplitting
183+
? []
184+
: ['--disable-analysis-splitting']),
181185
...(tarHash
182186
? ['--run-without-docker', '--manifests-tar-hash', tarHash]
183187
: []),

0 commit comments

Comments
 (0)