Documentation
¶
Overview ¶
Package report renders a findingspec.FindingSet as a formal, human-readable report.
The Markdown output targets pandoc, so one source converts to DOCX, PDF, or HTML:
pandoc report.md -o report.docx --reference-doc=template.docx pandoc report.md -o report.pdf --pdf-engine=xelatex
It begins with a pandoc YAML metadata block (title, subtitle, author, date, classification, toc) and uses explicit header identifiers ({#id}) so overview rows link to each finding's section.
Reports are written for an Audience. AudienceShareable, the default, leaves out attack detail: exploit preconditions, scenarios and reproduction steps, evidence payloads, and code snippets. AudienceInternal includes them and should stay with the team that owns the findings.
Free-text finding fields (titles, descriptions, root cause, impact, ...) are treated as plain text and escaped, so characters such as *, _, < and @ in a description render literally. The one exception is a matched backtick code span, such as `ParseToken`, which is kept as inline code. Options.Summary, Options.Scope and the Body of each Section are author-supplied Markdown and are written verbatim.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MarkdownString ¶
func MarkdownString(set findingspec.FindingSet, opts Options) (string, error)
MarkdownString renders set to a string. See WriteMarkdown.
func WriteMarkdown ¶
func WriteMarkdown(w io.Writer, set findingspec.FindingSet, opts Options) error
WriteMarkdown renders set as a pandoc-flavoured Markdown report. The set is not modified; findings are ordered by severity, then domain, then ID.
Types ¶
type Options ¶
type Options struct {
// Title is the report title. Defaults to "Findings Report".
Title string
// Subtitle is an optional subtitle, e.g. the system under review.
Subtitle string
// Authors are listed in the metadata block.
Authors []string
// Date is free text, e.g. "2026-10-23" or "October 2026".
Date string
// Classification is a handling label, e.g. "Confidential".
Classification string
// Audience selects how much attack detail is included. Defaults to
// AudienceShareable.
Audience Audience
// Summary is the executive summary in Markdown, written verbatim before
// the severity tables.
Summary string
// Scope describes scope and methodology in Markdown.
Scope string
// Sections are written after the scope and before the findings
// overview, e.g. key themes or a recommended fix order.
Sections []Section
// Appendices are written after the detailed findings.
Appendices []Section
// IncludeAgentPrompts adds each finding's Remediation.AgentPrompt.
IncludeAgentPrompts bool
// NoTOC disables the table of contents requested in the metadata block.
NoTOC bool
}
Options configures a rendered report.