Documentation ¶
Index ¶
- Constants
- func GetAllOutputFormat() string
- func IsValidOutputFormat(format string) bool
- func NewAddress() (*urn.URN, error)
- type AttestationConfig
- type AttestationOptions
- type Component
- type Config
- type GoBinary
- type ImageInfo
- type Layer
- type ManifestFile
- type OSRelease
- type OutputFormat
- type Parameters
- type Payload
- type RegistryConfig
- type Release
- type RpmDB
- type Rule
- type SLSA
- type ScanType
- type Secret
- type SecretConfig
- type SoftwareManifest
- type Whitelist
Constants ¶
View Source
const ( Image ScanType = 1 Tarball ScanType = 2 Filesystem ScanType = 3 JSON OutputFormat = "json" Table OutputFormat = "table" CycloneDXJSON OutputFormat = "cdx-json" CycloneDXXML OutputFormat = "cdx-xml" SPDXJSON OutputFormat = "spdx-json" SPDXXML OutputFormat = "spdx-xml" SPDXTag OutputFormat = "spdx-tag" SnapshotJSON OutputFormat = "snapshot-json" )
View Source
const ConfigVersion string = "1.0"
Variables ¶
This section is empty.
Functions ¶
func GetAllOutputFormat ¶
func GetAllOutputFormat() string
func IsValidOutputFormat ¶
func NewAddress ¶ added in v1.12.4
Types ¶
type AttestationConfig ¶
type AttestationConfig struct { Key string `yaml:"key"` Pub string `yaml:"pub"` Password string `yaml:"password"` }
AttestationConfig model
type AttestationOptions ¶
type AttestationOptions struct { Key string Pub string AttestType string Predicate string Password string OutputFile string OutputType string }
AttestationOptions model
type Component ¶
type Component struct { ID string `json:"id"` Name string `json:"name"` Version string `json:"version"` Type string `json:"type"` PURL string `json:"purl,omitempty"` Description string `json:"description,omitempty"` Origin string `json:"origin,omitempty"` Licenses []string `json:"licenses,omitempty"` CPEs []string `json:"cpes,omitempty"` Metadata interface{} `json:"metadata,omitempty"` Vulnerabilities []interface{} `json:"vulnerabilities,omitempty"` }
func NewComponent ¶
type Config ¶
type Config struct { Version string `json:"version" yaml:"version"` MaxFileSize int64 `json:"max_file_size" yaml:"max_file_size"` Registry RegistryConfig `json:"registry" yaml:"registry"` Attestation AttestationConfig `json:"attestation" yaml:"attestation"` SecretConfig SecretConfig `json:"secret_config" yaml:"secret_config"` }
type ImageInfo ¶
type ImageInfo struct { Digest v1.Hash `json:"digest,omitempty"` MediaType types.MediaType `json:"mediatype,omitempty"` Size int64 `json:"size,omitempty"` Manifest v1.Manifest `json:"manifest,omitempty"` ConfigFile v1.ConfigFile `json:"config_file,omitempty"` Layers []Layer `json:"layers,omitempty"` }
type ManifestFile ¶
func (*ManifestFile) ReadArchiveFileContent ¶
func (m *ManifestFile) ReadArchiveFileContent(file *zip.File) error
func (*ManifestFile) ReadContent ¶
func (m *ManifestFile) ReadContent(file *os.File) error
type OutputFormat ¶
type OutputFormat string
func (OutputFormat) String ¶
func (o OutputFormat) String() string
type Parameters ¶
type Parameters struct { ScanType ScanType `json:"-"` Input string `json:"input"` OutputFormat OutputFormat `json:"output-format"` SaveToFile string `json:"save-to-file"` Quiet bool `json:"quiet"` Scanners []string `json:"scanners"` Provenance string `json:"provenance"` }
func DefaultParameters ¶
func DefaultParameters() Parameters
func (*Parameters) GetScanType ¶
func (p *Parameters) GetScanType() error
type RegistryConfig ¶
type Release ¶ added in v1.10.0
type Release struct { PrettyName string `json:"prettyName,omitempty"` Name string `json:"name,omitempty"` ID string `json:"id,omitempty"` IDLike []string `json:"idLike,omitempty"` Version string `json:"version,omitempty"` VersionID string `json:"versionID,omitempty"` VersionCodename string `json:"versionCodename,omitempty"` BuildID string `json:"buildID,omitempty"` ImageID string `json:"imageID,omitempty"` ImageVersion string `json:"imageVersion,omitempty"` Variant string `json:"variant,omitempty"` VariantID string `json:"variantID,omitempty"` DistributionID string `json:"distributionID,omitempty"` DistributionDescription string `json:"distributionDescription,omitempty"` DistributionCodename string `json:"distributionCodename,omitempty"` HomeURL string `json:"homeURL,omitempty"` DocumentationURL string `json:"documentationURL,omitempty"` SupportURL string `json:"supportURL,omitempty"` BugReportURL string `json:"bugReportURL,omitempty"` PrivacyPolicyURL string `json:"privacyPolicyURL,omitempty"` CPEName string `json:"cpeName,omitempty"` SupportEndDate string `json:"supportEndDate,omitempty"` }
Linux operating system information from /etc/os-release based on the https://www.freedesktop.org/software/systemd/man/latest/os-release.html
type RpmDB ¶
type RpmDB struct { Path string Layer string PackageInfos []rpmdb.PackageInfo }
func (*RpmDB) ReadDBFile ¶
type Secret ¶
type Secret struct { Match string `json:"match"` Description string `json:"description"` File string `json:"file"` Layer string `json:"layer"` Content string `json:"content"` Line int `json:"line"` }
Secret model
type SecretConfig ¶
type SoftwareManifest ¶
type SoftwareManifest struct { SBOM interface{} `json:"sbom"` OS []OSRelease `json:"os,omitempty"` ImageInfo ImageInfo `json:"image_info,omitempty"` Secrets []Secret `json:"secrets,omitempty"` Files []string `json:"files,omitempty"` Parameters Parameters `json:"parameters"` SLSA SLSA `json:"slsa,omitempty"` Duration float64 `json:"duration"` }
Click to show internal directories.
Click to hide internal directories.