Skip to contents

Formats scanner findings for console, Markdown, or HTML presentation.

Usage

explain_findings(findings, format = "text")

Arguments

findings

A list of finding lists, usually from a shieldr_report.

format

One of "text", "markdown", or "html".

Value

A character vector of formatted finding explanations.

Details

explain_findings() is a presentation helper. It does not rescore or reclassify findings; it formats the finding metadata already present in a shieldr_report(). Console output uses severity-colored bullets. Markdown and HTML outputs return character vectors suitable for reports, notebooks, or lightweight dashboards.

Examples

report <- scan_prompt("email me at neel@example.com", policy("enterprise_default"))
explain_findings(report$findings)
#>  llm02.pii.email [medium, llm02]: Email address.
#> [1] "llm02.pii.email [medium, llm02]: Email address."