Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ColorSeverity ¶
ColorSeverity wraps a severity string with ANSI codes when colored is true. When colored is false the string is returned unchanged (CI-safe default).
func RenderTable ¶
func RenderTable(w io.Writer, findings []models.Finding, opts TableOptions)
RenderTable writes a formatted findings table to w. Columns are dynamically selected based on opts; the separator line width is derived from the header row so all rows align correctly.
Column order:
RESOURCE ID [PROFILE] LOCATION SEVERITY [DOMAIN] TYPE MESSAGE [SAVINGS/MO]
func ShortenMessage ¶
ShortenMessage truncates msg to at most max runes, appending "..." when truncated. max is treated as at least 4 to guarantee space for the ellipsis.
Types ¶
type TableOptions ¶
type TableOptions struct {
// Colored wraps severity labels with ANSI codes. Default false (CI-safe).
Colored bool
// IncludeSavings adds a SAVINGS/MO column when any finding has EstimatedMonthlySavings > 0.
IncludeSavings bool
// IncludeDomain adds a DOMAIN column.
IncludeDomain bool
// IncludeProfile adds a PROFILE column (useful with --all-profiles).
IncludeProfile bool
// LocationLabel is the column header for the region/context column.
// Defaults to "REGION". Use "CONTEXT" for Kubernetes audits.
LocationLabel string
}
TableOptions controls which columns RenderTable renders and how severity is coloured.
Click to show internal directories.
Click to hide internal directories.