report

package
v0.2.0 Latest Latest
Warning

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

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

Documentation

Overview

Package report writes scan reports in the CLI output formats.

Index

Constants

View Source
const InformationURI = "https://github.com/movray/meles"

InformationURI is the project page named in SARIF output.

Variables

View Source
var Formats = []string{"table", "json", "sarif"}

Formats lists the supported output formats.

Functions

func Repository

func Repository(ref string) string

Repository returns the repository of a reference, e.g. "index.docker.io/library/alpine" for "alpine:3.20".

func SARIF

func SARIF(w io.Writer, reps []*scan.Report, inv Invocation) error

SARIF writes the reports as one SARIF 2.1.0 run. Findings are errors, skipped files warnings (the scan is incomplete); entries an ignore rule takes out of the verdict are suppressed, not left out. Failed scans make the invocation unsuccessful, so that an empty result list never reads as clean.

func Status

func Status(f scan.Finding) string

Status describes a finding's status, e.g. "deleted in layer 4 (whiteout)".

func Table

func Table(w io.Writer, r *scan.Report) error

Table writes a human-readable report.

func Write

func Write(w io.Writer, format string, reps []*scan.Report, inv Invocation) error

Write writes reports in the given format.

Types

type Failure

type Failure struct {
	Ref string
	Err string
}

Failure is a scan that ended with an error.

type Invocation

type Invocation struct {
	// Version of meles.
	Version string
	// Failed lists the scans that ended with an error.
	Failed []Failure
}

Invocation describes the run of meles, for formats that record it.

Jump to

Keyboard shortcuts

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