scansource

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Aug 4, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Package scansource adapts SCANOSS SDK values — a v3 scan result and the licenses, vulnerabilities, cryptography and geoprovenance decoration responses — into the neutral sbom.Inventory consumed by the sbom package. It is the only SBOM code that depends on the scan SDK; the sbom package itself stays SDK-free.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Cryptography added in v0.7.0

Cryptography maps a cryptography-algorithms decoration response into algorithms keyed by Key(purl, requirement).

func Geoprovenance added in v0.7.0

func Geoprovenance(resp *scanossapi.GeoOriginResponse) map[string][]sbom.GeoLocation

Geoprovenance maps a geoprovenance-origin decoration response into contributor locations keyed by PURL (the response carries no requirement to join on).

func Inventory added in v0.7.0

func Inventory(result *scanossapi.ScanResult) sbom.Inventory

Inventory builds one from a v3 scan result. The deduplicated component catalog becomes the components; each component's matched files (joined by url_hash) become its file evidence. The version is taken from the component entry. Licenses and vulnerabilities are not populated here — they come from the decoration services (see Licenses, Vulnerabilities).

func Key added in v0.7.0

func Key(purl, version string) string

Key is the join key matching a decoration response entry to a component: its PURL plus the queried version (the decoration echoes the queried version back as `requirement`). It identifies a component at a version, so every per-component layer shares it — licenses and cryptography today — which is why it is named after none of them.

func Licenses added in v0.7.0

Licenses maps a licenses decoration response into declared licenses keyed by Key(purl, requirement). Duplicate ids per key are dropped. (The decoration service has no declared/concluded distinction — its licenses are declared.)

func Vulnerabilities added in v0.7.0

func Vulnerabilities(resp *scanossapi.VulnerabilitiesResponse) []sbom.Vulnerability

Vulnerabilities maps a vulnerabilities decoration response into neutral vulnerabilities, deduplicated by id (falling back to the CVE), accumulating the affected component PURLs.

Types

This section is empty.

Jump to

Keyboard shortcuts

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