model

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jan 6, 2023 License: Apache-2.0 Imports: 0 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// JSON Output Type
	JSON Output = "json"
	// Table Output Type (Default)
	Table = "table"
	// CycloneDX Output Type
	CycloneDX = "cyclonedx"
	// CycloneDXJSON Output Type
	CycloneDXJSON = "cyclonedx-json"
	// SPDXJSON Output Type
	SPDXJSON = "spdx-json"
	// SPDXTagValue Output Type
	SPDXTagValue = "spdx-tag-value"
)

Variables

View Source
var (
	// OutputTypes - All Supported Output Types
	OutputTypes = map[string]string{
		JSON.ToOutput(): JSON.ToOutput(),
		Table:           Table,
		CycloneDX:       CycloneDX,
		CycloneDXJSON:   CycloneDXJSON,
		SPDXJSON:        SPDXJSON,
		SPDXTagValue:    SPDXTagValue,
	}
)

Functions

This section is empty.

Types

type Arguments

type Arguments struct {
	Image               *string
	Output              *Output
	Quiet               *bool
	OutputFile          *string
	EnabledParsers      *[]string
	DisableFileListing  *bool
	SecretContentRegex  *string
	DisableSecretSearch *bool
	SecretMaxFileSize   int64
	RegistryURI         *string
	RegistryUsername    *string
	RegistryPassword    *string
	RegistryToken       *string
	Dir                 *string
	Tar                 *string
	ExcludedFilenames   *[]string
}

Arguments - CLI Arguments

type Config

type Config struct {
	Env         []string    `json:"Env"`
	Entrypoint  []string    `json:"Entrypoint"`
	Cmd         []string    `json:"Cmd"`
	Workdir     string      `json:"WorkingDir"`
	ArgsEscaped bool        `json:"ArgsEscaped"`
	OnBuild     interface{} `json:"OnBuild"`
}

Config of DockerConfig

type Configuration

type Configuration struct {
	SecretConfig       SecretConfig `yaml:"secret-config"`
	EnabledParsers     []string     `yaml:"enabled-parsers"`
	DisableFileListing bool         `yaml:"disable-file-listing"`
	Quiet              bool         `yaml:"quiet"`
	OutputFile         string       `yaml:"output-file"`
	Output             *[]string    `yaml:"output"`
	Registry           Registry     `yaml:"registry"`
}

Configuration YAML file 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"`
	DistribID          string   `json:"distribID,omitempty"`
	DistribDescription string   `json:"distribDescription,omitempty"`
	DistribCodename    string   `json:"versionCodename,omitempty"`
	HomeURL            string   `json:"homeURL,omitempty"`
	SupportURL         string   `json:"supportURL,omitempty"`
	BugReportURL       string   `json:"bugReportURL,omitempty"`
	PrivacyPolicyURL   string   `json:"privacyPolicyURL,omitempty"`
}

Distro docker image distro

type DockerConfig

type DockerConfig struct {
	Architecture string         `json:"architecture"`
	Config       Config         `json:"config"`
	Created      string         `json:"created"`
	History      []History      `json:"history"`
	OS           string         `json:"os"`
	RootFS       RootFileSystem `json:"rootFS"`
	Variant      string         `json:"variant"`
}

DockerConfig "Config" object from DockerManifest

type DockerManifest

type DockerManifest struct {
	Config   string      `json:"Config"`
	RepoTags interface{} `json:"RepoTags"`
	Layers   interface{} `json:"Layers"`
}

DockerManifest "manifest.json" from docker image

type File

type File struct {
	Path        string      `json:"path"`
	OwnerUID    string      `json:"ownerUid,omitempty"`
	OwnerGID    string      `json:"ownerGid,omitempty"`
	Permissions string      `json:"permissions,omitempty"`
	Digest      interface{} `json:"digest,omitempty"`
}

File - OS Files

type History

type History struct {
	Created    string `json:"created"`
	CreatedBy  string `json:"created_by"`
	EmptyLayer *bool  `json:"empty_layer,omitempty"`
	Comment    string `json:"comment,omitempty"`
}

History of DockerConfig

type ImageInfo

type ImageInfo struct {
	DockerConfig   DockerConfig
	DockerManifest []DockerManifest
}

ImageInfo image information from Docker

type Location

type Location struct {
	Path      string `json:"path"`
	LayerHash string `json:"layerHash"`
}

Location - Package Location

type Output

type Output string

Output type

func (Output) ToOutput

func (c Output) ToOutput() string

ToOutput - returns the output type as string

type PURL

type PURL string

PURL - Package URL

type Package

type Package struct {
	ID          string      `json:"id"`
	Name        string      `json:"name"`
	Type        string      `json:"type"`
	Version     string      `json:"version"`
	Path        string      `json:"path"`
	Locations   []Location  `json:"locations"`
	Description string      `json:"description"`
	Licenses    []string    `json:"licenses"`
	CPEs        []string    `json:"cpes"`
	PURL        PURL        `json:"purl"`
	Metadata    interface{} `json:"metadata"`
}

Package actual package found

type Registry

type Registry struct {
	URI      string `yaml:"uri"`
	Username string `yaml:"username"`
	Password string `yaml:"password"`
	Token    string `yaml:"token"`
}

Registry config

type RootFileSystem

type RootFileSystem struct {
	Type         string   `json:"type"`
	DifferentIDS []string `json:"diff_ids"`
}

RootFileSystem root fs of DockerConfig

type Secret

type Secret struct {
	ContentRegexName string `json:"contentRegexName"`
	FileName         string `json:"fileName"`
	FilePath         string `json:"filePath"`
	LineNumber       string `json:"lineNumber"`
}

Secret model

type SecretConfig

type SecretConfig struct {
	Disabled    bool      `yaml:"disabled" json:"disabled"`
	SecretRegex string    `yaml:"secret-regex" json:"secretRegex"`
	Excludes    *[]string `yaml:"excludes-filenames" json:"excludesFilenames"`
	MaxFileSize int64     `yaml:"max-file-size" json:"maxFileSize"`
}

SecretConfig model

type SecretResults

type SecretResults struct {
	Configuration SecretConfig `json:"applied-configuration"`
	Secrets       []Secret     `json:"secrets"`
}

SecretResults the final result that will be displayed

type Version

type Version struct {
	// Version
	AppName   string `json:"appName"`
	Version   string `json:"version"`
	BuildDate string `json:"buildDate"`
	// Git
	GitCommit string `json:"gitCommit"`
	GitDesc   string `json:"gitDesc"`
	// Golang
	GoVersion string `json:"goVersion"`
	Compiler  string `json:"compiler"`
	Platform  string `json:"platform"`
}

Version - Build Information

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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