Documentation ¶
Index ¶
- func CreateSafeFileName(input string) string
- func FormatMarkdownTable(headers []string, rows [][]string) string
- func FormatSection(title string, content string) string
- func SaveToFile(report string, filename string) error
- func SeverityValue(severity string) int
- type CVE
- type ImageChange
- type JSONReport
- type SeverityCount
- type SortableCVE
- type SortableCVEList
- type Summary
- type Vulnerability
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateSafeFileName ¶
CreateSafeFileName creates a safe filename from a string by removing special characters
func FormatMarkdownTable ¶
Common table formatting functions
func FormatSection ¶
Common report section formatting
func SaveToFile ¶
SaveToFile saves the report to a file in the working-files directory
Types ¶
type CVE ¶
type CVE struct { ID string `json:"id"` Severity string `json:"severity"` AffectedImages []string `json:"affected_images,omitempty"` }
func ConvertToJSONCVEs ¶
func ConvertToJSONCVEs(cves map[string]map[string]Vulnerability) []CVE
ConvertToJSONCVEs now accepts a map of Vulnerability interface
type ImageChange ¶
type JSONReport ¶
type SeverityCount ¶
type SortableCVE ¶
Update type definitions to be exported (uppercase)
type SortableCVEList ¶
type SortableCVEList []SortableCVE
func (SortableCVEList) Len ¶
func (s SortableCVEList) Len() int
func (SortableCVEList) Less ¶
func (s SortableCVEList) Less(i, j int) bool
func (SortableCVEList) Swap ¶
func (s SortableCVEList) Swap(i, j int)
type Summary ¶
type Summary struct { SeverityCounts []SeverityCount `json:"severity_counts"` ImageChanges []ImageChange `json:"image_changes,omitempty"` }
type Vulnerability ¶
Vulnerability interface that both packages' vulnerability types must implement
Click to show internal directories.
Click to hide internal directories.