gotrivy

package module
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Nov 4, 2023 License: MIT Imports: 7 Imported by: 0

README

GoTrivy

Build Status Go Report Card Docs License

gotrivy is a Golang helper for github.com/aquasecurity/trivy (reference).

Installation

go install github.com/grokify/cmd/gotrivy

Usage

gotrivy -i <path-to-report.json> [-o path-to-report.xlsx]

If an output file isn't provided, a default output filename and path is used setting the filename to the original filename with a .xlsx suffix in the current directory.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrReportNotLoaded = errors.New("report not loaded")

Functions

func DetectedVulnerabilitiesTable

func DetectedVulnerabilitiesTable(vulns []types.DetectedVulnerability) (*table.Table, error)

Types

type Report

type Report struct {
	*types.Report
}

Report is an extended struct for `github.com/aquasecurity/trivy/pkg/types.Report`.

func ReadFile

func ReadFile(filename string) (*Report, error)

func (*Report) ResultsCount

func (r *Report) ResultsCount() int

func (*Report) SeverityCounts

func (r *Report) SeverityCounts() map[string]uint

SeverityCounts returns the number of vulnerabiltiies detected by severity.

func (*Report) TableSet

func (r *Report) TableSet() (*table.TableSet, error)

func (*Report) VulnerabiliesTable

func (r *Report) VulnerabiliesTable() (*table.Table, error)

VulnerabiliesTable returns a table of vulnerabilities with a column for result set. It is formatted with Markdown links which can be rendered in XLSX using `github.com/grokify/gocharts/data/table`.

func (*Report) VulnerabilityCount

func (r *Report) VulnerabilityCount() int

Directories

Path Synopsis
cmd
gotrivy command

Jump to

Keyboard shortcuts

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