Documentation ¶
Index ¶
- func CreateCommand(tool Interface) *cobra.Command
- func IsDockerError(err error) bool
- func MissingFormatter(n *jnode.Node) string
- func MustRel(base, target string) string
- func PassFormatter(n *jnode.Node) string
- func TempFile(pattern string) (name string, err error)
- type Config
- type Consolidated
- type DirectoryBasedToolOpts
- func (o *DirectoryBasedToolOpts) GetDirectory() string
- func (o *DirectoryBasedToolOpts) GetDirectoryBasedToolOptions() *DirectoryBasedToolOpts
- func (o *DirectoryBasedToolOpts) GetDockerRunDirectory() string
- func (o *DirectoryBasedToolOpts) GetFilesInDirectory(files []string) ([]string, error)
- func (o *DirectoryBasedToolOpts) GetInventory() *inventory.Manifest
- func (o *DirectoryBasedToolOpts) IsExcluded(file string) bool
- func (o *DirectoryBasedToolOpts) Register(cmd *cobra.Command)
- func (o *DirectoryBasedToolOpts) RemoveExcluded(files []string) []string
- func (o *DirectoryBasedToolOpts) Validate() error
- type DockerError
- type DockerTool
- type ExtraArgs
- type FileFingerprint
- type HasCommandTemplate
- type Interface
- type Result
- type Results
- type RunOpts
- type Single
- type ToolOpts
- func (o *ToolOpts) GetConfig() *Config
- func (o *ToolOpts) GetCustomPoliciesDir() (string, error)
- func (o *ToolOpts) GetDirectoryBasedToolOptions() *DirectoryBasedToolOpts
- func (o *ToolOpts) GetToolHiddenOptions() *options.HiddenOptionsGroup
- func (o *ToolOpts) GetToolOptions() *ToolOpts
- func (o *ToolOpts) InstallAPIServerArtifact(name, urlPath string) (*download.Download, error)
- func (o *ToolOpts) IsNonAssessment() bool
- func (o *ToolOpts) Register(c *cobra.Command)
- func (o *ToolOpts) RunTool() (Results, error)
- func (o *ToolOpts) Validate() error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateCommand ¶ added in v0.4.28
func IsDockerError ¶ added in v0.5.4
func MissingFormatter ¶ added in v0.5.0
func MissingFormatter(n *jnode.Node) string
func PassFormatter ¶ added in v0.4.39
func PassFormatter(n *jnode.Node) string
Types ¶
type Config ¶ added in v0.4.39
type Config struct {
// contains filtered or unexported fields
}
func ReadConfigFile ¶ added in v0.5.0
type Consolidated ¶ added in v0.5.0
A Consolidated tool runs and returns multiple results (typically by invoking other tools)
type DirectoryBasedToolOpts ¶ added in v0.4.28
type DirectoryBasedToolOpts struct { ToolOpts Directory string Exclude []string // contains filtered or unexported fields }
func (*DirectoryBasedToolOpts) GetDirectory ¶ added in v0.4.28
func (o *DirectoryBasedToolOpts) GetDirectory() string
func (*DirectoryBasedToolOpts) GetDirectoryBasedToolOptions ¶ added in v0.4.34
func (o *DirectoryBasedToolOpts) GetDirectoryBasedToolOptions() *DirectoryBasedToolOpts
func (*DirectoryBasedToolOpts) GetDockerRunDirectory ¶ added in v0.4.45
func (o *DirectoryBasedToolOpts) GetDockerRunDirectory() string
Return the directory that a docker-based tool is run in. Normally this is /src, but if it's run out of PATH, then it's o.GetDirectory()
func (*DirectoryBasedToolOpts) GetFilesInDirectory ¶ added in v0.4.34
func (o *DirectoryBasedToolOpts) GetFilesInDirectory(files []string) ([]string, error)
func (*DirectoryBasedToolOpts) GetInventory ¶ added in v0.4.34
func (o *DirectoryBasedToolOpts) GetInventory() *inventory.Manifest
func (*DirectoryBasedToolOpts) IsExcluded ¶ added in v0.4.34
func (o *DirectoryBasedToolOpts) IsExcluded(file string) bool
func (*DirectoryBasedToolOpts) Register ¶ added in v0.4.28
func (o *DirectoryBasedToolOpts) Register(cmd *cobra.Command)
func (*DirectoryBasedToolOpts) RemoveExcluded ¶ added in v0.4.34
func (o *DirectoryBasedToolOpts) RemoveExcluded(files []string) []string
func (*DirectoryBasedToolOpts) Validate ¶ added in v0.4.34
func (o *DirectoryBasedToolOpts) Validate() error
type DockerError ¶ added in v0.5.4
type DockerError string
func (DockerError) Error ¶ added in v0.5.4
func (d DockerError) Error() string
func (DockerError) Is ¶ added in v0.5.4
func (d DockerError) Is(err error) bool
type DockerTool ¶ added in v0.4.29
type DockerTool struct { Name string Image string DockerArgs []string Args []string DefaultNoDockerName string ExtraMounts map[string]string Stdout io.Writer Stderr io.Writer Directory string Quiet bool PropagateEnvironmentVars []string }
func (*DockerTool) AppendArgs ¶ added in v0.5.8
func (t *DockerTool) AppendArgs(args ...string)
func (*DockerTool) Mount ¶ added in v0.5.8
func (t *DockerTool) Mount(name, mountpoint string)
type ExtraArgs ¶ added in v0.4.55
type ExtraArgs []string
ExtraArgs captures extra arguments to a command
type FileFingerprint ¶ added in v0.5.0
type HasCommandTemplate ¶ added in v0.4.31
type Result ¶
type Result struct { Data *jnode.Node Findings assessments.Findings Values map[string]string Directory string Files *util.StringSet FileFingerprints []*FileFingerprint Assessment *assessments.Assessment AssessmentRaw *jnode.Node }
func (*Result) UpdateFileFingerprints ¶ added in v0.5.0
func (r *Result) UpdateFileFingerprints()
type RunOpts ¶ added in v0.4.39
type RunOpts struct { options.PrintClientOpts ToolVersion string ToolPath string SkipDockerPull bool ExtraDockerArgs []string NoDocker bool Internal bool Quiet bool }
func (*RunOpts) GetRunHiddenOptions ¶ added in v0.4.55
func (o *RunOpts) GetRunHiddenOptions() *options.HiddenOptionsGroup
func (*RunOpts) InstallTool ¶ added in v0.4.39
func (*RunOpts) LogCommand ¶ added in v0.4.55
type ToolOpts ¶
type ToolOpts struct { RunOpts Tool Interface UploadEnabled bool PrintResultOpt bool SaveResult string PrintResultValues bool SaveResultValues string DisableCustomPolicies bool RepoRoot string PrintFingerprints bool SaveFingerprints string ConfigFile string CustomPoliciesDir string TestCustomPolicies bool FailThresholds []string // contains filtered or unexported fields }
func (*ToolOpts) GetCustomPoliciesDir ¶ added in v0.4.39
func (*ToolOpts) GetDirectoryBasedToolOptions ¶ added in v0.4.34
func (o *ToolOpts) GetDirectoryBasedToolOptions() *DirectoryBasedToolOpts
func (*ToolOpts) GetToolHiddenOptions ¶ added in v0.4.55
func (o *ToolOpts) GetToolHiddenOptions() *options.HiddenOptionsGroup
func (*ToolOpts) GetToolOptions ¶ added in v0.4.28
func (*ToolOpts) InstallAPIServerArtifact ¶ added in v0.4.28
func (*ToolOpts) IsNonAssessment ¶ added in v0.5.0
Source Files ¶
Click to show internal directories.
Click to hide internal directories.