reporting

package
v1.4.1-0...-be5ad6f Latest Latest
Warning

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

Go to latest
Published: Jun 3, 2025 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ArtifactLocation

type ArtifactLocation struct {
	URI string `json:"uri"`
}

type Driver

type Driver struct {
	Name            string       `json:"name"`
	SemanticVersion string       `json:"semanticVersion"`
	Rules           []*SarifRule `json:"rules,omitempty"`
}

type Locations

type Locations struct {
	PhysicalLocation PhysicalLocation `json:"physicalLocation"`
}

type Message

type Message struct {
	Text string `json:"text"`
}

type PhysicalLocation

type PhysicalLocation struct {
	ArtifactLocation ArtifactLocation `json:"artifactLocation"`
	Region           Region           `json:"region"`
}

type Properties

type Properties map[string]interface{}

type Region

type Region struct {
	StartLine   int     `json:"startLine"`
	StartColumn int     `json:"startColumn"`
	EndLine     int     `json:"endLine"`
	EndColumn   int     `json:"endColumn"`
	Snippet     Snippet `json:"snippet"`
}

type Report

type Report struct {
	TotalItemsScanned int                          `json:"totalItemsScanned"`
	TotalSecretsFound int                          `json:"totalSecretsFound"`
	Results           map[string][]*secrets.Secret `json:"results"`
}

func Init

func Init() *Report

func (*Report) GetOutput

func (r *Report) GetOutput(format string, cfg *config.Config) (string, error)

func (*Report) ShowReport

func (r *Report) ShowReport(format string, cfg *config.Config) error

func (*Report) WriteFile

func (r *Report) WriteFile(reportPath []string, cfg *config.Config) error

type Results

type Results struct {
	Message    Message     `json:"message"`
	RuleId     string      `json:"ruleId"`
	Locations  []Locations `json:"locations"`
	Properties Properties  `json:"properties,omitempty"`
}

type Runs

type Runs struct {
	Tool    Tool      `json:"tool"`
	Results []Results `json:"results"`
}

type Sarif

type Sarif struct {
	Schema  string `json:"$schema"`
	Version string `json:"version"`
	Runs    []Runs `json:"runs"`
}

type SarifRule

type SarifRule struct {
	ID              string   `json:"id"`
	FullDescription *Message `json:"fullDescription,omitempty"`
}

type ShortDescription

type ShortDescription struct {
	Text string `json:"text"`
}

type Snippet

type Snippet struct {
	Text       string     `json:"text"`
	Properties Properties `json:"properties,omitempty"`
}

type Tool

type Tool struct {
	Driver Driver `json:"driver"`
}

Jump to

Keyboard shortcuts

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