scanner

package
v0.0.0-...-7dfc719 Latest Latest
Warning

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

Go to latest
Published: May 13, 2024 License: Apache-2.0 Imports: 28 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CapabilityTypeSBOM          = "sbom"
	CapabilityTypeVulnerability = "vulnerability"

	VulnerabilityDatabaseUpdatedAt = "harbor.scanner-adapter/vulnerability-database-updated-at"

	MimeTypeOCIArtifact    = "application/vnd.oci.image.manifest.v1+json"
	MimeTypeDockerArtifact = "application/vnd.docker.distribution.manifest.v2+json"

	MimeTypeNativeReport               = "application/vnd.scanner.adapter.vuln.report.harbor+json; version=1.0"
	MimeTypeGenericVulnerabilityReport = "application/vnd.security.vulnerability.report; version=1.1"
	MimeTypeSbomReport                 = "application/vnd.security.sbom.report+json; version=1.0"
)

Variables

View Source
var (
	ErrReportNotFound = errors.New("report not found")
)

Functions

This section is empty.

Types

type SbomPkg

type SbomPkg struct {
	Name             string `json:"name"`
	VersionInfo      string `json:"versionInfo"`
	LicenseConcluded string `json:"licenseConcluded"`
	LicenseDeclared  string `json:"licenseDeclared"`
}

type Scanner

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

func New

func New(cfg *config.Config, db *db.DB) *Scanner

func (*Scanner) GetReport

func (s *Scanner) GetReport(scanRequestId api.ScanRequestId) (*api.HarborVulnerabilityReport, *api.HarborSbomReport, error)

func (*Scanner) Metadata

func (s *Scanner) Metadata() *api.ScannerAdapterMetadata

func (*Scanner) Scan

func (s *Scanner) Scan(scanRequest *api.ScanRequest) (api.ScanRequestId, error)

Jump to

Keyboard shortcuts

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