From aaba0a2d971a92d65cfea31c2113a1871ef747b4 Mon Sep 17 00:00:00 2001 From: Martin Torp Date: Tue, 2 Dec 2025 08:26:18 +0100 Subject: [PATCH 1/2] add --reach-version and --fix-version flags to override the default coana CLI version used --- CHANGELOG.md | 6 ++++ package.json | 2 +- src/commands/ci/handle-ci.mts | 5 +-- src/commands/fix/cmd-fix.integration.test.mts | 1 + src/commands/fix/cmd-fix.mts | 7 +++++ src/commands/fix/coana-fix.mts | 7 +++-- src/commands/fix/handle-fix.mts | 4 +++ src/commands/fix/types.mts | 1 + src/commands/scan/cmd-scan-create.mts | 31 ++++++++++++------- src/commands/scan/cmd-scan-create.test.mts | 13 ++++---- src/commands/scan/cmd-scan-reach.mts | 11 ++++--- src/commands/scan/cmd-scan-reach.test.mts | 13 ++++---- src/commands/scan/create-scan-from-github.mts | 7 +++-- .../scan/perform-reachability-analysis.mts | 6 ++-- src/commands/scan/reachability-flags.mts | 6 ++++ src/utils/dlx.mts | 12 +++++-- test/utils.mts | 26 +++++++++++++--- 17 files changed, 112 insertions(+), 46 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3c8bfe98f..504665420 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,12 @@ 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/). +## [1.1.40](https://github.com/SocketDev/socket-cli/releases/tag/v1.1.40) - 2025-12-01 + +### Added +- Added `--reach-version` flag to `socket scan create` and `socket scan reach` to override the @coana-tech/cli version used for reachability analysis. +- Added `--fix-version` flag to `socket fix` to override the @coana-tech/cli version used for fix analysis. + ## [1.1.39](https://github.com/SocketDev/socket-cli/releases/tag/v1.1.39) - 2025-12-01 ### Added diff --git a/package.json b/package.json index d5917a8d3..b8587602a 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "socket", - "version": "1.1.39", + "version": "1.1.40", "description": "CLI for Socket.dev", "homepage": "https://github.com/SocketDev/socket-cli", "license": "MIT AND OFL-1.1", diff --git a/src/commands/ci/handle-ci.mts b/src/commands/ci/handle-ci.mts index a24c6a190..7b0c8a02a 100644 --- a/src/commands/ci/handle-ci.mts +++ b/src/commands/ci/handle-ci.mts @@ -51,15 +51,16 @@ export async function handleCi(autoManifest: boolean): Promise { pendingHead: true, pullRequest: 0, reach: { - reachAnalysisTimeout: 0, reachAnalysisMemoryLimit: 0, + reachAnalysisTimeout: 0, reachConcurrency: 1, reachDebug: false, - reachDisableAnalytics: false, reachDisableAnalysisSplitting: false, + reachDisableAnalytics: false, reachEcosystems: [], reachExcludePaths: [], reachSkipCache: false, + reachVersion: undefined, runReachabilityAnalysis: false, }, repoName, diff --git a/src/commands/fix/cmd-fix.integration.test.mts b/src/commands/fix/cmd-fix.integration.test.mts index dc285bb4a..9144163ca 100644 --- a/src/commands/fix/cmd-fix.integration.test.mts +++ b/src/commands/fix/cmd-fix.integration.test.mts @@ -167,6 +167,7 @@ describe('socket fix', async () => { --autopilot Enable auto-merge for pull requests that Socket opens. See 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. --exclude Exclude workspaces matching these glob patterns. Can be provided as comma separated values or as multiple flags + --fix-version Override the version of @coana-tech/cli used for fix analysis. Default: . --id Provide a list of vulnerability identifiers to compute fixes for: - GHSA IDs (https://docs.github.com/en/code-security/security-advisories/working-with-global-security-advisories-from-the-github-advisory-database/about-the-github-advisory-database#about-ghsa-ids) (e.g., GHSA-xxxx-xxxx-xxxx) - CVE IDs (https://cve.mitre.org/cve/identifiers/) (e.g., CVE-2025-1234) - automatically converted to GHSA diff --git a/src/commands/fix/cmd-fix.mts b/src/commands/fix/cmd-fix.mts index 41ce78fca..eb15bd7de 100644 --- a/src/commands/fix/cmd-fix.mts +++ b/src/commands/fix/cmd-fix.mts @@ -52,6 +52,10 @@ const generalFlags: MeowFlags = { '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.`, }, + fixVersion: { + type: 'string', + description: `Override the version of @coana-tech/cli used for fix analysis. Default: ${constants.ENV.INLINED_SOCKET_CLI_COANA_TECH_CLI_VERSION}.`, + }, applyFixes: { aliases: ['onlyCompute'], type: 'boolean', @@ -258,6 +262,7 @@ async function run( applyFixes, autopilot, exclude, + fixVersion, include, json, limit, @@ -276,6 +281,7 @@ async function run( applyFixes: boolean autopilot: boolean exclude: string[] + fixVersion: string | undefined include: string[] json: boolean limit: number @@ -353,6 +359,7 @@ async function run( await handleFix({ applyFixes, autopilot, + coanaVersion: fixVersion, cwd, disableMajorUpdates, exclude: excludePatterns, diff --git a/src/commands/fix/coana-fix.mts b/src/commands/fix/coana-fix.mts index a566052ae..a3c54f116 100644 --- a/src/commands/fix/coana-fix.mts +++ b/src/commands/fix/coana-fix.mts @@ -97,7 +97,7 @@ async function discoverGhsaIds( ...fixConfig.unknownFlags, ], orgSlug, - { cwd, spinner }, + { coanaVersion: fixConfig.coanaVersion, cwd, spinner }, ) if (foundCResult.ok) { @@ -115,6 +115,7 @@ export async function coanaFix( const { applyFixes, autopilot, + coanaVersion, cwd, disableMajorUpdates, exclude, @@ -253,7 +254,7 @@ export async function coanaFix( ...fixConfig.unknownFlags, ], fixConfig.orgSlug, - { cwd, spinner, stdio: 'inherit' }, + { coanaVersion, cwd, spinner, stdio: 'inherit' }, ) spinner?.stop() @@ -374,7 +375,7 @@ export async function coanaFix( ...fixConfig.unknownFlags, ], fixConfig.orgSlug, - { cwd, spinner, stdio: 'inherit' }, + { coanaVersion, cwd, spinner, stdio: 'inherit' }, ) if (!fixCResult.ok) { diff --git a/src/commands/fix/handle-fix.mts b/src/commands/fix/handle-fix.mts index 1c04bd450..a10145b2c 100644 --- a/src/commands/fix/handle-fix.mts +++ b/src/commands/fix/handle-fix.mts @@ -17,6 +17,7 @@ const CVE_FORMAT_REGEXP = /^CVE-\d{4}-\d{4,}$/ export type HandleFixConfig = Remap< FixConfig & { applyFixes: boolean + coanaVersion?: string | undefined ghsas: string[] orgSlug: string outputKind: OutputKind @@ -98,6 +99,7 @@ export async function convertIdsToGhsas(ids: string[]): Promise { export async function handleFix({ applyFixes, autopilot, + coanaVersion, cwd, disableMajorUpdates, exclude, @@ -119,6 +121,7 @@ export async function handleFix({ debugDir('inspect', { applyFixes, autopilot, + coanaVersion, cwd, disableMajorUpdates, exclude, @@ -139,6 +142,7 @@ export async function handleFix({ await coanaFix({ applyFixes, autopilot, + coanaVersion, cwd, disableMajorUpdates, exclude, diff --git a/src/commands/fix/types.mts b/src/commands/fix/types.mts index ad7dab203..90eb20374 100644 --- a/src/commands/fix/types.mts +++ b/src/commands/fix/types.mts @@ -4,6 +4,7 @@ import type { Spinner } from '@socketsecurity/registry/lib/spinner' export type FixConfig = { applyFixes: boolean autopilot: boolean + coanaVersion: string | undefined cwd: string disableMajorUpdates: boolean exclude: string[] diff --git a/src/commands/scan/cmd-scan-create.mts b/src/commands/scan/cmd-scan-create.mts index 55b005f9f..64ca7d44b 100644 --- a/src/commands/scan/cmd-scan-create.mts +++ b/src/commands/scan/cmd-scan-create.mts @@ -244,15 +244,16 @@ async function run( reachDisableAnalysisSplitting, reachDisableAnalytics, reachSkipCache, + reachVersion, readOnly, reportLevel, setAsAlertsPage: pendingHeadFlag, tmp, } = cli.flags as { - cwd: string commitHash: string commitMessage: string committers: string + cwd: string defaultBranch: boolean interactive: boolean json: boolean @@ -265,13 +266,14 @@ async function run( tmp: boolean // Reachability flags. reach: boolean - reachAnalysisTimeout: number reachAnalysisMemoryLimit: number + reachAnalysisTimeout: number reachConcurrency: number reachDebug: boolean - reachDisableAnalytics: boolean reachDisableAnalysisSplitting: boolean + reachDisableAnalytics: boolean reachSkipCache: boolean + reachVersion: string | undefined } // Validate ecosystem values. @@ -444,15 +446,19 @@ async function run( reachDisableAnalytics !== reachabilityFlags['reachDisableAnalytics']?.default + const isUsingNonDefaultVersion = + reachVersion !== reachabilityFlags['reachVersion']?.default + const isUsingAnyReachabilityFlags = - isUsingNonDefaultMemoryLimit || - isUsingNonDefaultTimeout || - isUsingNonDefaultConcurrency || - isUsingNonDefaultAnalytics || hasReachEcosystems || hasReachExcludePaths || - reachSkipCache || - reachDisableAnalysisSplitting + isUsingNonDefaultAnalytics || + isUsingNonDefaultConcurrency || + isUsingNonDefaultMemoryLimit || + isUsingNonDefaultTimeout || + isUsingNonDefaultVersion || + reachDisableAnalysisSplitting || + reachSkipCache // Validate target constraints when --reach is enabled. const reachTargetValidation = reach @@ -558,16 +564,17 @@ async function run( pendingHead: Boolean(pendingHead), pullRequest: Number(pullRequest), reach: { - runReachabilityAnalysis: Boolean(reach), - reachDisableAnalytics: Boolean(reachDisableAnalytics), - reachAnalysisTimeout: Number(reachAnalysisTimeout), reachAnalysisMemoryLimit: Number(reachAnalysisMemoryLimit), + reachAnalysisTimeout: Number(reachAnalysisTimeout), reachConcurrency: Number(reachConcurrency), reachDebug: Boolean(reachDebug), reachDisableAnalysisSplitting: Boolean(reachDisableAnalysisSplitting), + reachDisableAnalytics: Boolean(reachDisableAnalytics), reachEcosystems, reachExcludePaths, reachSkipCache: Boolean(reachSkipCache), + reachVersion, + runReachabilityAnalysis: Boolean(reach), }, readOnly: Boolean(readOnly), repoName, diff --git a/src/commands/scan/cmd-scan-create.test.mts b/src/commands/scan/cmd-scan-create.test.mts index e612df9a8..5db0c6ae7 100644 --- a/src/commands/scan/cmd-scan-create.test.mts +++ b/src/commands/scan/cmd-scan-create.test.mts @@ -63,6 +63,7 @@ describe('socket scan create', async () => { --reach-ecosystems List of ecosystems to conduct reachability analysis on, as either a comma separated value or as multiple flags. Defaults to all ecosystems. --reach-exclude-paths List of paths to exclude from reachability analysis, as either a comma separated value or as multiple flags. --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-version Override the version of @coana-tech/cli used for reachability analysis. Default: . Uploads the specified dependency manifest files for Go, Gradle, JavaScript, Kotlin, Python, and Scala. Files like "package.json" and "requirements.txt". @@ -102,9 +103,9 @@ describe('socket scan create', async () => { expect(`\n ${stderr}`).toMatchInlineSnapshot(` " _____ _ _ /--------------- - | __|___ ___| |_ ___| |_ | CLI: - |__ | * | _| '_| -_| _| | token: , org: - |_____|___|___|_,_|___|_|.dev | Command: \`socket scan create\`, cwd: " + | __|___ ___| |_ ___| |_ | CLI: v1.1.40 + |__ | * | _| '_| -_| _| | token: (not set), org: (not set) + |_____|___|___|_,_|___|_|.dev | Command: \`socket scan create\`, cwd: ~/socket/socket-cli" `) expect(code, 'explicit help should exit with code 0').toBe(0) @@ -136,9 +137,9 @@ describe('socket scan create', async () => { expect(`\n ${stderr}`).toMatchInlineSnapshot(` " _____ _ _ /--------------- - | __|___ ___| |_ ___| |_ | CLI: - |__ | * | _| '_| -_| _| | token: , org: - |_____|___|___|_,_|___|_|.dev | Command: \`socket scan create\`, cwd: " + | __|___ ___| |_ ___| |_ | CLI: v1.1.40 + |__ | * | _| '_| -_| _| | token: en*** (--config flag), org: fakeOrg (--org flag) + |_____|___|___|_,_|___|_|.dev | Command: \`socket scan create\`, cwd: ~/socket/socket-cli" `) expect(code, 'dry-run should exit with code 0 if input ok').toBe(0) diff --git a/src/commands/scan/cmd-scan-reach.mts b/src/commands/scan/cmd-scan-reach.mts index b0aa3053e..58b5489b6 100644 --- a/src/commands/scan/cmd-scan-reach.mts +++ b/src/commands/scan/cmd-scan-reach.mts @@ -128,6 +128,7 @@ async function run( reachDisableAnalysisSplitting, reachDisableAnalytics, reachSkipCache, + reachVersion, } = cli.flags as { cwd: string interactive: boolean @@ -135,13 +136,14 @@ async function run( markdown: boolean org: string output: string - reachAnalysisTimeout: number reachAnalysisMemoryLimit: number + reachAnalysisTimeout: number reachConcurrency: number reachDebug: boolean - reachDisableAnalytics: boolean reachDisableAnalysisSplitting: boolean + reachDisableAnalytics: boolean reachSkipCache: boolean + reachVersion: string | undefined } const dryRun = !!cli.flags['dryRun'] @@ -252,15 +254,16 @@ async function run( outputKind, outputPath: outputPath || '', reachabilityOptions: { - reachAnalysisTimeout: Number(reachAnalysisTimeout), reachAnalysisMemoryLimit: Number(reachAnalysisMemoryLimit), + reachAnalysisTimeout: Number(reachAnalysisTimeout), reachConcurrency: Number(reachConcurrency), reachDebug: Boolean(reachDebug), - reachDisableAnalytics: Boolean(reachDisableAnalytics), reachDisableAnalysisSplitting: Boolean(reachDisableAnalysisSplitting), + reachDisableAnalytics: Boolean(reachDisableAnalytics), reachEcosystems, reachExcludePaths, reachSkipCache: Boolean(reachSkipCache), + reachVersion, }, targets, }) diff --git a/src/commands/scan/cmd-scan-reach.test.mts b/src/commands/scan/cmd-scan-reach.test.mts index 62473b4fd..c1a36ef9c 100644 --- a/src/commands/scan/cmd-scan-reach.test.mts +++ b/src/commands/scan/cmd-scan-reach.test.mts @@ -46,6 +46,7 @@ describe('socket scan reach', async () => { --reach-ecosystems List of ecosystems to conduct reachability analysis on, as either a comma separated value or as multiple flags. Defaults to all ecosystems. --reach-exclude-paths List of paths to exclude from reachability analysis, as either a comma separated value or as multiple flags. --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-version Override the version of @coana-tech/cli used for reachability analysis. Default: . Runs the Socket reachability analysis without creating a scan in Socket. The output is written to .socket.facts.json in the current working directory @@ -65,9 +66,9 @@ describe('socket scan reach', async () => { expect(`\n ${stderr}`).toMatchInlineSnapshot(` " _____ _ _ /--------------- - | __|___ ___| |_ ___| |_ | CLI: - |__ | * | _| '_| -_| _| | token: , org: - |_____|___|___|_,_|___|_|.dev | Command: \`socket scan reach\`, cwd: " + | __|___ ___| |_ ___| |_ | CLI: v1.1.40 + |__ | * | _| '_| -_| _| | token: (not set), org: (not set) + |_____|___|___|_,_|___|_|.dev | Command: \`socket scan reach\`, cwd: ~/socket/socket-cli" `) expect(code, 'explicit help should exit with code 0').toBe(0) @@ -94,9 +95,9 @@ describe('socket scan reach', async () => { expect(`\n ${stderr}`).toMatchInlineSnapshot(` " _____ _ _ /--------------- - | __|___ ___| |_ ___| |_ | CLI: - |__ | * | _| '_| -_| _| | token: , org: - |_____|___|___|_,_|___|_|.dev | Command: \`socket scan reach\`, cwd: " + | __|___ ___| |_ ___| |_ | CLI: v1.1.40 + |__ | * | _| '_| -_| _| | token: en*** (--config flag), org: fakeOrg (--org flag) + |_____|___|___|_,_|___|_|.dev | Command: \`socket scan reach\`, cwd: ~/socket/socket-cli" `) expect(code, 'dry-run should exit with code 0 if input ok').toBe(0) diff --git a/src/commands/scan/create-scan-from-github.mts b/src/commands/scan/create-scan-from-github.mts index 376793c54..39fb14983 100644 --- a/src/commands/scan/create-scan-from-github.mts +++ b/src/commands/scan/create-scan-from-github.mts @@ -249,16 +249,17 @@ async function scanOneRepo( pendingHead: true, pullRequest: 0, reach: { - runReachabilityAnalysis: false, - reachDisableAnalytics: false, - reachAnalysisTimeout: 0, reachAnalysisMemoryLimit: 0, + reachAnalysisTimeout: 0, reachConcurrency: 1, reachDebug: false, reachDisableAnalysisSplitting: false, + reachDisableAnalytics: false, reachEcosystems: [], reachExcludePaths: [], reachSkipCache: false, + reachVersion: undefined, + runReachabilityAnalysis: false, }, readOnly: false, repoName: repoSlug, diff --git a/src/commands/scan/perform-reachability-analysis.mts b/src/commands/scan/perform-reachability-analysis.mts index 3eb372c67..b89931ec7 100644 --- a/src/commands/scan/perform-reachability-analysis.mts +++ b/src/commands/scan/perform-reachability-analysis.mts @@ -14,15 +14,16 @@ import type { PURL_Type } from '../../utils/ecosystem.mts' import type { Spinner } from '@socketsecurity/registry/lib/spinner' export type ReachabilityOptions = { - reachAnalysisTimeout: number reachAnalysisMemoryLimit: number + reachAnalysisTimeout: number reachConcurrency: number reachDebug: boolean - reachDisableAnalytics: boolean reachDisableAnalysisSplitting: boolean + reachDisableAnalytics: boolean reachEcosystems: PURL_Type[] reachExcludePaths: string[] reachSkipCache: boolean + reachVersion: string | undefined } export type ReachabilityAnalysisOptions = { @@ -201,6 +202,7 @@ export async function performReachabilityAnalysis( // Run Coana with the manifests tar hash. const coanaResult = await spawnCoanaDlx(coanaArgs, orgSlug, { + coanaVersion: reachabilityOptions.reachVersion, cwd, env: coanaEnv, spinner, diff --git a/src/commands/scan/reachability-flags.mts b/src/commands/scan/reachability-flags.mts index 172b482b5..ee11ded0f 100644 --- a/src/commands/scan/reachability-flags.mts +++ b/src/commands/scan/reachability-flags.mts @@ -1,6 +1,12 @@ +import constants from '../../constants.mts' + import type { MeowFlags } from '../../flags.mts' export const reachabilityFlags: MeowFlags = { + reachVersion: { + type: 'string', + description: `Override the version of @coana-tech/cli used for reachability analysis. Default: ${constants.ENV.INLINED_SOCKET_CLI_COANA_TECH_CLI_VERSION}.`, + }, reachAnalysisMemoryLimit: { type: 'number', default: 8192, diff --git a/src/utils/dlx.mts b/src/utils/dlx.mts index 4a2d08ceb..7b9420ad3 100644 --- a/src/utils/dlx.mts +++ b/src/utils/dlx.mts @@ -167,6 +167,10 @@ export async function spawnDlx( } } +export type CoanaDlxOptions = DlxOptions & { + coanaVersion?: string | undefined +} + /** * Helper to spawn coana with dlx. * Automatically uses force and silent when version is not pinned exactly. @@ -178,17 +182,18 @@ export async function spawnDlx( export async function spawnCoanaDlx( args: string[] | readonly string[], orgSlug?: string, - options?: DlxOptions | undefined, + options?: CoanaDlxOptions | undefined, spawnExtra?: SpawnExtra | undefined, ): Promise> { const { + coanaVersion, env: spawnEnv, ipc, ...dlxOptions } = { __proto__: null, ...options, - } as DlxOptions + } as CoanaDlxOptions const mixinsEnv: Record = { SOCKET_CLI_VERSION: constants.ENV.INLINED_SOCKET_CLI_VERSION, @@ -244,7 +249,8 @@ export async function spawnCoanaDlx( const result = await spawnDlx( { name: '@coana-tech/cli', - version: constants.ENV.INLINED_SOCKET_CLI_COANA_TECH_CLI_VERSION, + version: + coanaVersion || constants.ENV.INLINED_SOCKET_CLI_COANA_TECH_CLI_VERSION, }, args, { diff --git a/test/utils.mts b/test/utils.mts index 22a3256dc..f82b40d45 100644 --- a/test/utils.mts +++ b/test/utils.mts @@ -1,16 +1,24 @@ +import { readFileSync } from 'node:fs' import path from 'node:path' import { fileURLToPath } from 'node:url' -import { it } from 'vitest' - import { SpawnOptions, spawn } from '@socketsecurity/registry/lib/spawn' import { stripAnsi } from '@socketsecurity/registry/lib/strings' +import { it } from 'vitest' import constants, { FLAG_HELP, FLAG_VERSION } from '../src/constants.mts' const __filename = fileURLToPath(import.meta.url) const __dirname = path.dirname(__filename) +// Read Coana version from package.json for test normalization. +// This is needed because constants.ENV.INLINED_SOCKET_CLI_COANA_TECH_CLI_VERSION +// is a compile-time value that's empty in the test environment. +const rootPackageJson = JSON.parse( + readFileSync(path.join(__dirname, '..', 'package.json'), 'utf8'), +) as { devDependencies: Record } +const coanaVersion = rootPackageJson.devDependencies['@coana-tech/cli'] ?? '' + // The asciiUnsafeRegexp match characters that are: // * Control characters in the Unicode range: // - \u0000 to \u0007 (e.g., NUL, BEL) @@ -46,6 +54,14 @@ function stripZeroWidthSpace(str: string): string { return str.replaceAll('\u200b', '') } +// Normalize Coana version to a placeholder for stable snapshots. +function normalizeCoanaVersion(str: string): string { + if (!coanaVersion) { + return str + } + return str.replaceAll(coanaVersion, '') +} + function toAsciiSafeString(str: string): string { return str.replace(asciiUnsafeRegexp, m => { const code = m.charCodeAt(0) @@ -57,8 +73,10 @@ function toAsciiSafeString(str: string): string { export function cleanOutput(output: string): string { return toAsciiSafeString( - normalizeLogSymbols( - normalizeNewlines(stripZeroWidthSpace(stripAnsi(output.trim()))), + normalizeCoanaVersion( + normalizeLogSymbols( + normalizeNewlines(stripZeroWidthSpace(stripAnsi(output.trim()))), + ), ), ) } From 096e520075e6a66045f301ca67614c1e073ecad5 Mon Sep 17 00:00:00 2001 From: Martin Torp Date: Tue, 2 Dec 2025 08:55:46 +0100 Subject: [PATCH 2/2] undo changes to test snapshots --- src/commands/scan/cmd-scan-create.test.mts | 12 ++++++------ src/commands/scan/cmd-scan-reach.test.mts | 12 ++++++------ 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/src/commands/scan/cmd-scan-create.test.mts b/src/commands/scan/cmd-scan-create.test.mts index 5db0c6ae7..8d11b80b2 100644 --- a/src/commands/scan/cmd-scan-create.test.mts +++ b/src/commands/scan/cmd-scan-create.test.mts @@ -103,9 +103,9 @@ describe('socket scan create', async () => { expect(`\n ${stderr}`).toMatchInlineSnapshot(` " _____ _ _ /--------------- - | __|___ ___| |_ ___| |_ | CLI: v1.1.40 - |__ | * | _| '_| -_| _| | token: (not set), org: (not set) - |_____|___|___|_,_|___|_|.dev | Command: \`socket scan create\`, cwd: ~/socket/socket-cli" + | __|___ ___| |_ ___| |_ | CLI: + |__ | * | _| '_| -_| _| | token: , org: + |_____|___|___|_,_|___|_|.dev | Command: \`socket scan create\`, cwd: " `) expect(code, 'explicit help should exit with code 0').toBe(0) @@ -137,9 +137,9 @@ describe('socket scan create', async () => { expect(`\n ${stderr}`).toMatchInlineSnapshot(` " _____ _ _ /--------------- - | __|___ ___| |_ ___| |_ | CLI: v1.1.40 - |__ | * | _| '_| -_| _| | token: en*** (--config flag), org: fakeOrg (--org flag) - |_____|___|___|_,_|___|_|.dev | Command: \`socket scan create\`, cwd: ~/socket/socket-cli" + | __|___ ___| |_ ___| |_ | CLI: + |__ | * | _| '_| -_| _| | token: , org: + |_____|___|___|_,_|___|_|.dev | Command: \`socket scan create\`, cwd: " `) expect(code, 'dry-run should exit with code 0 if input ok').toBe(0) diff --git a/src/commands/scan/cmd-scan-reach.test.mts b/src/commands/scan/cmd-scan-reach.test.mts index c1a36ef9c..e512604f2 100644 --- a/src/commands/scan/cmd-scan-reach.test.mts +++ b/src/commands/scan/cmd-scan-reach.test.mts @@ -66,9 +66,9 @@ describe('socket scan reach', async () => { expect(`\n ${stderr}`).toMatchInlineSnapshot(` " _____ _ _ /--------------- - | __|___ ___| |_ ___| |_ | CLI: v1.1.40 - |__ | * | _| '_| -_| _| | token: (not set), org: (not set) - |_____|___|___|_,_|___|_|.dev | Command: \`socket scan reach\`, cwd: ~/socket/socket-cli" + | __|___ ___| |_ ___| |_ | CLI: + |__ | * | _| '_| -_| _| | token: , org: + |_____|___|___|_,_|___|_|.dev | Command: \`socket scan reach\`, cwd: " `) expect(code, 'explicit help should exit with code 0').toBe(0) @@ -95,9 +95,9 @@ describe('socket scan reach', async () => { expect(`\n ${stderr}`).toMatchInlineSnapshot(` " _____ _ _ /--------------- - | __|___ ___| |_ ___| |_ | CLI: v1.1.40 - |__ | * | _| '_| -_| _| | token: en*** (--config flag), org: fakeOrg (--org flag) - |_____|___|___|_,_|___|_|.dev | Command: \`socket scan reach\`, cwd: ~/socket/socket-cli" + | __|___ ___| |_ ___| |_ | CLI: + |__ | * | _| '_| -_| _| | token: , org: + |_____|___|___|_,_|___|_|.dev | Command: \`socket scan reach\`, cwd: " `) expect(code, 'dry-run should exit with code 0 if input ok').toBe(0)