advisory

package
v0.2.5 Latest Latest
Warning

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

Go to latest
Published: Jun 9, 2026 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
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

func CompileBlocklists() (outPath string, count int, err error)

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:

  1. ~/.devscan/resources/ — primary user location
  2. <executable dir>/resources/ — bundled defaults
  3. <cwd>/resources/ — dev convenience

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

func NewClient

func NewClient(noCache bool) *Client

func (*Client) QueryPackages

func (c *Client) QueryPackages(packages []schema.Package) ([]schema.Vulnerability, error)

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.

Jump to

Keyboard shortcuts

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