Documentation
¶
Index ¶
- func BanditStartAnalysis(CID string, cOutput string)
- func BrakemanStartAnalysis(CID string, cOutput string)
- func DockerRun(RID string, analysis *types.Analysis, securityTest types.SecurityTest)
- func EnryStartAnalysis(CID string, cOutput string, RID string)
- func GosecStartAnalysis(CID string, cOutput string)
- func MonitorAnalysis(analysis *types.Analysis)
- func RetirejsStartAnalysis(CID string, cOutput string)
- func SafetyStartAnalysis(CID string, cOutput string)
- func StartAnalysis(RID string, repository types.Repository)
- type BanditOutput
- type BrakemanOutput
- type GosecIssue
- type GosecOutput
- type GosecStats
- type Result
- type RetirejsIdentifier
- type RetirejsIssue
- type RetirejsOutput
- type RetirejsResult
- type RetirejsVulnerability
- type SafetyIssue
- type SafetyOutput
- type WarningItem
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BanditStartAnalysis ¶
BanditStartAnalysis analyses the output from Bandit and sets a cResult based on it.
func BrakemanStartAnalysis ¶
BrakemanStartAnalysis analyses the output from Brakeman and sets a cResult based on it.
func DockerRun ¶
func DockerRun(RID string, analysis *types.Analysis, securityTest types.SecurityTest)
DockerRun starts a new container, runs a given securityTest in it and then updates AnalysisCollection.
func EnryStartAnalysis ¶
EnryStartAnalysis checks the languages of a repository, update them into mongoDB, and starts corresponding new securityTests.
func GosecStartAnalysis ¶
GosecStartAnalysis analyses the output from Gosec and sets a cResult based on it.
func MonitorAnalysis ¶
MonitorAnalysis querys an analysis every retryTick seconds to check if it has already finished.
func RetirejsStartAnalysis ¶
RetirejsStartAnalysis analyses the output from RetireJS and sets cResult basdes on it.
func SafetyStartAnalysis ¶
SafetyStartAnalysis analyses the output from Safety and sets cResult based on it.
func StartAnalysis ¶
func StartAnalysis(RID string, repository types.Repository)
StartAnalysis starts the analysis given a RID and a repository.
Types ¶
type BanditOutput ¶
type BanditOutput struct { Errors json.RawMessage `json:"errors"` Results []Result `json:"results"` }
BanditOutput is the structs that holds the json output form bandit analysis.
type BrakemanOutput ¶
type BrakemanOutput struct {
Warnings []WarningItem `json:"warnings"`
}
BrakemanOutput is the struct that holds issues and stats found on a Brakeman scan.
type GosecIssue ¶
type GosecIssue struct { Severity string `json:"severity"` Confidence string `json:"confidence"` RuleID string `json:"rule_id"` Details string `json:"details"` File string `json:"file"` Code string `json:"code"` Line string `json:"line"` }
GosecIssue is the struct that holds all detailed information of a vulnerability found.
type GosecOutput ¶
type GosecOutput struct { GosecIssues []GosecIssue GosecStats GosecStats }
GosecOutput is the struct that holds issues and stats found on a Gosec scan.
type GosecStats ¶
type GosecStats struct { Files int `json:"files"` Lines int `json:"lines"` NoSec int `json:"nosec"` Found int `json:"found"` }
GosecStats is the struct that holds the stats found on a Gosec scan.
type Result ¶
type Result struct { Code string `json:"code"` Filename string `json:"filename"` IssueConfidence string `json:"issue_confidence"` IssueSeverity string `json:"issue_severity"` IssueText string `json:"issue_text"` LineNumber int `json:"line_number"` LineRange []int `json:"line_range"` TestID string `json:"test_id"` TestName string `json:"test_name"` }
Result is the struct that holds detailed information of issues found in bandit analysis.
type RetirejsIdentifier ¶
type RetirejsIdentifier struct { IssueFound string `json:"issue"` Summary string `json:"summary"` CVE []string `json:"CVE"` }
RetirejsIdentifier is a struct that holds details on the vulnerabilities found.
type RetirejsIssue ¶
type RetirejsIssue struct { File string `json:"file"` RetirejsResults []RetirejsResult `json:"results"` }
RetirejsIssue is a struct that holds the results that were scanned and the file they came from.
type RetirejsOutput ¶
type RetirejsOutput struct { RetirejsIssues []RetirejsIssue `json:"data"` Messages json.RawMessage `json:"messages"` Errors json.RawMessage `json:"errors"` }
RetirejsOutput is the struct that holds issues, messages and errors found on a Retire scan.
type RetirejsResult ¶
type RetirejsResult struct { Version string `json:"version"` Component string `json:"component"` Detection string `json:"detection"` RetirejsVulnerabilities []RetirejsVulnerability `json:"vulnerabilities"` }
RetirejsResult is a struct that holds the vulnerabilities found on a component being used by the code being analysed.
type RetirejsVulnerability ¶
type RetirejsVulnerability struct { Info []string `json:"info"` Below string `json:"below"` Severity string `json:"severity"` RetirejsIdentifiers RetirejsIdentifier `json:"identifiers"` }
RetirejsVulnerability is a struct that holds info on what vulnerabilies were found.
type SafetyIssue ¶
type SafetyIssue struct { Dependency string `json:"dependency"` Below string `json:"vulnerable_below"` Version string `json:"installed_version"` Comment string `json:"description"` ID string `json:"id"` }
SafetyIssue is a struct that holds the results that were scanned and the file they came from.
type SafetyOutput ¶
type SafetyOutput struct {
SafetyIssues []SafetyIssue `json:"issues"`
}
SafetyOutput is the struct that holds issues, messages and errors found on a Safety scan.
type WarningItem ¶
type WarningItem struct { Type string `json:"warning_type"` Code string `json:"code"` Message string `json:"message"` File string `json:"file"` Line int `json:"line"` Details string `json:"link"` Confidence string `json:"confidence"` }
WarningItem is the struct that holds all detailed information of a vulnerability found.