semgrep

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Aug 2, 2023 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const ConfigFieldName = "semgrep"
View Source
const ConfigType = "Semgrep Config"
View Source
const ReportType = "Semgrep Scan Report"

Variables

This section is empty.

Functions

func NewReportDecoder

func NewReportDecoder() *gce.JSONWriterDecoder[ScanReport]

func NewValidator

func NewValidator() gcv.Validator[semgrep.CliMatch, Config]

func ThresholdRule

func ThresholdRule(matches []semgrep.CliMatch, config Config) error

Types

type Config

type Config struct {
	Error   int `yaml:"error" json:"error"`
	Warning int `yaml:"warning" json:"warning"`
	Info    int `yaml:"info" json:"info"`
}

type ScanReport

ScanReport is a data model for a Semgrep Output scan produced by `semgrep scan --json`

func (ScanReport) String

func (r ScanReport) String() string

Jump to

Keyboard shortcuts

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