File tree Expand file tree Collapse file tree 2 files changed +16
-6
lines changed
Expand file tree Collapse file tree 2 files changed +16
-6
lines changed Original file line number Diff line number Diff line change 1+ import path from 'node:path'
2+
13import terminalLink from 'terminal-link'
24
35import { debugDir } from '@socketsecurity/registry/lib/debug'
@@ -151,14 +153,19 @@ export async function handleCreateNewScan({
151153
152154 logger . success ( 'Reachability analysis completed successfully' )
153155
156+ const reachabilityReport = reachResult . data ?. reachabilityReport
157+
154158 scanPaths = [
155159 ...packagePaths . filter (
156160 // Ensure the .socket.facts.json isn't duplicated in case it happened
157161 // to be in the scan folder before the analysis was run.
158- p => ! p . endsWith ( constants . DOT_SOCKET_DOT_FACTS_JSON ) ,
162+ p =>
163+ path . basename ( p ) . toLowerCase ( ) !==
164+ constants . DOT_SOCKET_DOT_FACTS_JSON ,
159165 ) ,
160- reachResult . data ?. reachabilityReport ,
166+ ... ( reachabilityReport ? [ reachabilityReport ] : [ ] ) ,
161167 ]
168+
162169 tier1ReachabilityScanId = reachResult . data ?. tier1ReachabilityScanId
163170 }
164171
Original file line number Diff line number Diff line change 1+ import path from 'node:path'
2+
13import terminalLink from 'terminal-link'
24
35import constants from '../../constants.mts'
@@ -86,10 +88,11 @@ export async function performReachabilityAnalysis(
8688
8789 const wasSpinning = ! ! spinner ?. isSpinning
8890
89- // Exclude any .socket.facts.json files that happen to be
90- // in the scan folder before the analysis was run.
91+ // Exclude any .socket.facts.json files that happen to be in the scan
92+ // folder before the analysis was run.
9193 const filepathsToUpload = packagePaths . filter (
92- p => ! p . endsWith ( constants . DOT_SOCKET_DOT_FACTS_JSON ) ,
94+ p =>
95+ path . basename ( p ) . toLowerCase ( ) !== constants . DOT_SOCKET_DOT_FACTS_JSON ,
9396 )
9497
9598 spinner ?. start ( 'Uploading manifests for reachability analysis...' )
@@ -151,7 +154,7 @@ export async function performReachabilityAnalysis(
151154 ...( tarHash
152155 ? [ '--run-without-docker' , '--manifests-tar-hash' , tarHash ]
153156 : [ ] ) ,
154- // Empty reachEcosystems implies scan all ecosystems.
157+ // Empty reachEcosystems implies scanning all ecosystems.
155158 ...( reachabilityOptions . reachEcosystems . length
156159 ? [ '--purl-types' , ...reachabilityOptions . reachEcosystems ]
157160 : [ ] ) ,
You can’t perform that action at this time.
0 commit comments