Documentation
¶
Overview ¶
Package codeql provides a source for fetching code scanning alerts from GitHub CodeQL.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Alert ¶
type Alert struct {
Number int `json:"number"`
State string `json:"state"` // "open", "dismissed", "fixed"
Rule Rule `json:"rule"`
Tool Tool `json:"tool"`
MostRecentInstance Instance `json:"most_recent_instance"`
HTMLURL string `json:"html_url"`
}
Alert represents a single code scanning alert.
type AlertCounts ¶
AlertCounts holds alert counts by severity.
type AlertsResponse ¶
type AlertsResponse []Alert
AlertsResponse represents the response from /repos/{owner}/{repo}/code-scanning/alerts. Note: GitHub returns an array of alerts, not a wrapper object.
type Instance ¶
type Instance struct {
Ref string `json:"ref"`
State string `json:"state"`
Location Location `json:"location"`
}
Instance represents a specific occurrence of the alert.
type Location ¶
type Location struct {
Path string `json:"path"`
StartLine int `json:"start_line"`
EndLine int `json:"end_line"`
StartColumn int `json:"start_column"`
EndColumn int `json:"end_column"`
}
Location identifies where the alert was found.
type Rule ¶
type Rule struct {
ID string `json:"id"`
Name string `json:"name"`
Severity string `json:"severity"` // "none", "note", "warning", "error"
SecuritySeverityLevel string `json:"security_severity_level"` // "low", "medium", "high", "critical"
Description string `json:"description"`
Tags []string `json:"tags"`
}
Rule contains information about the rule that triggered the alert.
Click to show internal directories.
Click to hide internal directories.