MCPcopy
hub / github.com/promptfoo/promptfoo / parseScanOutput

Function parseScanOutput

code-scan-action/src/main.ts:309–315  ·  view source on GitHub ↗
(scanOutput: string)

Source from the content-addressed store, hash-verified

307}
308
309function parseScanOutput(scanOutput: string): ScanResponse {
310 try {
311 return JSON.parse(scanOutput);
312 } catch (error) {
313 throw new Error(`Failed to parse CLI output as JSON: ${formatError(error)}`);
314 }
315}
316
317async function runPromptfooScan(
318 cliArgs: string[],

Callers 1

runPromptfooScanFunction · 0.85

Calls 2

parseMethod · 0.80
formatErrorFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…