Documentation ¶
Index ¶
- Constants
- func SaveFile(filename string, data []byte)
- func SearchFiles(repoDir, pattern string) []string
- func TrimQuoteMarks(value string) string
- type Artifact
- type BuildStage
- type CommandSet
- type DiscoverOpts
- type Dockerfile
- type Image
- type InstallTrace
- type ManifestFile
- type Package
- type PackageOverride
- type SpdxFile
- type SpdxRelationship
- type Trace
- type VerifiedArtifact
Constants ¶
View Source
const ( DockerfileEcosystem = "dockerfile" FormatJSON = "json" FormatSpdx = "spdx" FormatCdx = "cdx" DefaultFilename = "results" )
DockerfileEcosystem :
Variables ¶
This section is empty.
Functions ¶
func SearchFiles ¶
SearchFiles returns matched file patterns or nil if none found
func TrimQuoteMarks ¶
TrimQuoteMarks returns a string with its quotation marks removed
Types ¶
type Artifact ¶
type Artifact struct { Name string `json:"name"` Path string `json:"path"` Version string `json:"version,omitempty"` IsDirectory bool `json:"isDirectory"` SHA256 string `json:"sha256,omitempty"` }
Artifact presents a resource
type BuildStage ¶
type BuildStage struct { StageID string `json:"stage_id"` Context string `json:"key"` DependsOn string `json:"parent_stage"` ScratchBuild bool `json:"is_scratch_build"` StartLineNo int `json:"start_line"` EndLineNo int `json:"end_line"` Image Image `json:"base_image"` Packages []Package `json:"os_packages"` AppPackages []Package `json:"app_packages"` PackageOverride []PackageOverride `json:"package_override"` DockerFileCmds []*parser.Node `json:"-"` AddOnInstalls []InstallTrace `json:"addon_installs"` EnvVariables map[string]string `json:"env_variables,omitempty"` AddOnSpdxReport string `json:"addon_spdx_report"` }
BuildStage :
type CommandSet ¶
CommandSet is a set of commands in their execution order
type DiscoverOpts ¶
type DiscoverOpts struct { DockerfilePath string OutFilepath string Format string Image string Namespace string SaveTrace bool }
DiscoverOpts :
type Dockerfile ¶
type Dockerfile struct { Filepath string `json:"filepath"` Filehash string `json:"filehash"` FileType string `json:"filetype"` BuildStages []BuildStage `json:"build_stages"` BuildArgs map[string]string `json:"build_args,omitempty"` }
Dockerfile :
type Image ¶
type Image struct { Name string `json:"name"` Tag string `json:"tag"` OSName string `json:"os_name"` OSVersion string `json:"os_version"` SHA256 string `json:"sha256"` Metadata string `json:"metadata"` Packages []Package `json:"packages"` Scanned bool `json:"scanned"` }
Image :
type InstallTrace ¶
type InstallTrace struct { Origin string `json:"origin"` OriginHash string `json:"originhash,omitempty"` Traces map[int]Trace `json:"traces,omitempty"` }
InstallTrace presents an add-on installation and its traces
type ManifestFile ¶
type ManifestFile struct { CommitID string `json:"commitid"` GitURL string `json:"giturl"` GitBranch string `json:"gitbranch"` Filepath string `json:"filepath"` Filehash string `json:"filehash"` FileType string `json:"filetype"` Packages []Package `json:"packages"` Scanned bool `json:"scanned"` }
ManifestFile :
type Package ¶
type Package struct { Name string `json:"name"` Version string `json:"version"` Ecosystem string `json:"ecosystem"` Source string `json:"source,omitempty"` Key string `json:"key,omitempty"` Dependencies []string `json:"dependencies,omitempty"` }
Package :
type PackageOverride ¶
type PackageOverride struct { BasePackage string `json:"base_package"` OverridePackage string `json:"override_package"` }
PackageOverride :
type SpdxFile ¶
type SpdxFile struct { FileName string `json:"filename"` SPDXID string `json:"spdxid"` FileChecksum string `json:"fileCheckSum,omitempty"` FileDownloadLocation string `json:"fileDownloadLocation,omitempty"` LicenseConcluded string `json:"licenseConcluded,omitempty"` LicenseInfoInFile string `json:"licenseInfoInfile,omitempty"` FileCopyrightText string `json:"fileCopyrightText,omitempty"` FileComment string `json:"fileComment,omitempty"` }
type SpdxRelationship ¶
type SpdxRelationship string
Click to show internal directories.
Click to hide internal directories.