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.