PromptShield logo PromptShield
PromptShield WorkspaceAPI DocsFunctions

generateWorkspaceReport()

generateWorkspaceReport(rootPath, allThreats, threatsFound, reportFileName?): Promise<void>

Defined in: workspace.ts:596

Generate a Markdown workspace scan report.

The report is written to: <workspaceRoot>/<PROMPTSHIELD_ARTIFACTS_DIR>/workspace-report.md

The file includes:

  • Timestamp
  • Total threat count
  • Affected file count
  • Grouped threats by file and line number

Existing reports are overwritten.

Parameters

rootPath

string

allThreats

object[]

threatsFound

number

reportFileName?

string = PROMPTSHIELD_REPORT_FILE

Returns

Promise<void>

On this page