intel

package
v0.4.2 Latest Latest
Warning

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

Go to latest
Published: Oct 24, 2026 License: MIT Imports: 8 Imported by: 0

Documentation

Overview

Package intel provides vulnerability intelligence: it matches a software bill of materials (packages + versions) against known-vulnerability databases. The default source is OSV.dev, which aggregates NVD, the GitHub Advisory Database, RustSec, PyPA, the Go vuln DB and more. An offline snapshot can be added later behind the same DB interface.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DB

type DB interface {
	// Query returns the vulns affecting each input package, aligned by index.
	Query(ctx context.Context, pkgs []Package) ([][]Vuln, error)
	// Source names the data source, for provenance.
	Source() string
}

DB is a source of vulnerability intelligence. Live (OSV API) and offline (snapshot) implementations satisfy it.

type OSV

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

OSV queries the live OSV.dev API.

func NewOSV

func NewOSV() *OSV

NewOSV returns a client for the live OSV.dev API.

func (*OSV) Query

func (o *OSV) Query(ctx context.Context, pkgs []Package) ([][]Vuln, error)

Query batches the packages to OSV's querybatch endpoint, then fetches the details for each returned id (cached) and extracts severity and fix.

func (*OSV) Source

func (*OSV) Source() string

type Package

type Package struct {
	Ecosystem string // OSV ecosystem: npm, Go, PyPI, Maven, Packagist, crates.io, RubyGems, NuGet
	Name      string
	Version   string
	PURL      string // package URL, for display/provenance
	File      string // the manifest/lockfile it came from (repo-relative)
}

Package is one component of a bill of materials, in OSV terms.

type Vuln

type Vuln struct {
	ID       string   `json:"id"`
	Aliases  []string `json:"aliases,omitempty"`
	Summary  string   `json:"summary,omitempty"`
	Severity string   // normalized: Critical | High | Medium | Low | Unknown
	Fixed    string   // first fixed version for the queried package, if known
	Ref      string   // a canonical reference URL
}

Vuln is a known vulnerability affecting a package.

Directories

Path Synopsis
Package stack detects a target's technology stack — languages, frameworks, runtimes — from a repo's manifests and from a running app's fingerprint findings.
Package stack detects a target's technology stack — languages, frameworks, runtimes — from a repo's manifests and from a running app's fingerprint findings.

Jump to

Keyboard shortcuts

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