Documentation ¶
Index ¶
- Variables
- type Analysis
- type BanditOutput
- type BrakemanOutput
- type Container
- type GosecIssue
- type GosecOutput
- type GosecStats
- type JSONPayload
- type Result
- type RetirejsIdentifier
- type RetirejsIssue
- type RetirejsOutput
- type RetirejsResult
- type RetirejsVulnerability
- type SafetyIssue
- type SafetyOutput
- type SecurityTest
- type WarningItem
Constants ¶
This section is empty.
Variables ¶
var FoundVuln bool
FoundVuln is the boolean that will be checked to return an os.exit(0) or os.exit(1)
Functions ¶
This section is empty.
Types ¶
type Analysis ¶
type Analysis struct { ID bson.ObjectId `bson:"_id,omitempty"` RID string `bson:"RID" json:"RID"` URL string `bson:"repositoryURL" json:"repositoryURL"` Branch string `bson:"repositoryBranch" json:"repositoryBranch"` SecurityTests []SecurityTest `bson:"securityTests" json:"securityTests"` Status string `bson:"status" json:"status"` Result string `bson:"result" json:"result"` Containers []Container `bson:"containers" json:"containers"` }
Analysis is the struct that stores all data from analysis performed.
type BanditOutput ¶
type BanditOutput struct { Errors json.RawMessage `json:"errors"` Results []Result `json:"results"` }
BanditOutput is the struct that holds all data from Bandit output.
type BrakemanOutput ¶
type BrakemanOutput struct {
Warnings []WarningItem `json:"warnings"`
}
BrakemanOutput is the struct that holds issues and stats found on a Brakeman scan.
type Container ¶
type Container struct { CID string `bson:"CID" json:"CID"` SecurityTest SecurityTest `bson:"securityTest" json:"securityTest"` CStatus string `bson:"cStatus" json:"cStatus"` COutput string `bson:"cOutput" json:"cOutput"` CResult string `bson:"cResult" json:"cResult"` CInfo string `bson:"cInfo" json:"cInfo"` StartedAt time.Time `bson:"startedAt" json:"startedAt"` FinishedAt time.Time `bson:"finishedAt" json:"finishedAt"` }
Container is the struct that stores all data from a container run.
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 issues from Gosec output.
type GosecOutput ¶
type GosecOutput struct { GosecIssues []GosecIssue `json:"Issues"` GosecStats GosecStats `json:"Stats"` }
GosecOutput is the struct that holds all data from Gosec output.
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 all stats from Gosec output.
type JSONPayload ¶
type JSONPayload struct { RepositoryURL string `json:"repositoryURL"` RepositoryBranch string `json:"repositoryBranch"` }
JSONPayload is a struct that represents the JSON payload needed to make a HuskyCI API request.
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 from Bandit output.
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 SecurityTest ¶
type SecurityTest struct { ID bson.ObjectId `bson:"_id,omitempty"` Name string `bson:"name" json:"name"` Image string `bson:"image" json:"image"` Cmd string `bson:"cmd" json:"cmd"` Language string `bson:"language" json:"language"` Default bool `bson:"default" json:"default"` TimeOutInSeconds int `bson:"timeOutSeconds" json:"timeOutSeconds"` }
SecurityTest is the struct that stores all data from the security tests to be executed.
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.