Skip to content

Commit 0e4c6c0

Browse files
committed
Add more debug for ghsa details
1 parent e4ac4ac commit 0e4c6c0

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

src/commands/fix/coana-fix.mts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import path from 'node:path'
22

3+
import { joinAnd } from '@socketsecurity/registry/lib/arrays'
34
import { debugDir, debugFn } from '@socketsecurity/registry/lib/debug'
45
import { logger } from '@socketsecurity/registry/lib/logger'
56

@@ -142,7 +143,9 @@ export async function coanaFix(
142143
return { ok: true, data: { fixed: false } }
143144
}
144145

146+
debugFn('notice', `fetch: ${ids.length} GHSA details for ${joinAnd(ids)}`)
145147
const ghsaDetails = await fetchGhsaDetails(ids)
148+
debugFn('notice', `found: ${ghsaDetails.size} GHSA details`)
146149
const scanBaseNames = new Set(scanFilepaths.map(p => path.basename(p)))
147150

148151
let count = 0
@@ -204,7 +207,9 @@ export async function coanaFix(
204207

205208
debugFn('notice', `pr: creating for ${id}`)
206209

207-
const summary = ghsaDetails.get(id)?.summary
210+
const details = ghsaDetails.get(id)
211+
const summary = details?.summary
212+
debugFn('notice', `ghsa: ${id} details ${details ? 'found' : 'missing'}`)
208213

209214
const pushed =
210215
// eslint-disable-next-line no-await-in-loop

0 commit comments

Comments
 (0)