Documentation
¶
Index ¶
- func CreateCommand(tool Interface) *cobra.Command
- func MustRel(base, target string) string
- func PassFormatter(n *jnode.Node) string
- func TempFile(pattern string) (name string, err error)
- type Config
- 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 DockerTool
- type HasCommandTemplate
- type Interface
- type Result
- type RunOpts
- type ToolOpts
- func (o *ToolOpts) GetConfig() *Config
- func (o *ToolOpts) GetCustomPoliciesDir() (string, error)
- func (o *ToolOpts) GetDirectoryBasedToolOptions() *DirectoryBasedToolOpts
- func (o *ToolOpts) GetToolOptions() *ToolOpts
- func (o *ToolOpts) InstallAPIServerArtifact(name, urlPath string) (*download.Download, error)
- func (o *ToolOpts) PrintToolResult(result *Result)
- func (o *ToolOpts) Register(c *cobra.Command)
- func (o *ToolOpts) RunTool(printResult bool) (*Result, 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 PassFormatter ¶ added in v0.4.39
Types ¶
type Config ¶ added in v0.4.39
type Config struct {
// contains filtered or unexported fields
}
func ReadConfig ¶ added in v0.4.39
type DirectoryBasedToolOpts ¶ added in v0.4.28
type DirectoryBasedToolOpts struct {
ToolOpts
Directory string
Exclude []string
PrintFingerprints bool
SaveFingerprints 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 DockerTool ¶ added in v0.4.29
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
PrintPath []string
PrintColumns []string
Assessment *assessments.Assessment
}
type RunOpts ¶ added in v0.4.39
type RunOpts struct {
options.PrintClientOpts
ToolVersion string
ToolPath string
SkipDockerPull bool
ExtraDockerArgs []string
NoDocker bool
Internal bool
}
func (*RunOpts) InstallTool ¶ added in v0.4.39
type ToolOpts ¶
type ToolOpts struct {
RunOpts
Tool Interface
UploadEnabled bool
UpdatePR bool
FailThresholds []string
PrintAsessment bool
PrintResultOpt bool
SaveResult string
PrintResultValues bool
SaveResultValues string
DisableCustomPolicies bool
ParsedFailThresholds map[string]int
RepoRoot 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) GetToolOptions ¶ added in v0.4.28
func (*ToolOpts) InstallAPIServerArtifact ¶ added in v0.4.28
func (*ToolOpts) PrintToolResult ¶ added in v0.4.36
Source Files
¶
Click to show internal directories.
Click to hide internal directories.