Documentation ¶
Index ¶
- Constants
- Variables
- type Application
- type ArtifactDetail
- type ArtifactInfo
- type ArtifactReference
- type BlobInfo
- type Config
- type DockerOption
- type Layer
- type LibraryInfo
- type MisconfResult
- type MisconfResults
- type Misconfiguration
- type OS
- type Package
- type PackageInfo
- type PolicyInputOption
- type PolicyInputSelector
- type PolicyMetadata
- type SrcPackage
Constants ¶
View Source
const ( ArtifactJSONSchemaVersion = 1 BlobJSONSchemaVersion = 1 )
View Source
const ( // Programming language dependencies Bundler = "bundler" Cargo = "cargo" Composer = "composer" Npm = "npm" NuGet = "nuget" Pipenv = "pipenv" Poetry = "poetry" Yarn = "yarn" Jar = "jar" GoBinary = "gobinary" GoMod = "gomod" // Config files YAML = "yaml" JSON = "json" TOML = "toml" Dockerfile = "dockerfile" HCL = "hcl" Kubernetes = "kubernetes" CloudFormation = "cloudformation" Ansible = "ansible" )
Variables ¶
View Source
var ( InvalidURLPattern = xerrors.New("invalid url pattern") ErrNoRpmCmd = xerrors.New("no rpm command") )
Functions ¶
This section is empty.
Types ¶
type Application ¶
type Application struct { Type string FilePath string Libraries []LibraryInfo }
type ArtifactDetail ¶
type ArtifactDetail struct { OS *OS `json:",omitempty"` Packages []Package `json:",omitempty"` Applications []Application `json:",omitempty"` Misconfigurations []Misconfiguration `json:",omitempty"` Size int `json:",omitempty"` // HistoryPackages are packages extracted from RUN instructions HistoryPackages []Package `json:",omitempty"` }
ArtifactDetail is generated by applying blobs
type ArtifactInfo ¶
type ArtifactInfo struct { SchemaVersion int Architecture string Created time.Time DockerVersion string OS string // HistoryPackages are packages extracted from RUN instructions HistoryPackages []Package `json:",omitempty"` }
ArtifactInfo is stored in cache
type ArtifactReference ¶
type ArtifactReference struct { Name string // image name, tar file name, directory or repository name ID string BlobIDs []string RepoTags []string RepoDigests []string }
ArtifactReference represents a reference of container image, local filesystem and repository
type BlobInfo ¶
type BlobInfo struct { SchemaVersion int Digest string `json:",omitempty"` DiffID string `json:",omitempty"` OS *OS `json:",omitempty"` PackageInfos []PackageInfo `json:",omitempty"` Applications []Application `json:",omitempty"` Misconfigurations []Misconfiguration `json:",omitempty"` OpaqueDirs []string `json:",omitempty"` WhiteoutFiles []string `json:",omitempty"` Size int `json:",omitempty"` }
BlobInfo is stored in cache
type DockerOption ¶
type DockerOption struct { // Auth UserName string Password string // RegistryToken is a bearer token to be sent to a registry RegistryToken string // ECR AwsAccessKey string AwsSecretKey string AwsSessionToken string AwsRegion string // GCP GcpCredPath string InsecureSkipTLSVerify bool NonSSL bool SkipPing bool // this is ignored now Timeout time.Duration }
type LibraryInfo ¶
type LibraryInfo struct { Library godeptypes.Library `json:",omitempty"` Layer Layer `json:",omitempty"` }
type MisconfResult ¶
type MisconfResult struct { Namespace string `json:",omitempty"` Message string `json:",omitempty"` PolicyMetadata `json:",omitempty"` }
type MisconfResults ¶
type MisconfResults []MisconfResult
func (MisconfResults) Len ¶
func (r MisconfResults) Len() int
func (MisconfResults) Less ¶
func (r MisconfResults) Less(i, j int) bool
func (MisconfResults) Swap ¶
func (r MisconfResults) Swap(i, j int)
type Misconfiguration ¶
type Misconfiguration struct { FileType string `json:",omitempty"` FilePath string `json:",omitempty"` Successes MisconfResults `json:",omitempty"` Warnings MisconfResults `json:",omitempty"` Failures MisconfResults `json:",omitempty"` Exceptions MisconfResults `json:",omitempty"` Layer Layer `json:",omitempty"` }
type Package ¶
type Package struct { Name string `json:",omitempty"` Version string `json:",omitempty"` Release string `json:",omitempty"` Epoch int `json:",omitempty"` Arch string `json:",omitempty"` SrcName string `json:",omitempty"` SrcVersion string `json:",omitempty"` SrcRelease string `json:",omitempty"` SrcEpoch int `json:",omitempty"` Modularitylabel string `json:",omitempty"` Layer Layer `json:",omitempty"` }
type PackageInfo ¶
type PolicyInputOption ¶
type PolicyInputOption struct { Combine bool Selector PolicyInputSelector }
type PolicyInputSelector ¶
type PolicyInputSelector struct {
Types []string
}
type PolicyMetadata ¶
type SrcPackage ¶
Click to show internal directories.
Click to hide internal directories.