scan

package
v0.0.0-...-c20d9b3 Latest Latest
Warning

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

Go to latest
Published: Sep 23, 2025 License: AGPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Extra

type Extra struct {
	EngineKind      string             `json:"engine_kind"`
	Fingerprint     string             `json:"fingerprint"`
	Fix             string             `json:"fix"`
	IsIgnored       bool               `json:"is_ignored"`
	Lines           string             `json:"lines"`
	Message         string             `json:"message"`
	Metadata        Metadata           `json:"metadata"`
	Metavars        map[string]Metavar `json:"metavars"`
	Severity        string             `json:"severity"`
	ValidationState string             `json:"validation_state"`
}

type Metadata

type Metadata struct {
	AbstractFeysh map[string]string `json:"abstract_feysh"`
	Category      string            `json:"category"`
	CategoryFeysh map[string]string `json:"category_feysh"`
	Confidence    string            `json:"confidence"`
	Cwe           any               `json:"cwe,omitempty"`
	FeyshID       string            `json:"feysh_id"`
	Gb            []string          `json:"gb,omitempty"`
	Impact        string            `json:"impact"`
	License       string            `json:"license"`
	MessageZh     string            `json:"message_zh"`
	NameFeysh     map[string]string `json:"name_feysh"`
	Owasp         any               `json:"owasp,omitempty"`
}

type Metavar

type Metavar struct {
	AbstractContent string   `json:"abstract_content"`
	End             Position `json:"end"`
	Start           Position `json:"start"`
}

type Position

type Position struct {
	Col    int `json:"col"`
	Line   int `json:"line"`
	Offset int `json:"offset"`
}

type Result

type Result struct {
	ID      string
	Output  string
	Prefix  string
	Results []*ResultItem `json:"results"`
}

func Scan

func Scan(id string, workspace, rule string) (*Result, error)

type ResultItem

type ResultItem struct {
	CheckID string   `json:"check_id"`
	End     Position `json:"end"`
	Extra   Extra    `json:"extra"`
	Path    string   `json:"path"`
	Start   Position `json:"start"`
}

Jump to

Keyboard shortcuts

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