Documentation ¶
Index ¶
- Constants
- 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 AssessmentOpts
- func (o *AssessmentOpts) GetAssessmentHiddenOptions() *options.HiddenOptionsGroup
- func (o *AssessmentOpts) GetAssessmentOptions() *AssessmentOpts
- func (o *AssessmentOpts) GetCustomPoliciesDir() (string, error)
- func (o *AssessmentOpts) Register(c *cobra.Command)
- func (o *AssessmentOpts) Validate() error
- type Config
- type Consolidated
- type 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 DirectoryOpt
- type DockerError
- type DockerTool
- type ExtraArgs
- type FileFingerprint
- type HasCommandTemplate
- type HasDirectory
- type Interface
- type Result
- type Results
- type RunOpts
- func (o *RunOpts) GetRunHiddenOptions() *options.HiddenOptionsGroup
- func (o *RunOpts) InstallAPIServerArtifact(name, urlPath string) (*download.Download, error)
- func (o *RunOpts) InstallTool(spec *download.Spec) (*download.Download, error)
- func (o *RunOpts) LogCommand(c *exec.Cmd)
- func (o *RunOpts) Register(cmd *cobra.Command)
- func (o *RunOpts) RunDocker(d *DockerTool) ([]byte, error)
- type Simple
- type Single
- type ToolOpts
- type UploadOpt
Constants ¶
View Source
const AssessmentDirectoryValue = "ASSESSMENT_DIRECTORY"
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 AssessmentOpts ¶ added in v0.5.9
type AssessmentOpts struct { ToolOpts UploadOpt PrintResultOpt bool SaveResult string PrintResultValues bool SaveResultValues string DisableCustomPolicies bool PrintFingerprints bool SaveFingerprints string CustomPoliciesDir string TestCustomPolicies bool FailThresholds []string // contains filtered or unexported fields }
func (*AssessmentOpts) GetAssessmentHiddenOptions ¶ added in v0.5.9
func (o *AssessmentOpts) GetAssessmentHiddenOptions() *options.HiddenOptionsGroup
func (*AssessmentOpts) GetAssessmentOptions ¶ added in v0.5.9
func (o *AssessmentOpts) GetAssessmentOptions() *AssessmentOpts
func (*AssessmentOpts) GetCustomPoliciesDir ¶ added in v0.5.9
func (o *AssessmentOpts) GetCustomPoliciesDir() (string, error)
func (*AssessmentOpts) Register ¶ added in v0.5.9
func (o *AssessmentOpts) Register(c *cobra.Command)
func (*AssessmentOpts) Validate ¶ added in v0.5.9
func (o *AssessmentOpts) Validate() error
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 asessment results (typically by invoking other tools)
type DirectoryBasedToolOpts ¶ added in v0.4.28
type DirectoryBasedToolOpts struct { AssessmentOpts DirectoryOpt Exclude []string // contains filtered or unexported fields }
Options for assessment tools that run in a directory
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 DirectoryOpt ¶ added in v0.5.9
type DirectoryOpt struct { Directory string // contains filtered or unexported fields }
func (*DirectoryOpt) GetDirectory ¶ added in v0.5.9
func (o *DirectoryOpt) GetDirectory() string
func (*DirectoryOpt) Register ¶ added in v0.5.9
func (o *DirectoryOpt) Register(cmd *cobra.Command)
func (*DirectoryOpt) SetDirectory ¶ added in v0.5.9
func (o *DirectoryOpt) SetDirectory(dir string)
func (*DirectoryOpt) Validate ¶ added in v0.5.9
func (o *DirectoryOpt) Validate(opts *ToolOpts) 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 HasDirectory ¶ added in v0.5.9
type Result ¶
type Result struct { Tool Single Data *jnode.Node Findings assessments.Findings Values map[string]string Directory string FileFingerprints []*FileFingerprint UploadOptions []api.Option Assessment *assessments.Assessment AssessmentRaw *jnode.Node }
func RunSingleAssessment ¶ added in v0.5.9
func (*Result) AddUploadOption ¶ added in v0.5.9
func (*Result) UpdateFileFingerprints ¶ added in v0.5.0
func (r *Result) UpdateFileFingerprints()
type Results ¶ added in v0.5.0
type Results []*Result
func RunConsoliatedAssessments ¶ added in v0.5.9
func RunConsoliatedAssessments(tool Consolidated) (Results, error)
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) InstallAPIServerArtifact ¶ added in v0.5.9
func (*RunOpts) InstallTool ¶ added in v0.4.39
func (*RunOpts) LogCommand ¶ added in v0.4.55
type Single ¶ added in v0.5.0
type Single interface { Interface GetAssessmentOptions() *AssessmentOpts Run() (*Result, error) }
A Single tool runs and returns a single assessment result
type ToolOpts ¶
type ToolOpts struct { RunOpts Tool Interface RepoRoot string ConfigFile string // contains filtered or unexported fields }
func (*ToolOpts) GetStandardXCPValues ¶ added in v0.5.9
func (*ToolOpts) GetToolOptions ¶ added in v0.4.28
type UploadOpt ¶ added in v0.5.9
func (*UploadOpt) AddPRDiffsUpload ¶ added in v0.5.11
func (*UploadOpt) GetPRDiffUploadOption ¶ added in v0.5.11
Source Files ¶
Click to show internal directories.
Click to hide internal directories.