Documentation
¶
Index ¶
Constants ¶
const CompiledIndexName = "devscan.json"
CompiledIndexName is the filename written by CompileBlocklists and given priority over raw source files during matching.
Variables ¶
This section is empty.
Functions ¶
func CompileBlocklists ¶ added in v0.2.2
CompileBlocklists merges all raw source files into a single compiled index at compiledIndexPath() and returns a summary of what was written. It returns the output path and total entry count.
func MatchBlocklists ¶ added in v0.2.2
func MatchBlocklists(packages []schema.Package) ([]schema.Vulnerability, error)
MatchBlocklists checks the given packages against all loaded blocklist files and returns synthetic Vulnerability entries for any matches.
func ResourceDirs ¶ added in v0.2.2
func ResourceDirs() []string
ResourceDirs returns the directories that are searched for raw blocklist source files (*.csv, *.json). Earlier entries take priority.
Priority:
- ~/.devscan/resources/ — primary user location
- <executable dir>/resources/ — bundled defaults
- <cwd>/resources/ — dev convenience
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func (*Client) QueryPackages ¶
QueryPackages queries OSV for vulnerabilities across a set of packages.
type CompiledEntry ¶ added in v0.2.2
type CompiledEntry struct {
Ecosystem string `json:"ecosystem"`
Name string `json:"name"`
Version string `json:"version,omitempty"`
Reason string `json:"reason,omitempty"`
Sources []string `json:"sources,omitempty"`
}
CompiledEntry is the on-disk schema for a compiled blocklist entry. It is also the generic JSON shape accepted by parseGenericJSON.
type UserAdvisory ¶ added in v0.3.3
type UserAdvisory struct {
Ecosystem string `yaml:"ecosystem"`
Package string `yaml:"package"`
// Version may be a specific version ("1.2.3") or "*" / "" to match all versions.
Version string `yaml:"version"`
Severity string `yaml:"severity"`
Reason string `yaml:"reason"`
Reference string `yaml:"reference"`
}
UserAdvisory is one entry in a .devscan/advisories.yaml file.