scanformat

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Nov 29, 2022 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const SCAVulnerabilityType = "sca"

Variables

This section is empty.

Functions

func GetScanDataCSVFormat

func GetScanDataCSVFormat(w io.Writer, resp *guardrailsclient.GetScanDataResp) error

GetScanDataCSVFormat parses guardrailsclient.GetScanDataResp to csv format.

func GetScanDataJSONFormat

func GetScanDataJSONFormat(w io.Writer, resp *guardrailsclient.GetScanDataResp) error

GetScanDataJSONFormat parses guardrailsclient.GetScanDataResp to json format.

func GetScanDataPrettyFormat

func GetScanDataPrettyFormat(w io.Writer, resp *guardrailsclient.GetScanDataResp) error

GetScanDataPrettyFormat parses guardrailsclient.GetScanDataResp to pretty format.

func GetScanDataSARIFFormat

func GetScanDataSARIFFormat(w io.Writer, resp *guardrailsclient.GetScanDataResp, isQuiet bool) error

GetScanDataJSONFormat parses guardrailsclient.GetScanDataResp to SARIF format.

Types

type Location

type Location struct {
	PhysicalLocation struct {
		ArtifactLocation struct {
			URI string `json:"uri"`
		} `json:"artifactLocation"`
	} `json:"physicalLocation"`
	Region struct {
		StartLine int `json:"startLine"`
	} `json:"region"`
}

type ReportingDescriptor

type ReportingDescriptor struct {
	ID               string `json:"id"`
	Name             string `json:"name"`
	ShortDescription struct {
		Text string `json:"text"`
	} `json:"shortDescription"`
	FullDescription struct {
		Text string `json:"text"`
	} `json:"fullDescription"`
	Help struct {
		Text     string `json:"text"`
		Markdown string `json:"markdown"`
	} `json:"help"`
	Properties struct {
		Tags    []string `json:"tags"`
		Problem struct {
			Severity string `json:"severity"`
		} `json:"problem"`
		SecuritySeverity string `json:"security-severity"`
	} `json:"properties"`
}

type Result

type Result struct {
	RuleID  string `json:"ruleId"`
	Message struct {
		Text string `json:"text"`
	} `json:"message"`
	Locations           []Location `json:"locations"`
	PartialFingerprints struct {
		PrimaryLocationLineHash string `json:"primaryLocationLineHash"`
	} `json:"partialFingerprints"`
}

type Runs

type Runs struct {
	Tool struct {
		Driver ToolComponent `json:"driver"`
	} `json:"tool"`
	Results []Result `json:"results"`
}

type Schema

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

type ToolComponent

type ToolComponent struct {
	Name  string                `json:"name"`
	Rules []ReportingDescriptor `json:"rules"`
}

Jump to

Keyboard shortcuts

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