securityscan

package
v0.18.0 Latest Latest
Warning

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

Go to latest
Published: Sep 16, 2026 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FormatFinding

func FormatFinding(f Finding, githubActions bool) string

func GitFiles

func GitFiles(root, diffBase string) ([]string, error)

Types

type BinaryAllowance

type BinaryAllowance struct {
	Path   string `json:"path"`
	SHA256 string `json:"sha256"`
	Reason string `json:"reason"`
}

type EditorExtension

type EditorExtension struct {
	ID        string `json:"id"`
	Publisher string `json:"publisher"`
	Version   string `json:"version"`
}

type Finding

type Finding struct {
	Path    string
	Line    int
	Column  int
	Title   string
	Message string
}

type Policy

type Policy struct {
	BinaryAllowlist  []BinaryAllowance  `json:"binary_allowlist"`
	UnicodeAllowlist []UnicodeAllowance `json:"unicode_allowlist"`
	EditorExtensions []EditorExtension  `json:"editor_extensions"`
}

func LoadPolicy

func LoadPolicy(path string, now time.Time) (Policy, error)

type Scanner

type Scanner struct {
	Root   string
	Policy Policy
}

func (Scanner) Scan

func (s Scanner) Scan(paths []string) ([]Finding, error)

type UnicodeAllowance

type UnicodeAllowance struct {
	Path      string `json:"path"`
	CodePoint string `json:"code_point"`
	Reason    string `json:"reason"`
	Expires   string `json:"expires"`
}

Jump to

Keyboard shortcuts

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