Versions in this module Expand all Collapse all v0 v0.0.1 Nov 29, 2026 Changes in this version + const ConfidenceConfident + const ConfidenceTentative + const MBRecentURL + const ScopeDevelopment + const ScopeOptional + const ScopePeer + const ScopeProduction + const ScopeProvided + const ScopeRuntime + const ScopeSystem + const ScopeTest + const SeveritySkip + const SourceTypeBinary + const SourceTypeCommand + const SourceTypeContainer + const SourceTypeInstalled + const SourceTypeManifest + var ManifestExtensions = map[string]ManifestInfo + var ManifestFiles = map[string]ManifestInfo + var SupportedManifestTypes = map[string]bool + var ValidExploitThresholds = []string + var ValidSeverityThresholds = []string + func BulkHashlookup(ctx context.Context, sha1s []string) (map[string]*HashlookupResult, error) + func CheckMalwareBazaarInMemory(corpus map[string]bool, sha256 string) bool + func CheckMalwareBazaarLocal(corpusPath, sha256 string) (bool, error) + func ComparableVersion(ecosystem, v string) string + func ComputeEnrichedSeverities(ev *EnrichedVuln) + func DownloadMalwareBazaarRecent(ctx context.Context, destPath string) error + func EvaluateAffectedEntry(am map[string]interface{}, installedVer, ecosystem string) (string, versions.Status, string) + func ExploitMeetsThreshold(ev EnrichedVuln, threshold string) bool + func HasAnyKev(ev EnrichedVuln) bool + func IsCIPipelineFile(info *ManifestInfo) bool + func IsPythonGatedManifest(manifestType string) bool + func IsResolvedVersion(v string) bool + func IsVersionAffected(installedVersion, versionRange, ecosystem string) bool + func IsVersionSpecPinned(spec string) bool + func LoadMalwareBazaarCorpusFromFile(path string) (map[string]bool, error) + func NormaliseReleaseForEOL(product, version string) string + func NpmLockfilePresent(packageJSONPath string) bool + func NpmWorkspaceMemberManifests(rootDir string) []string + func PackageManagerOf(f DetectedFile, present map[string]bool) string + func PackageManagers() []string + func ParseRemediationScores(data map[string]interface{}, ev *EnrichedVuln) + func PopulateInstalledEdges(groups []ManifestGroup, rootPath string) + func PyLockfilePresent(dir string) bool + func RequirementsFullyLocked(pkgs []ScopedPackage) bool + func SSVCToSeverity(decision string) string + func ScopeIcon(scope string) string + func ScoreToSeverity(scoreType string, score float64) string + func SeverityLevel(severity string) int + func SeverityMeetsThreshold(severity, threshold string) bool + func StripGemPlatform(v string) string + func SynthesiseFromCDX(cdxDoc map[string]any, packages []ScopedPackage, purls []string) (findings []VulnFinding, enriched []EnrichedVuln, stats *LookupStats) + func ValidateAnalyzeRequest(body []byte) error + func VerifyLocationGone(rootPath string, loc memory.Location, lineSlack int) (bool, string) + type AffectedAnswer struct + Data map[string]any + Err error + type AffectedBatchFetcher func(ctx context.Context, queries []AffectedQuery) []AffectedAnswer + type AffectedFetcher func(ctx context.Context, id, pkgName, ecosystem string) (map[string]any, error) + type AffectedQuery struct + Ecosystem string + ID string + PkgName string + type AffectedSymbols struct + Files []string + Modules []string + Routines []string + func (a *AffectedSymbols) HasAny() bool + type BinaryAnalysis struct + Capabilities []string + ELFArch string + ELFOSABI string + ELFType string + Error string + Exif map[string]any + Hashes BinaryHashes + ModTime int64 + Path string + Size int64 + Strings []string + Weaknesses []string + type BinaryHashes struct + MD5 string + MD5Raw string + SHA1 string + SHA1Raw string + SHA256 string + SHA256Raw string + SSDEEP string + TLSH string + type BinaryResult struct + Capabilities []string + ELFArch string + ELFOSABI string + ELFType string + Exif map[string]any + Hashes BinaryHashes + Hashlookup *HashlookupResult + MalwareBazaar *MalwareBazaarResult + Path string + Size int64 + Strings []string + Weaknesses []string + type BinaryScanOptions struct + ByteBudget int64 + Concurrency int + type DepGraph struct + AllDeps map[string]ScopedPackage + DirectDeps map[string]ScopedPackage + EdgeRanges map[string]map[string]string + Edges map[string][]string + func BuildGenericDepGraph(directPkgs, lockPkgs []ScopedPackage) *DepGraph + func BuildGoDepGraph(goModPkgs, goSumPkgs []ScopedPackage) *DepGraph + func BuildNpmDepGraph(pkgJsonPkgs, lockPkgs []ScopedPackage) *DepGraph + func BuildPypiDepGraph(directPkgs, lockPkgs []ScopedPackage) *DepGraph + func (g *DepGraph) DirectCount() int + func (g *DepGraph) FindPath(targetPkg string) []string + func (g *DepGraph) FindPathMemo(target string) []string + func (g *DepGraph) IsDirect(pkgName string) bool + func (g *DepGraph) PopulateBunLockEdges(lockFilePath string) error + func (g *DepGraph) PopulateCargoLockEdges(dir string) + func (g *DepGraph) PopulateComposerLockEdges(dir string) + func (g *DepGraph) PopulateGemfileLockEdges(dir string) + func (g *DepGraph) PopulateGoModGraph(dir string) error + func (g *DepGraph) PopulateMixLockEdges(dir string) + func (g *DepGraph) PopulateNpmLockEdges(lockFilePath string) error + func (g *DepGraph) PopulateNugetLockEdges(dir string) + func (g *DepGraph) PopulatePypiLockEdges(dir string) + func (g *DepGraph) TransitiveCount() int + type DetectedFile struct + FileType FileType + ManifestInfo *ManifestInfo + Path string + RelPath string + SBOMVersion string + Supported bool + func WalkForScanFiles(opts WalkOptions) ([]DetectedFile, error) + type EOLHorizon string + const EOLBeyond + const EOLNextQuarter + const EOLRetired + const EOLThisQuarter + const EOLWithin30Days + func EOLHorizonOf(eolFrom string, now time.Time) EOLHorizon + type EOLSeverityBuckets struct + NextQuarter string + Retired string + ThisQuarter string + Within30Days string + func DefaultEOLSeverityBuckets() EOLSeverityBuckets + func (b EOLSeverityBuckets) SeverityFor(h EOLHorizon) (string, bool) + type EnrichOptions struct + SkipAffected bool + SkipExploits bool + SkipRemediation bool + type EnrichedVuln struct + AffectedRange string + AffectedSymbols *AffectedSymbols + CESSeverity string + CVSSScore float64 + CVSSSeverity string + CoalitionESS float64 + Confirmed bool + EPSSPercentile float64 + EPSSScore float64 + EPSSSeverity string + ExploitIntel *ExploitSummary + FixAvailability string + IDSRules []IDSRule + IsMalicious bool + MatchMethod string + MaxSeverity string + PathCount int + Reachability string + ReachabilityAssessed bool + ReachabilityQueryHashes []string + Remediation *RemediationInfo + SSVCDecision string + SSVCSeverity string + SemanticMatches []SemanticMatch + ThreatExposure float64 + VersionStatus string + type ExploitSummary struct + ExploitCount int + HasWeaponized bool + HighestMaturity string + Sources []string + type FileType string + const FileTypeCycloneDX + const FileTypeManifest + const FileTypeSPDX + const FileTypeUnknown + func DetectSBOM(filePath string) (FileType, string, bool) + type HashlookupParent struct + MD5 string + PackageArch string + PackageDescription string + PackageName string + PackageRelease string + PackageVersion string + SHA1 string + SHA256 string + type HashlookupResult struct + FileName string + FileSize string + InsertTimestamp string + MD5 string + PackageName string + PackageVersion string + Parents []HashlookupParent + SHA1 string + SHA256 string + SHA512 string + SSDEEP string + Source string + TLSH string + type IDSRule struct + Content string + CveID string + Source string + Type string + func CollectIDSRules(vulns []EnrichedVuln) []IDSRule + type LookupStats struct + Cancelled int + Failed int + Skipped int + Succeeded int + Total int + type MalwareBazaarResult struct + FileName string + Malicious bool + type ManagerScope struct + Not []string + Only []string + func NewManagerScope(only, not []string) (ManagerScope, error) + func (s ManagerScope) Active() bool + func (s ManagerScope) Filter(files []DetectedFile) []DetectedFile + type ManifestGroup struct + Dir string + Ecosystem string + Files []string + Graph *DepGraph + Packages []ScopedPackage + func BuildManifestGroups(filePackages map[string][]ScopedPackage, fileEcosystems map[string]string) []ManifestGroup + type ManifestInfo struct + Confidence string + Ecosystem string + IsLock bool + Language string + Type string + func DetectManifest(filename string) (*ManifestInfo, bool) + type NpmWorkspace struct + LockPath string + RootDir string + func FindNpmWorkspace(memberDir string) (NpmWorkspace, bool) + type PackageChecksum = parse.PackageChecksum + type RegistryEndpoint = parse.RegistryEndpoint + func ParseRegistryConfig(filePath, ecosystem string) []RegistryEndpoint + func SummarizeRegistryConfigs(files []DetectedFile) []RegistryEndpoint + type RemediationInfo struct + Actions []string + FixAvailability string + FixVersion string + type ResolveStats struct + Candidates int + Failed int + Fetches int + NotAffected int + Resolved int + func ResolveUnverified(ctx context.Context, vulns []EnrichedVuln, fetch AffectedFetcher, workers int) ResolveStats + func ResolveUnverifiedBatched(ctx context.Context, vulns []EnrichedVuln, fetch AffectedFetcher, ...) ResolveStats + type ResolvedBinary struct + Authoritative bool + Binary string + BinaryPath string + Detected bool + Ecosystem string + Version string + VersionCommand string + func ResolvePackageManagerBinaries(presentFiles []string) []ResolvedBinary + type RuntimePin struct + Product string + RawVersion string + Release string + SourceFile string + func DetectRuntimeVersionPins(rootPath string) []RuntimePin + type ScanResult struct + Binaries []BinaryResult + ELFCount int + Errors []string + Path string + ScannerRunUUID string + Total int + func ScanContainerFilesystem(root string) *ScanResult + func ScanContainerFilesystemWithOptions(root string, opts BinaryScanOptions) *ScanResult + func (sr *ScanResult) SetScannerRunUUID(uuid string) + func (sr *ScanResult) ToJSON() ([]byte, error) + type ScopedPackage = parse.ScopedPackage + func ApplyBuildOrLockGate(eco, manifestType, manifestPath, relPath string, confident bool, ...) (resolved []ScopedPackage, dropFile bool, err error) + func ParseManifestWithScope(filePath, manifestType string) ([]ScopedPackage, error) + func ResolveCargoFromInstalled(manifestPath, relPath string, declared []ScopedPackage, strict bool) ([]ScopedPackage, error) + func ResolveComposerFromInstalled(manifestPath, relPath string, declared []ScopedPackage, strict bool) ([]ScopedPackage, error) + func ResolveGemsFromInstalled(manifestPath, relPath string, declared []ScopedPackage, strict bool) ([]ScopedPackage, error) + func ResolveHexFromInstalled(manifestPath, relPath string, declared []ScopedPackage, strict bool) ([]ScopedPackage, error) + func ResolveJavaFromInstalled(manifestPath, relPath string, declared []ScopedPackage, strict bool) ([]ScopedPackage, error) + func ResolveNpmPackageJSONFromNodeModules(packageJSONPath, relPath string, direct []ScopedPackage) ([]ScopedPackage, error) + func ResolveNugetFromInstalled(manifestPath, relPath string, declared []ScopedPackage, strict bool) ([]ScopedPackage, error) + func ResolvePubFromInstalled(manifestPath, relPath string, declared []ScopedPackage, strict bool) ([]ScopedPackage, error) + func ResolvePythonRequirementsFromSitePackages(manifestPath, relPath string, declared []ScopedPackage, strict bool) ([]ScopedPackage, error) + type SemanticMatch struct + File string + Kind string + Line int + Symbol string + type Verdict string + const VerdictAffected + const VerdictLikelyNotAffected + const VerdictNotAffected + const VerdictUnverified + func (v Verdict) Counts() bool + func (v Verdict) Label() string + type VerdictResult struct + AnyUpgradeClears bool + Basis string + Confidence string + Detail string + FixedIn string + FixedInSource string + Installed string + MatchedBy string + Range string + Verdict Verdict + func EvaluateVerdict(ev EnrichedVuln) VerdictResult + type VulnFinding struct + Aliases []string + CveID string + Ecosystem string + ExploitCount int + InCisaKev bool + InEuKev bool + InVulnCheckKev bool + MetricType string + PackageName string + PackageVer string + Scope string + Score float64 + Severity string + Source string + SourceFile string + VectorString string + type WalkOptions struct + Excludes []string + MaxDepth int + RespectGitignore bool + RootPath string