Skip to content

Commit 429d6cc

Browse files
authored
upload manifest files relative to target for coana-fix and perform-r… (#943)
* upload manifest filess relative to target for coana-fix and perform-reachability-analysis * slightly more verbose, but hopefully more intuitive relative path argument for uploadManifestFiles add comment
1 parent fef3e1e commit 429d6cc

File tree

3 files changed

+8
-3
lines changed

3 files changed

+8
-3
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "socket",
3-
"version": "1.1.35",
3+
"version": "1.1.36",
44
"description": "CLI for Socket.dev",
55
"homepage": "https://github.com/SocketDev/socket-cli",
66
"license": "MIT AND OFL-1.1",

src/commands/fix/coana-fix.mts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ export async function coanaFix(
155155
p => path.basename(p).toLowerCase() !== DOT_SOCKET_DOT_FACTS_JSON,
156156
)
157157
const uploadCResult = await handleApiCall(
158-
sockSdk.uploadManifestFiles(orgSlug, filepathsToUpload),
158+
sockSdk.uploadManifestFiles(orgSlug, filepathsToUpload, cwd),
159159
{
160160
description: 'upload manifests',
161161
spinner,

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

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,8 +106,13 @@ export async function performReachabilityAnalysis(
106106

107107
spinner?.start('Uploading manifests for reachability analysis...')
108108

109+
// Ensure uploaded manifest files are relative to analysis target as coana resolves SBOM manifest files relative to this path
109110
const uploadCResult = await handleApiCall(
110-
sockSdk.uploadManifestFiles(orgSlug, filepathsToUpload),
111+
sockSdk.uploadManifestFiles(
112+
orgSlug,
113+
filepathsToUpload,
114+
path.resolve(cwd, analysisTarget),
115+
),
111116
{
112117
description: 'upload manifests',
113118
spinner,

0 commit comments

Comments
 (0)