Documentation ¶
Overview ¶
execute a command, and take care to sanitize the child process environment (conditionally)
Index ¶
Examples ¶
Constants ¶
View Source
const EMO_CHECK = "✅"
nolint
View Source
const EMO_FAILED = "❌"
nolint
View Source
const EMO_TIME = "⌛️"
nolint
View Source
const FILE_ENV_KEY = "PF_FILE_LOOKUP"
nolint
View Source
const MD5 = "md5"
View Source
const SHA1 = "sha1"
View Source
const VT_ENV_KEY = "PF_VT_TOKEN"
nolint
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CheckResult ¶
type CheckResult struct { LookupResult *LookupResult ValidDigest *Signature ExpectedDigests []Signature ActualDigest Digest Ok bool }
func (*CheckResult) Error ¶
func (c *CheckResult) Error() error
func (*CheckResult) HasLookupVulns ¶ added in v1.1.0
func (c *CheckResult) HasLookupVulns() bool
func (*CheckResult) HasValidationVulns ¶ added in v1.1.0
func (c *CheckResult) HasValidationVulns() bool
type FileLookup ¶
type FileLookup struct {
// contains filtered or unexported fields
}
Example ¶
lookup, _ := NewFileLookup("../file_lookup_list.txt") pf := NewPreflight([]Lookup{&NoLookup{}, lookup}) pf.ExecPiped("echo 'hello'", "3b084aa6ad2246428c9270825d8631e077b7e7c9bb16f6cafb482bc7fd63e348")
Output: ⌛️ Preflight starting with file lookup: ../file_lookup_list.txt ✅ Preflight verified hello
func (*FileLookup) Hash ¶
func (p *FileLookup) Hash(digest Digest) (LookupResult, error)
func (*FileLookup) Name ¶
func (p *FileLookup) Name() string
type Lookup ¶
type Lookup interface { Hash(digest Digest) (LookupResult, error) Name() string }
func NewFileLookup ¶
func NewVirusTotalLookup ¶ added in v1.1.0
type LookupResult ¶
type Porcelain ¶
type Porcelain struct { }
func (*Porcelain) CheckFailed ¶
func (p *Porcelain) CheckFailed(check *CheckResult)
type Preflight ¶
func NewPreflight ¶
type VirusTotalLookup ¶ added in v1.1.0
type VirusTotalLookup struct {
// contains filtered or unexported fields
}
func (*VirusTotalLookup) Hash ¶ added in v1.1.0
func (p *VirusTotalLookup) Hash(digest Digest) (LookupResult, error)
func (*VirusTotalLookup) Name ¶ added in v1.1.0
func (p *VirusTotalLookup) Name() string
Click to show internal directories.
Click to hide internal directories.