Documentation ¶
Index ¶
- func CreateTempFile(filePathCopyFrom, tmpFilePath string) string
- type File
- type Query
- type Remediation
- type ReplacementInfo
- type Report
- type Set
- type Summary
- func (s *Summary) GetRemediationSets(results Report, include []string) map[string]interface{}
- func (s *Summary) GetRemediationSetsFromVulns(vulnerabilities []model.Vulnerability, include []string) map[string]interface{}
- func (s *Summary) RemediateFile(filePath string, remediationSet Set, openAPIResolveReferences bool) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateTempFile ¶
CreateTempFile creates a temporary file with the content as the file pointed in the filePathCopyFrom
Types ¶
type File ¶
type File struct { FilePath string `json:"file_name"` Line int `json:"line"` Remediation string `json:"remediation"` RemediationType string `json:"remediation_type"` SimilarityID string `json:"similarity_id"` SearchKey string `json:"search_key"` ExpectedValue string `json:"expected_value"` ActualValue string `json:"actual_value"` }
File presents the result information related to the file
type Remediation ¶
type Remediation struct { Line int Remediation string SimilarityID string QueryID string SearchKey string ExpectedValue string ActualValue string }
Remediation presents all the relevant information for the fix
type ReplacementInfo ¶
ReplacementInfo presents the relevant information to do the replacement
type Report ¶
type Report struct {
Queries []Query `json:"queries"`
}
Report includes all query results
type Set ¶
type Set struct { Replacement []Remediation Addition []Remediation }
Set includes all the replacements and additions related to a file
type Summary ¶
Summary represents the information about the number of selected remediation and remediation done
func (*Summary) GetRemediationSets ¶
GetRemediationSets collects all the replacements and additions per file
func (*Summary) GetRemediationSetsFromVulns ¶
func (s *Summary) GetRemediationSetsFromVulns(vulnerabilities []model.Vulnerability, include []string) map[string]interface{}
GetRemediationSetsFromVulns collects all the replacements and additions per file from []model.Vulnerability