From 132e57c00c920b690c27feaf309ebba9575ceeea Mon Sep 17 00:00:00 2001 From: Martin Torp Date: Mon, 23 Nov 2026 12:11:18 +0100 Subject: [PATCH 1/2] chore(scan): deprecate --reach-enable-analysis-splitting The Coana CLI no longer splits a reachability analysis into several runs, so opting in to splitting has nothing left to turn on. The flag is now hidden and does nothing, the same way --reach-disable-analysis-splitting was retired. Passing it still succeeds, so existing CI scripts keep working, and it no longer implies --reach on scan create. socket-cli now always passes --disable-analysis-splitting to Coana. Users can still pick an older Coana with --reach-version, and those versions split by default. Newer versions ignore the flag. --- CHANGELOG.md | 5 + src/commands/ci/handle-ci.mts | 1 - src/commands/scan/cmd-scan-create.mts | 4 +- src/commands/scan/cmd-scan-create.test.mts | 28 ++++- src/commands/scan/cmd-scan-reach.mts | 3 +- src/commands/scan/cmd-scan-reach.test.mts | 4 +- src/commands/scan/create-scan-from-github.mts | 1 - .../scan/perform-reachability-analysis.mts | 6 +- .../perform-reachability-analysis.test.mts | 3 +- src/commands/scan/reachability-flags.mts | 3 +- test/reachability-options.mts | 1 - .../cli.native.socket-help-scan-create.svg | 100 +++++++++--------- .../cli.native.socket-help-scan-reach.svg | 60 +++++------ 13 files changed, 118 insertions(+), 101 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 682c8bb4c..1eefc059f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,11 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/). +## [Unreleased] + +### Changed +- `--reach-enable-analysis-splitting` is deprecated and does nothing, as reachability scans no longer split the analysis into several runs. Scripts that pass it keep working. + ## [1.16.0](https://github.com/SocketDev/socket-cli/releases/tag/v1.16.0) - 2026-11-19 ### Added diff --git a/src/commands/ci/handle-ci.mts b/src/commands/ci/handle-ci.mts index 62a4bb7db..0870bf93e 100644 --- a/src/commands/ci/handle-ci.mts +++ b/src/commands/ci/handle-ci.mts @@ -81,7 +81,6 @@ export async function handleCi(autoManifest: boolean): Promise { reachDisableDependencyDownloads: false, reachDisableExternalToolChecks: false, reachEcosystems: [], - reachEnableAnalysisSplitting: false, reachExcludePaths: [], reachFallbackToRegularScan: false, reachRetainFactsFile: false, diff --git a/src/commands/scan/cmd-scan-create.mts b/src/commands/scan/cmd-scan-create.mts index 90a10ef62..99fdc9c3e 100644 --- a/src/commands/scan/cmd-scan-create.mts +++ b/src/commands/scan/cmd-scan-create.mts @@ -62,6 +62,7 @@ export const CMD_NAME = 'create' // must not imply --reach. const DEPRECATED_NO_OP_REACH_FLAGS = new Set([ 'reachDisableAnalysisSplitting', + 'reachEnableAnalysisSplitting', 'reachLazyMode', ]) @@ -301,7 +302,7 @@ async function run( reachDisableAnalytics, reachDisableDependencyDownloads, reachDisableExternalToolChecks, - reachEnableAnalysisSplitting, + reachEnableAnalysisSplitting: _reachEnableAnalysisSplitting, reachFallbackToRegularScan, reachLazyMode: _reachLazyMode, reachRetainFactsFile, @@ -712,7 +713,6 @@ async function run( reachDisableDependencyDownloads: Boolean(reachDisableDependencyDownloads), reachDisableExternalToolChecks: Boolean(reachDisableExternalToolChecks), reachEcosystems, - reachEnableAnalysisSplitting: Boolean(reachEnableAnalysisSplitting), reachExcludePaths, reachFallbackToRegularScan: Boolean(reachFallbackToRegularScan), reachRetainFactsFile: Boolean(reachRetainFactsFile), diff --git a/src/commands/scan/cmd-scan-create.test.mts b/src/commands/scan/cmd-scan-create.test.mts index 3efa1bb09..f2a7dc813 100644 --- a/src/commands/scan/cmd-scan-create.test.mts +++ b/src/commands/scan/cmd-scan-create.test.mts @@ -137,7 +137,6 @@ describe('socket scan create', async () => { --reach-disable-dependency-downloads Only analyze dependencies that are already installed (e.g. in the project's .venv, vendor directory or module cache). Missing dependencies count as installation failures. --reach-disable-external-tool-checks Disable external tool checks during reachability analysis. --reach-ecosystems List of ecosystems to conduct reachability analysis on, as either a comma separated value or as multiple flags. Supported: cargo, composer, gem, golang, maven, npm, nuget, pypi. Defaults to all supported ecosystems. - --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. --reach-fallback-to-regular-scan If reachability analysis fails, continue with a regular SCA scan (without reachability results) instead of halting. By default, the CLI halts on reachability errors. --reach-retain-facts-file 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. --reach-skip-cache Skip caching-based optimizations. By default, the reachability analysis will use cached configurations from previous runs to speed up the analysis. @@ -377,6 +376,33 @@ describe('socket scan create', async () => { }, ) + cmdit( + [ + 'scan', + 'create', + FLAG_ORG, + 'fakeOrg', + 'target', + FLAG_DRY_RUN, + '--repo', + 'xyz', + '--branch', + 'abc', + '--reach-enable-analysis-splitting', + FLAG_CONFIG, + '{"apiToken":"fakeToken"}', + ], + 'should succeed when deprecated no-op --reach-enable-analysis-splitting is used without --reach', + async cmd => { + const { code, stdout } = await spawnSocketCli(binCliPath, cmd) + expect(stdout).toMatchInlineSnapshot(`"[DryRun]: Bailing now"`) + expect( + code, + 'should exit with code 0 for the deprecated no-op flag', + ).toBe(0) + }, + ) + cmdit( [ 'scan', diff --git a/src/commands/scan/cmd-scan-reach.mts b/src/commands/scan/cmd-scan-reach.mts index 70d0c4f75..59cfa7811 100644 --- a/src/commands/scan/cmd-scan-reach.mts +++ b/src/commands/scan/cmd-scan-reach.mts @@ -166,7 +166,7 @@ async function run( reachDisableAnalytics, reachDisableDependencyDownloads, reachDisableExternalToolChecks, - reachEnableAnalysisSplitting, + reachEnableAnalysisSplitting: _reachEnableAnalysisSplitting, reachLazyMode: _reachLazyMode, reachRetainFactsFile, reachSkipCache, @@ -321,7 +321,6 @@ async function run( reachDisableDependencyDownloads: Boolean(reachDisableDependencyDownloads), reachDisableExternalToolChecks: Boolean(reachDisableExternalToolChecks), reachEcosystems, - reachEnableAnalysisSplitting: Boolean(reachEnableAnalysisSplitting), reachExcludePaths, reachRetainFactsFile: Boolean(reachRetainFactsFile), reachSkipCache: Boolean(reachSkipCache), diff --git a/src/commands/scan/cmd-scan-reach.test.mts b/src/commands/scan/cmd-scan-reach.test.mts index 4d807d0b7..b8ce7ac41 100644 --- a/src/commands/scan/cmd-scan-reach.test.mts +++ b/src/commands/scan/cmd-scan-reach.test.mts @@ -54,7 +54,6 @@ describe('socket scan reach', async () => { --reach-disable-dependency-downloads Only analyze dependencies that are already installed (e.g. in the project's .venv, vendor directory or module cache). Missing dependencies count as installation failures. --reach-disable-external-tool-checks Disable external tool checks during reachability analysis. --reach-ecosystems List of ecosystems to conduct reachability analysis on, as either a comma separated value or as multiple flags. Supported: cargo, composer, gem, golang, maven, npm, nuget, pypi. Defaults to all supported ecosystems. - --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. --reach-retain-facts-file 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. --reach-skip-cache Skip caching-based optimizations. By default, the reachability analysis will use cached configurations from previous runs to speed up the analysis. --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. @@ -226,7 +225,7 @@ describe('socket scan reach', async () => { FLAG_CONFIG, '{"apiToken":"fakeToken"}', ], - 'should accept --reach-enable-analysis-splitting flag', + 'should accept deprecated --reach-enable-analysis-splitting flag (noop)', async cmd => { const { code, stdout } = await spawnSocketCli(binCliPath, cmd) expect(stdout).toMatchInlineSnapshot(`"[DryRun]: Bailing now"`) @@ -438,7 +437,6 @@ describe('socket scan reach', async () => { '3600', '--reach-concurrency', '2', - '--reach-enable-analysis-splitting', '--reach-ecosystems', 'npm,pypi', '--reach-exclude-paths', diff --git a/src/commands/scan/create-scan-from-github.mts b/src/commands/scan/create-scan-from-github.mts index 796ae2f5a..ea6fceb0f 100644 --- a/src/commands/scan/create-scan-from-github.mts +++ b/src/commands/scan/create-scan-from-github.mts @@ -339,7 +339,6 @@ async function scanOneRepo( reachDisableDependencyDownloads: false, reachDisableExternalToolChecks: false, reachEcosystems: [], - reachEnableAnalysisSplitting: false, reachExcludePaths: [], reachFallbackToRegularScan: false, reachRetainFactsFile: false, diff --git a/src/commands/scan/perform-reachability-analysis.mts b/src/commands/scan/perform-reachability-analysis.mts index 582ddb5c7..ee268e683 100644 --- a/src/commands/scan/perform-reachability-analysis.mts +++ b/src/commands/scan/perform-reachability-analysis.mts @@ -46,7 +46,6 @@ export type ReachabilityOptions = { reachDisableExternalToolChecks: boolean reachDisableAnalytics: boolean reachEcosystems: PURL_Type[] - reachEnableAnalysisSplitting: boolean reachExcludePaths: string[] reachRetainFactsFile: boolean reachSkipCache: boolean @@ -250,9 +249,8 @@ export async function performReachabilityAnalysis( ...(reachabilityOptions.reachDisableExternalToolChecks ? ['--disable-external-tool-checks'] : []), - ...(reachabilityOptions.reachEnableAnalysisSplitting - ? [] - : ['--disable-analysis-splitting']), + // Older Coana versions split analyses unless this is passed. + '--disable-analysis-splitting', '--run-without-docker', '--manifests-tar-hash', tarHash, diff --git a/src/commands/scan/perform-reachability-analysis.test.mts b/src/commands/scan/perform-reachability-analysis.test.mts index df1c474e8..17b02e832 100644 --- a/src/commands/scan/perform-reachability-analysis.test.mts +++ b/src/commands/scan/perform-reachability-analysis.test.mts @@ -185,7 +185,7 @@ describe('performReachabilityAnalysis manifests tar hash', () => { rmSync(scanCwd, { force: true, recursive: true }) }) - it('always passes the uploaded tar hash and --run-without-docker to Coana', async () => { + it('always passes the uploaded tar hash, --run-without-docker and --disable-analysis-splitting to Coana', async () => { await performReachabilityAnalysis({ cwd: scanCwd, orgSlug: TEST_ORG_SLUG, @@ -196,6 +196,7 @@ describe('performReachabilityAnalysis manifests tar hash', () => { const args = mockSpawnCoana.mock.calls[0]![0] as string[] expect(args).toContain('--run-without-docker') + expect(args).toContain('--disable-analysis-splitting') expect(args[args.indexOf('--manifests-tar-hash') + 1]).toBe(TEST_TAR_HASH) }) diff --git a/src/commands/scan/reachability-flags.mts b/src/commands/scan/reachability-flags.mts index 79261f967..30df1bf15 100644 --- a/src/commands/scan/reachability-flags.mts +++ b/src/commands/scan/reachability-flags.mts @@ -139,8 +139,9 @@ export const reachabilityFlags: MeowFlags = { reachEnableAnalysisSplitting: { type: 'boolean', default: false, + hidden: true, description: - 'Allow the reachability analysis to partition CVEs into buckets that are processed in separate analysis runs. May improve accuracy, but not recommended by default.', + 'Deprecated: Analysis splitting is no longer supported. This flag is a no-op.', }, reachEcosystems: { type: 'string', diff --git a/test/reachability-options.mts b/test/reachability-options.mts index adfc6a398..70ed0eaa6 100644 --- a/test/reachability-options.mts +++ b/test/reachability-options.mts @@ -20,7 +20,6 @@ export function makeReachabilityOptions(): ReachabilityOptions { reachDisableDependencyDownloads: false, reachDisableExternalToolChecks: false, reachEcosystems: [], - reachEnableAnalysisSplitting: false, reachExcludePaths: [], reachRetainFactsFile: false, reachSkipCache: false, diff --git a/test/snapshots/termless/cli.native.socket-help-scan-create.svg b/test/snapshots/termless/cli.native.socket-help-scan-create.svg index 0c80b8e02..1d5c2e2e2 100644 --- a/test/snapshots/termless/cli.native.socket-help-scan-create.svg +++ b/test/snapshots/termless/cli.native.socket-help-scan-create.svg @@ -1,4 +1,4 @@ - + CLI: v2.1.0-rc.0 | cmd: socket scan create | org: (not set) | token: (not set) @@ -157,109 +157,105 @@ orted: cargo, composer, gem, golang, maven, npm, nuget, pypi. Defaults to all supported ecosystems. - --reach-enable-analysis-splitting Allow the reachability analysis to partition CVEs into buckets that are processed in separate analysi + --reach-fallback-to-regular-scan If reachability analysis fails, continue with a regular SCA scan (without reachability results) instea -s runs. May improve accuracy, but not recommended by default. +d of halting. By default, the CLI halts on reachability errors. - --reach-fallback-to-regular-scan If reachability analysis fails, continue with a regular SCA scan (without reachability results) instea + --reach-retain-facts-file Keep the `.socket.facts.json` reachability report that the analysis writes to the scan directory instead of d -d of halting. By default, the CLI halts on reachability errors. +eleting it after a successful scan. Delete it once inspected: later reachability scans ignore it, but a scan without --reach uploads it as a - --reach-retain-facts-file Keep the `.socket.facts.json` reachability report that the analysis writes to the scan directory instead of d +n SBOM carrying stale reachability results. -eleting it after a successful scan. Delete it once inspected: later reachability scans ignore it, but a scan without --reach uploads it as a + --reach-skip-cache Skip caching-based optimizations. By default, the reachability analysis will use cached configurations from previous -n SBOM carrying stale reachability results. + runs to speed up the analysis. - --reach-skip-cache Skip caching-based optimizations. By default, the reachability analysis will use cached configurations from previous + --reach-use-only-pregenerated-sboms When using this option, the scan is created based only on pre-generated CDX and SPDX files in your - runs to speed up the analysis. +project. - --reach-use-only-pregenerated-sboms When using this option, the scan is created based only on pre-generated CDX and SPDX files in your + --reach-version Override the version of @coana-tech/cli used for reachability analysis. Default: 15.15.2. -project. + - --reach-version Override the version of @coana-tech/cli used for reachability analysis. Default: 15.15.2. + Uploads the specified dependency manifest files for Go, Gradle, JavaScript, - + Kotlin, Python, and Scala. Files like "package.json" and "requirements.txt". - Uploads the specified dependency manifest files for Go, Gradle, JavaScript, + If any folder is specified, the ones found in there recursively are uploaded. - Kotlin, Python, and Scala. Files like "package.json" and "requirements.txt". + - If any folder is specified, the ones found in there recursively are uploaded. + Details on TARGET: - Details on TARGET: + - Defaults to the current dir (cwd) if none given - + - Multiple targets can be specified - - Defaults to the current dir (cwd) if none given + - If a target is a file, only that file is checked - - Multiple targets can be specified + - If it is a dir, the dir is scanned for any supported manifest files - - If a target is a file, only that file is checked + - Dirs MUST be within the current dir (cwd), you can use --cwd to change it - - If it is a dir, the dir is scanned for any supported manifest files + - Supports globbing such as "**/package.json", "**/requirements.txt", etc. - - Dirs MUST be within the current dir (cwd), you can use --cwd to change it + - Ignores any file specified in your project's ".gitignore" - - Supports globbing such as "**/package.json", "**/requirements.txt", etc. + - Also a sensible set of default ignores from the "ignore-by-default" module - - Ignores any file specified in your project's ".gitignore" + - - Also a sensible set of default ignores from the "ignore-by-default" module + The --repo and --branch flags tell Socket to associate this Scan with that - + repo/branch. The names will show up on your dashboard on the Socket website. - The --repo and --branch flags tell Socket to associate this Scan with that + - repo/branch. The names will show up on your dashboard on the Socket website. + Note: for a first run you probably want to set --default-branch to indicate - + the default branch name, like "main" or "master". - Note: for a first run you probably want to set --default-branch to indicate + - the default branch name, like "main" or "master". + The "alerts page" (​https://socket.dev/dashboard/org/YOURORG/alerts​) will show - + the results from the last scan designated as the "pending head" on the branch - The "alerts page" (​https://socket.dev/dashboard/org/YOURORG/alerts​) will show + configured on Socket to be the "default branch". When creating a scan the - the results from the last scan designated as the "pending head" on the branch + --set-as-alerts-page flag will default to true to update this. You can prevent - configured on Socket to be the "default branch". When creating a scan the + this by using --no-set-as-alerts-page. This flag is ignored for any branch that - --set-as-alerts-page flag will default to true to update this. You can prevent + is not designated as the "default branch". It is disabled when using --tmp. - this by using --no-set-as-alerts-page. This flag is ignored for any branch that + - is not designated as the "default branch". It is disabled when using --tmp. + You can use `socket scan setup` to configure certain repo flag defaults. - You can use `socket scan setup` to configure certain repo flag defaults. + Examples - + $ socket scan create - Examples + $ socket scan create ./proj --json - $ socket scan create + $ socket scan create --repo=test-repo --branch=main ./package.json - $ socket scan create ./proj --json + $ socket scan create --uv-members ./packages/api ./packages/worker - $ socket scan create --repo=test-repo --branch=main ./package.json + - $ socket scan create --uv-members ./packages/api ./packages/worker + - - - - - \ No newline at end of file + \ No newline at end of file diff --git a/test/snapshots/termless/cli.native.socket-help-scan-reach.svg b/test/snapshots/termless/cli.native.socket-help-scan-reach.svg index 9cacdbe87..1bce06fa7 100644 --- a/test/snapshots/termless/cli.native.socket-help-scan-reach.svg +++ b/test/snapshots/termless/cli.native.socket-help-scan-reach.svg @@ -1,4 +1,4 @@ - + CLI: v2.1.0-rc.0 | cmd: socket scan reach | org: (not set) | token: (not set) @@ -113,65 +113,61 @@ orted: cargo, composer, gem, golang, maven, npm, nuget, pypi. Defaults to all supported ecosystems. - --reach-enable-analysis-splitting Allow the reachability analysis to partition CVEs into buckets that are processed in separate analysi + --reach-retain-facts-file Keep the `.socket.facts.json` reachability report that the analysis writes to the scan directory instead of d -s runs. May improve accuracy, but not recommended by default. +eleting it after a successful scan. Delete it once inspected: later reachability scans ignore it, but a scan without --reach uploads it as a - --reach-retain-facts-file Keep the `.socket.facts.json` reachability report that the analysis writes to the scan directory instead of d +n SBOM carrying stale reachability results. -eleting it after a successful scan. Delete it once inspected: later reachability scans ignore it, but a scan without --reach uploads it as a + --reach-skip-cache Skip caching-based optimizations. By default, the reachability analysis will use cached configurations from previous -n SBOM carrying stale reachability results. + runs to speed up the analysis. - --reach-skip-cache Skip caching-based optimizations. By default, the reachability analysis will use cached configurations from previous + --reach-use-only-pregenerated-sboms When using this option, the scan is created based only on pre-generated CDX and SPDX files in your - runs to speed up the analysis. +project. - --reach-use-only-pregenerated-sboms When using this option, the scan is created based only on pre-generated CDX and SPDX files in your + --reach-version Override the version of @coana-tech/cli used for reachability analysis. Default: 15.15.2. -project. + - --reach-version Override the version of @coana-tech/cli used for reachability analysis. Default: 15.15.2. + Runs the Socket reachability analysis without creating a scan in Socket. - + The output is written to .socket.facts.json in the current working directory - Runs the Socket reachability analysis without creating a scan in Socket. + unless the --output flag is specified. - The output is written to .socket.facts.json in the current working directory + - unless the --output flag is specified. + Note: Manifest files are uploaded to Socket's backend services because the - + reachability analysis requires creating a Software Bill of Materials (SBOM) - Note: Manifest files are uploaded to Socket's backend services because the + from these files before the analysis can run. - reachability analysis requires creating a Software Bill of Materials (SBOM) + - from these files before the analysis can run. + Examples - + $ socket scan reach - Examples + $ socket scan reach ./proj - $ socket scan reach + $ socket scan reach ./proj --reach-ecosystems npm,pypi - $ socket scan reach ./proj + $ socket scan reach ./monorepo --dynamic-sbom-inference - $ socket scan reach ./proj --reach-ecosystems npm,pypi + $ socket scan reach --output custom-report.json - $ socket scan reach ./monorepo --dynamic-sbom-inference + $ socket scan reach ./proj --output ./reports/analysis.json - $ socket scan reach --output custom-report.json + - $ socket scan reach ./proj --output ./reports/analysis.json + - - - - - \ No newline at end of file + \ No newline at end of file From 302f1992830c06d8136eebbfca249e0f32843db0 Mon Sep 17 00:00:00 2001 From: Martin Torp Date: Mon, 23 Nov 2026 12:43:32 +0100 Subject: [PATCH 2/2] chore(scan): trim the deprecated reach flag plumbing The deprecated no-op reach flags were destructured into unused variables and typed in the cli.flags cast. Nothing reads them, so those lines are gone from scan create and scan reach. The per-flag "accepted without --reach" tests are folded into one run per command that passes all the deprecated flags together. This also covers --reach-lazy-mode on scan create. --- src/commands/scan/cmd-scan-create.mts | 6 ----- src/commands/scan/cmd-scan-create.test.mts | 31 +++------------------- src/commands/scan/cmd-scan-reach.mts | 6 ----- src/commands/scan/cmd-scan-reach.test.mts | 20 +------------- 4 files changed, 4 insertions(+), 59 deletions(-) diff --git a/src/commands/scan/cmd-scan-create.mts b/src/commands/scan/cmd-scan-create.mts index 99fdc9c3e..53079da6b 100644 --- a/src/commands/scan/cmd-scan-create.mts +++ b/src/commands/scan/cmd-scan-create.mts @@ -298,13 +298,10 @@ async function run( reachContinueOnNoSourceFiles, reachDebug, reachDetailedAnalysisLogFile, - reachDisableAnalysisSplitting: _reachDisableAnalysisSplitting, reachDisableAnalytics, reachDisableDependencyDownloads, reachDisableExternalToolChecks, - reachEnableAnalysisSplitting: _reachEnableAnalysisSplitting, reachFallbackToRegularScan, - reachLazyMode: _reachLazyMode, reachRetainFactsFile, reachSkipCache, reachUseOnlyPregeneratedSboms, @@ -339,13 +336,10 @@ async function run( reachContinueOnNoSourceFiles: boolean reachDebug: boolean reachDetailedAnalysisLogFile: boolean - reachDisableAnalysisSplitting: boolean reachDisableAnalytics: boolean reachDisableDependencyDownloads: boolean reachDisableExternalToolChecks: boolean - reachEnableAnalysisSplitting: boolean reachFallbackToRegularScan: boolean - reachLazyMode: boolean reachRetainFactsFile: boolean reachSkipCache: boolean reachUseOnlyPregeneratedSboms: boolean diff --git a/src/commands/scan/cmd-scan-create.test.mts b/src/commands/scan/cmd-scan-create.test.mts index f2a7dc813..ede415185 100644 --- a/src/commands/scan/cmd-scan-create.test.mts +++ b/src/commands/scan/cmd-scan-create.test.mts @@ -362,43 +362,18 @@ describe('socket scan create', async () => { '--branch', 'abc', '--reach-disable-analysis-splitting', - FLAG_CONFIG, - '{"apiToken":"fakeToken"}', - ], - 'should succeed when deprecated no-op --reach-disable-analysis-splitting is used without --reach', - async cmd => { - const { code, stdout } = await spawnSocketCli(binCliPath, cmd) - expect(stdout).toMatchInlineSnapshot(`"[DryRun]: Bailing now"`) - expect( - code, - 'should exit with code 0 for the deprecated no-op flag', - ).toBe(0) - }, - ) - - cmdit( - [ - 'scan', - 'create', - FLAG_ORG, - 'fakeOrg', - 'target', - FLAG_DRY_RUN, - '--repo', - 'xyz', - '--branch', - 'abc', '--reach-enable-analysis-splitting', + '--reach-lazy-mode', FLAG_CONFIG, '{"apiToken":"fakeToken"}', ], - 'should succeed when deprecated no-op --reach-enable-analysis-splitting is used without --reach', + 'should succeed when deprecated no-op reach flags are used without --reach', async cmd => { const { code, stdout } = await spawnSocketCli(binCliPath, cmd) expect(stdout).toMatchInlineSnapshot(`"[DryRun]: Bailing now"`) expect( code, - 'should exit with code 0 for the deprecated no-op flag', + 'should exit with code 0 for the deprecated no-op flags', ).toBe(0) }, ) diff --git a/src/commands/scan/cmd-scan-reach.mts b/src/commands/scan/cmd-scan-reach.mts index 59cfa7811..58d05e64a 100644 --- a/src/commands/scan/cmd-scan-reach.mts +++ b/src/commands/scan/cmd-scan-reach.mts @@ -162,12 +162,9 @@ async function run( reachContinueOnNoSourceFiles, reachDebug, reachDetailedAnalysisLogFile, - reachDisableAnalysisSplitting: _reachDisableAnalysisSplitting, reachDisableAnalytics, reachDisableDependencyDownloads, reachDisableExternalToolChecks, - reachEnableAnalysisSplitting: _reachEnableAnalysisSplitting, - reachLazyMode: _reachLazyMode, reachRetainFactsFile, reachSkipCache, reachUseOnlyPregeneratedSboms, @@ -188,12 +185,9 @@ async function run( reachContinueOnNoSourceFiles: boolean reachDebug: boolean reachDetailedAnalysisLogFile: boolean - reachDisableAnalysisSplitting: boolean reachDisableAnalytics: boolean reachDisableDependencyDownloads: boolean reachDisableExternalToolChecks: boolean - reachEnableAnalysisSplitting: boolean - reachLazyMode: boolean reachRetainFactsFile: boolean reachSkipCache: boolean reachUseOnlyPregeneratedSboms: boolean diff --git a/src/commands/scan/cmd-scan-reach.test.mts b/src/commands/scan/cmd-scan-reach.test.mts index b8ce7ac41..c4dc291cb 100644 --- a/src/commands/scan/cmd-scan-reach.test.mts +++ b/src/commands/scan/cmd-scan-reach.test.mts @@ -201,31 +201,13 @@ describe('socket scan reach', async () => { 'reach', FLAG_DRY_RUN, '--reach-disable-analysis-splitting', - '--org', - 'fakeOrg', - FLAG_CONFIG, - '{"apiToken":"fakeToken"}', - ], - 'should accept deprecated --reach-disable-analysis-splitting flag (noop)', - async cmd => { - const { code, stdout } = await spawnSocketCli(binCliPath, cmd) - expect(stdout).toMatchInlineSnapshot(`"[DryRun]: Bailing now"`) - expect(code, 'should exit with code 0').toBe(0) - }, - ) - - cmdit( - [ - 'scan', - 'reach', - FLAG_DRY_RUN, '--reach-enable-analysis-splitting', '--org', 'fakeOrg', FLAG_CONFIG, '{"apiToken":"fakeToken"}', ], - 'should accept deprecated --reach-enable-analysis-splitting flag (noop)', + 'should accept the deprecated analysis splitting flags (noop)', async cmd => { const { code, stdout } = await spawnSocketCli(binCliPath, cmd) expect(stdout).toMatchInlineSnapshot(`"[DryRun]: Bailing now"`)