Documentation ¶
Index ¶
- Constants
- func ContainsInt(s []int, e int) bool
- func Execute()
- func FileExists(filename string) bool
- func FileToBase64(filepath string) string
- func FindMatchingString(s1 string, s2 string, delim string) bool
- func GenerateApiSARIF()
- func GenerateComplianceSarif(results InterceptComplianceOutput)
- func GenerateSarif(calledby string)
- func GetExecutablePath() string
- func GetHomeDir() string
- func GetWd() string
- func LogError(err error)
- func PrintClose()
- func PrintStart()
- func ProcessOutput(filename string, ruleId string, ruleType string, ruleName string, ...)
- func ReaderFromURL(path string) (io.ReadCloser, error)
- func RunCommandWithArgs(binaryPath string, argsStr string) error
- func WriteLinesOnFile(lines []string, filepath string) error
- type InterceptCompliance
- type InterceptComplianceFinding
- type InterceptComplianceOutput
- type InterceptOutput
- type InterceptResult
- type KeyArray
- type Rule
- type SARIF
- type ScannedFile
Constants ¶
View Source
const ( HTTPPrefix = "http://" HTTPSPrefix = "https://" ConfigFilename = "config.yaml" )
Variables ¶
This section is empty.
Functions ¶
func ContainsInt ¶ added in v0.15.15
ContainsInt checks for ints
func FileExists ¶ added in v0.15.15
FileExists check if file exists
func FileToBase64 ¶ added in v0.15.15
func FindMatchingString ¶ added in v0.15.15
func GenerateApiSARIF ¶ added in v0.15.15
func GenerateApiSARIF()
func GenerateComplianceSarif ¶ added in v0.15.15
func GenerateComplianceSarif(results InterceptComplianceOutput)
func GenerateSarif ¶ added in v0.15.15
func GenerateSarif(calledby string)
generates SARIF output from rg intercept results
func GetExecutablePath ¶ added in v0.15.15
func GetExecutablePath() string
GetExecutablePath returns where the main executable is running from
func ProcessOutput ¶ added in v0.15.15
func ProcessOutput(filename string, ruleId string, ruleType string, ruleName string, ruleDescription string, ruleError string, ruleSolution string, ruleFatal bool)
processes ripgrep output into intercept meaningfull results
func ReaderFromURL ¶ added in v0.15.15
func ReaderFromURL(path string) (io.ReadCloser, error)
ReaderFromURL grabs de config from URL
func RunCommandWithArgs ¶ added in v0.15.15
func WriteLinesOnFile ¶ added in v0.15.15
WriteLinesOnFile does that
Types ¶
type InterceptCompliance ¶ added in v0.15.15
type InterceptCompliance struct { RuleFindings []InterceptComplianceFinding `json:"ruleFindings"` RuleDescription string `json:"ruleDescription"` RuleError string `json:"ruleError"` RuleFatal bool `json:"ruleFatal"` RuleID string `json:"ruleId"` RuleName string `json:"ruleName"` RuleSolution string `json:"ruleSolution"` RuleType string `json:"ruleType"` Type string `json:"type"` }
type InterceptComplianceFinding ¶ added in v0.15.15
type InterceptComplianceOutput ¶ added in v0.15.15
type InterceptComplianceOutput []InterceptCompliance
type InterceptOutput ¶ added in v0.15.15
type InterceptOutput []InterceptResult
type InterceptResult ¶ added in v0.15.15
type InterceptResult struct { Data struct { AbsoluteOffset int `json:"absolute_offset"` LineNumber int `json:"line_number"` Lines struct { Text string `json:"text"` } `json:"lines"` Path struct { Text string `json:"text"` } `json:"path"` Submatches []struct { End int `json:"end"` Match struct { Text string `json:"text"` } `json:"match"` Start int `json:"start"` } `json:"submatches"` } `json:"data"` RuleDescription string `json:"ruleDescription"` RuleError string `json:"ruleError"` RuleFatal bool `json:"ruleFatal"` RuleID string `json:"ruleId"` RuleName string `json:"ruleName"` RuleSolution string `json:"ruleSolution"` RuleType string `json:"ruleType"` Type string `json:"type"` }
type Rule ¶ added in v0.15.15
type Rule struct { ID int `yaml:"id"` Name string `yaml:"name"` Description string `yaml:"description"` Solution string `yaml:"solution"` Error string `yaml:"error"` Type string `yaml:"type"` Environment string `yaml:"environment"` Enforcement bool `yaml:"enforcement"` Fatal bool `yaml:"fatal"` Tags string `yaml:"tags,omitempty"` Impact string `yaml:"impact,omitempty"` Confidence string `yaml:"confidence,omitempty"` Api_Endpoint string `yaml:"api_endpoint,omitempty"` Api_Request string `yaml:"api_request,omitempty"` Api_Insecure bool `yaml:"api_insecure"` Api_Body string `yaml:"api_body,omitempty"` Api_Auth string `yaml:"api_auth,omitempty"` Api_Auth_Basic *string `yaml:"api_auth_basic,omitempty"` Api_Auth_Token *string `yaml:"api_auth_token,omitempty"` Api_Trace bool `yaml:"api_trace,omitempty"` Filepattern string `yaml:"filepattern,omitempty"` Yml_Filepattern string `yaml:"yml_filepattern,omitempty"` Yml_Structure string `yaml:"yml_structure,omitempty"` Toml_Filepattern string `yaml:"toml_filepattern,omitempty"` Toml_Structure string `yaml:"toml_structure,omitempty"` Json_Filepattern string `yaml:"json_filepattern,omitempty"` Json_Structure string `yaml:"json_structure,omitempty"` Patterns []string `yaml:"patterns"` }
type SARIF ¶ added in v0.15.15
type SARIF struct { Version string `json:"version"` Schema string `json:"$schema"` Runs []interface{} `json:"runs"` }
func MergeSARIFFiles ¶ added in v0.15.15
type ScannedFile ¶ added in v0.15.15
func PathSHA256 ¶ added in v0.15.15
func PathSHA256(root string) ([]ScannedFile, error)
Click to show internal directories.
Click to hide internal directories.