Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@
"@babel/preset-typescript": "7.27.1",
"@babel/runtime": "7.28.3",
"@biomejs/biome": "2.2.2",
"@coana-tech/cli": "14.12.10",
"@coana-tech/cli": "14.12.12",
"@cyclonedx/cdxgen": "11.6.0",
"@dotenvx/dotenvx": "1.49.0",
"@eslint/compat": "1.3.2",
Expand Down
1 change: 1 addition & 0 deletions src/commands/ci/handle-ci.mts
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ export async function handleCi(autoManifest: boolean): Promise<void> {
reachDisableAnalytics: false,
reachEcosystems: [],
reachExcludePaths: [],
reachSkipCache: false,
runReachabilityAnalysis: false,
},
repoName,
Expand Down
6 changes: 6 additions & 0 deletions src/commands/fix/coana-fix.mts
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,9 @@ export async function coanaFix(
tarHash,
'--apply-fixes-to',
...(isAll ? ['all'] : ghsas),
...(fixConfig.rangeStyle
? ['--range-style', fixConfig.rangeStyle]
: []),
...fixConfig.unknownFlags,
],
fixConfig.orgSlug,
Expand All @@ -115,6 +118,9 @@ export async function coanaFix(
cwd,
'--manifests-tar-hash',
tarHash,
...(fixConfig.rangeStyle
? ['--range-style', fixConfig.rangeStyle]
: []),
...fixConfig.unknownFlags,
],
fixConfig.orgSlug,
Expand Down
6 changes: 5 additions & 1 deletion src/commands/scan/cmd-scan-create.mts
Original file line number Diff line number Diff line change
Expand Up @@ -227,6 +227,7 @@ async function run(
reachAnalysisMemoryLimit,
reachAnalysisTimeout,
reachDisableAnalytics,
reachSkipCache,
readOnly,
setAsAlertsPage: pendingHeadFlag,
tmp,
Expand All @@ -249,6 +250,7 @@ async function run(
reachAnalysisTimeout: number
reachAnalysisMemoryLimit: number
reachDisableAnalytics: boolean
reachSkipCache: boolean
}

const dryRun = !!cli.flags['dryRun']
Expand Down Expand Up @@ -424,7 +426,8 @@ async function run(
isUsingNonDefaultTimeout ||
isUsingNonDefaultAnalytics ||
hasReachEcosystems ||
hasReachExcludePaths
hasReachExcludePaths ||
reachSkipCache

const wasValidInput = checkCommandInput(
outputKind,
Expand Down Expand Up @@ -499,6 +502,7 @@ async function run(
reachAnalysisMemoryLimit: Number(reachAnalysisMemoryLimit),
reachEcosystems,
reachExcludePaths,
reachSkipCache: Boolean(reachSkipCache),
},
readOnly: Boolean(readOnly),
repoName,
Expand Down
1 change: 1 addition & 0 deletions src/commands/scan/cmd-scan-create.test.mts
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ describe('socket scan create', async () => {
--reach-disable-analytics Disable reachability analytics sharing with Socket. Also disables caching-based optimizations.
--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.

Uploads the specified dependency manifest files for Go, Gradle, JavaScript,
Kotlin, Python, and Scala. Files like "package.json" and "requirements.txt".
Expand Down
3 changes: 3 additions & 0 deletions src/commands/scan/cmd-scan-reach.mts
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,7 @@ async function run(
reachAnalysisMemoryLimit,
reachAnalysisTimeout,
reachDisableAnalytics,
reachSkipCache,
} = cli.flags as {
cwd: string
interactive: boolean
Expand All @@ -118,6 +119,7 @@ async function run(
reachAnalysisTimeout: number
reachAnalysisMemoryLimit: number
reachDisableAnalytics: boolean
reachSkipCache: boolean
}

const dryRun = !!cli.flags['dryRun']
Expand Down Expand Up @@ -204,6 +206,7 @@ async function run(
reachDisableAnalytics: Boolean(reachDisableAnalytics),
reachEcosystems,
reachExcludePaths,
reachSkipCache: Boolean(reachSkipCache),
},
})
}
1 change: 1 addition & 0 deletions src/commands/scan/cmd-scan-reach.test.mts
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ describe('socket scan reach', async () => {
--reach-disable-analytics Disable reachability analytics sharing with Socket. Also disables caching-based optimizations.
--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.

Runs the Socket reachability analysis without creating a scan in Socket.
The output is written to .socket.facts.json in the current working directory.
Expand Down
1 change: 1 addition & 0 deletions src/commands/scan/create-scan-from-github.mts
Original file line number Diff line number Diff line change
Expand Up @@ -246,6 +246,7 @@ async function scanOneRepo(
reachAnalysisMemoryLimit: 0,
reachEcosystems: [],
reachExcludePaths: [],
reachSkipCache: false,
},
readOnly: false,
repoName: repoSlug,
Expand Down
2 changes: 2 additions & 0 deletions src/commands/scan/perform-reachability-analysis.mts
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ export type ReachabilityOptions = {
reachDisableAnalytics: boolean
reachEcosystems: PURL_Type[]
reachExcludePaths: string[]
reachSkipCache: boolean
}

export type ReachabilityAnalysisOptions = {
Expand Down Expand Up @@ -161,6 +162,7 @@ export async function performReachabilityAnalysis(
...(reachabilityOptions.reachExcludePaths.length
? ['--exclude-dirs', ...reachabilityOptions.reachExcludePaths]
: []),
...(reachabilityOptions.reachSkipCache ? ['--skip-cache-usage'] : []),
]

// Build environment variables.
Expand Down
6 changes: 6 additions & 0 deletions src/commands/scan/reachability-flags.mts
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,10 @@ export const reachabilityFlags: MeowFlags = {
description:
'List of paths to exclude from reachability analysis, as either a comma separated value or as multiple flags.',
},
reachSkipCache: {
type: 'boolean',
default: false,
description:
'Skip caching-based optimizations. By default, the reachability analysis will use cached configurations from previous runs to speed up the analysis.',
},
}
Loading