Documentation
¶
Overview ¶
Package report renders a case into analyst-facing outputs. HTML reports are network-silent by construction (plan §24): no external resource loads, a restrictive CSP meta tag, and every evidence-derived string HTML-escaped and control/invisible-char sanitized before it reaches the document.
Index ¶
- Variables
- func ReadCaseInfo(pkgDir string) (*casepkg.CaseInfo, error)
- func ReadManifest(pkgDir string) (*casepkg.Manifest, error)
- func WriteFindingsCSV(c *Case, path string) error
- func WriteHTML(c *Case, path string) error
- func WriteJSON(c *Case, path string) error
- func WritePDF(c *Case, custody []CustodyRecord, signature string, path string, ...) (int, error)
- func WriteTimelineCSV(c *Case, path string) error
- type Case
- type CustodyRecord
- type PDFOptions
- type TimelineStats
Constants ¶
This section is empty.
Variables ¶
var MaxHTMLRows = 2000
MaxHTMLRows caps timeline/inventory rows in HTML (full data lives in normalized/events.jsonl and reports/timeline.csv).
Functions ¶
func ReadCaseInfo ¶
ReadCaseInfo loads case.json from a package.
func ReadManifest ¶
ReadManifest loads manifest.json from a package.
func WriteFindingsCSV ¶
WriteFindingsCSV writes findings as CSV.
func WritePDF ¶ added in v0.6.0
func WritePDF(c *Case, custody []CustodyRecord, signature string, path string, opts PDFOptions) (int, error)
WritePDF renders the case as a PDF report. Returns the number of non-WinAnsi runes replaced (reported to the operator, never hidden).
func WriteTimelineCSV ¶
WriteTimelineCSV writes the timeline as CSV.
Types ¶
type Case ¶
type Case struct {
Manifest *casepkg.Manifest
CaseInfo *casepkg.CaseInfo
Verify *casepkg.VerifyResult
Events []schema.Event
Entities []schema.Entity
Findings []schema.Finding
}
Case bundles everything a report renders.
type CustodyRecord ¶ added in v0.6.0
CustodyRecord is one decoded chain-of-custody line.
func ReadCustody ¶ added in v0.6.0
func ReadCustody(pkgDir string) ([]CustodyRecord, error)
ReadCustody decodes chain-of-custody.jsonl for reporting.
type PDFOptions ¶ added in v0.6.0
PDFOptions tunes the excerpt sizes.
type TimelineStats ¶ added in v0.6.0
type TimelineStats struct {
Written int
Undated int // events without a parsable timestamp (omitted from Timesketch; written to l2tcsv with a blank date)
}
TimelineStats reports what an export wrote.
func WriteL2TCSV ¶ added in v0.6.0
func WriteL2TCSV(c *Case, path string) (TimelineStats, error)
WriteL2TCSV writes the timeline in l2tcsv format (Plaso psort's classic output), consumable by Timesketch, Autopsy, Magnet and spreadsheet triage. Undated events are kept with blank date/time so nothing disappears; they are counted for the caller to report.
func WriteTimesketchJSONL ¶ added in v0.6.0
func WriteTimesketchJSONL(c *Case, path string) (TimelineStats, error)
WriteTimesketchJSONL writes one Timesketch-importable JSON object per line: required keys message/datetime/timestamp_desc plus flat AgentDFIR attributes that become searchable fields. Events without a parsable timestamp are omitted (Timesketch rejects them) and counted.