Documentation
¶
Index ¶
- Constants
- func GetAllOutputFormat() string
- func IsValidOutputFormat(format string) bool
- func MakeNid() string
- type AttestationConfig
- type AttestationOptions
- type Component
- type Config
- type Distro
- type ImageInfo
- type Layer
- type ManifestFile
- type Metadata
- type OutputFormat
- type Parameters
- type RegistryConfig
- type RpmDB
- type Rule
- type SBOM
- 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"
View Source
const SchemaVersion = "1.0"
Variables ¶
This section is empty.
Functions ¶
func GetAllOutputFormat ¶
func GetAllOutputFormat() string
func IsValidOutputFormat ¶
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 Distro ¶
type Distro 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"`
DistributionID string `json:"distributionID,omitempty"`
DistributionDescription string `json:"distributionDescription,omitempty"`
DistributionCodename string `json:"distributionCodename,omitempty"`
HomeURL string `json:"homeURL,omitempty"`
SupportURL string `json:"supportURL,omitempty"`
BugReportURL string `json:"bugReportURL,omitempty"`
PrivacyPolicyURL string `json:"privacyPolicyURL,omitempty"`
}
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
Input string
OutputFormat OutputFormat
SaveToFile string
Quiet bool
Scanners []string
AllowFileListing bool
Provenance string
}
func DefaultParameters ¶
func DefaultParameters() Parameters
func (*Parameters) GetScanType ¶
func (p *Parameters) GetScanType() error
type RegistryConfig ¶
type RpmDB ¶
type RpmDB struct {
Path string
Layer string
PackageInfos []rpmdb.PackageInfo
}
func (*RpmDB) ReadDBFile ¶
type SBOM ¶
type Secret ¶
type Secret struct {
Match string `json:"match"`
Description string `json:"description"`
File string `json:"file"`
Content string `json:"content"`
Line int `json:"line"`
}
Secret model
type SecretConfig ¶
type SoftwareManifest ¶
type SoftwareManifest struct {
SBOM interface{} `json:"sbom"`
Distro Distro `json:"distro,omitempty"`
ImageInfo ImageInfo `json:"image_info,omitempty"`
Secrets []Secret `json:"secrets"`
Files []string `json:"files"`
Parameters Parameters `json:"parameters"`
SLSA SLSA `json:"slsa"`
Duration float64 `json:"duration"`
}
Click to show internal directories.
Click to hide internal directories.