report

package
v0.12.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 10, 2026 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Overview

Package report renders scan results as text for terminals, Markdown for tickets and pull requests, and JSON for tools. Reports only ever contain names, counts and categories: never sampled values.

Index

Constants

View Source
const Headline = "What a plain copy of this database would carry into staging"

Headline is the question every report answers first.

View Source
const LeakHeadline = "Sampled production values found on this staging database"

LeakHeadline is the question a leak check's report answers first. It says "sampled" and "found" so that a zero under it can't read as "none".

Variables

This section is empty.

Functions

func Count added in v0.12.0

func Count(n int64) string

Count formats a count as reports do: 12,345.

func JSON

func JSON(w io.Writer, res *model.Result) error

JSON writes the full result as indented JSON.

func LeakJSON added in v0.12.0

func LeakJSON(w io.Writer, res *model.LeakResult) error

LeakJSON writes a leak check's result as indented JSON.

func LeakLimits added in v0.12.0

func LeakLimits(n int) []string

LeakLimits is the "How to read this" list. Every report carries it, JSON included, with n, the sample's size, in the odds.

func LeakLine added in v0.12.0

func LeakLine(c model.LeakColumn) string

LeakLine is the report's line about a column, from its numbers.

func LeakText added in v0.12.0

func LeakText(w io.Writer, res *model.LeakResult, colors bool) error

LeakText writes a leak check's terminal report. It says clearly what it can't know, since the worst it could do is read as "staging is fine".

func Markdown

func Markdown(w io.Writer, res *model.Result) error

Markdown writes the report as Markdown, for tickets, pull requests and audit folders.

func Text

func Text(w io.Writer, res *model.Result, opts TextOptions) error

Text writes the terminal report.

Types

type TextOptions

type TextOptions struct {
	Color         bool // use ANSI colours
	Verbose       bool // also list low-confidence matches, relationships and full evidence
	ConfigWritten bool // a starter config was written. Its path isn't printed: it may be a secret typed in the wrong place
}

TextOptions control the terminal report.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL