Skip to content

Commit ef3f347

Browse files
authored
upload all manifests files when running socket scan create --reach (#720)
1 parent 54c6d50 commit ef3f347

File tree

2 files changed

+10
-4
lines changed

2 files changed

+10
-4
lines changed

src/commands/scan/handle-create-new-scan.mts

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -151,9 +151,14 @@ export async function handleCreateNewScan({
151151

152152
logger.success('Reachability analysis completed successfully')
153153

154-
scanPaths = reachResult.data?.reachabilityReport
155-
? [reachResult.data.reachabilityReport]
156-
: []
154+
scanPaths = [
155+
...packagePaths.filter(
156+
// Ensure the .socket.facts.json isn't duplicated in case it happened
157+
// to be in the scan folder before the analysis was run.
158+
p => !p.endsWith(constants.DOT_SOCKET_DOT_FACTS_JSON),
159+
),
160+
reachResult.data?.reachabilityReport,
161+
]
157162
tier1ReachabilityScanId = reachResult.data?.tier1ReachabilityScanId
158163
}
159164

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,8 @@ export async function performReachabilityAnalysis(
8585

8686
const wasSpinning = !!spinner?.isSpinning
8787

88-
// Exclude .socket.facts.json from upload.
88+
// Exclude any .socket.facts.json files that happen to be
89+
// in the scan folder before the analysis was run.
8990
const filepathsToUpload = packagePaths.filter(
9091
p => !p.endsWith(constants.DOT_SOCKET_DOT_FACTS_JSON),
9192
)

0 commit comments

Comments
 (0)