Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddSecurityCommands ¶
AddSecurityCommands adds the 'security' command to the root.
Types ¶
type AlertOutput ¶
type AlertOutput struct {
Repo string `json:"repo"`
Severity string `json:"severity"`
ID string `json:"id"`
Package string `json:"package,omitempty"`
Version string `json:"version,omitempty"`
Location string `json:"location,omitempty"`
Type string `json:"type"`
Message string `json:"message"`
}
AlertOutput represents a unified alert for output.
type AlertSummary ¶
AlertSummary holds aggregated alert counts.
func (*AlertSummary) Add ¶
func (s *AlertSummary) Add(severity string)
Add increments summary counters for the provided severity.
func (*AlertSummary) String ¶
func (s *AlertSummary) String() string
String renders a human-readable summary of alert counts.
type CodeScanningAlert ¶
type CodeScanningAlert struct {
Number int `json:"number"`
State string `json:"state"`
DismissedReason string `json:"dismissed_reason"`
Rule struct {
ID string `json:"id"`
Severity string `json:"severity"`
Description string `json:"description"`
Tags []string `json:"tags"`
} `json:"rule"`
Tool struct {
Name string `json:"name"`
Version string `json:"version"`
} `json:"tool"`
MostRecentInstance struct {
Location struct {
Path string `json:"path"`
StartLine int `json:"start_line"`
EndLine int `json:"end_line"`
} `json:"location"`
Message struct {
Text string `json:"text"`
} `json:"message"`
} `json:"most_recent_instance"`
}
CodeScanningAlert represents a code scanning alert.
type DepAlert ¶
type DepAlert struct {
Repo string `json:"repo"`
Severity string `json:"severity"`
CVE string `json:"cve"`
Package string `json:"package"`
Ecosystem string `json:"ecosystem"`
Vulnerable string `json:"vulnerable_range"`
PatchedVersion string `json:"patched_version,omitempty"`
Manifest string `json:"manifest"`
Summary string `json:"summary"`
}
DepAlert represents a dependency vulnerability for output.
type DependabotAlert ¶
type DependabotAlert struct {
Number int `json:"number"`
State string `json:"state"`
Advisory struct {
Severity string `json:"severity"`
CVEID string `json:"cve_id"`
Summary string `json:"summary"`
Description string `json:"description"`
} `json:"security_advisory"`
Dependency struct {
Package struct {
Name string `json:"name"`
Ecosystem string `json:"ecosystem"`
} `json:"package"`
ManifestPath string `json:"manifest_path"`
} `json:"dependency"`
SecurityVulnerability struct {
Package struct {
Name string `json:"name"`
Ecosystem string `json:"ecosystem"`
} `json:"package"`
FirstPatchedVersion struct {
Identifier string `json:"identifier"`
} `json:"first_patched_version"`
VulnerableVersionRange string `json:"vulnerable_version_range"`
} `json:"security_vulnerability"`
}
DependabotAlert represents a Dependabot vulnerability alert.
type ScanAlert ¶
type ScanAlert struct {
Repo string `json:"repo"`
Severity string `json:"severity"`
RuleID string `json:"rule_id"`
Tool string `json:"tool"`
Path string `json:"path"`
Line int `json:"line"`
Description string `json:"description"`
Message string `json:"message"`
}
ScanAlert represents a code scanning alert for output.
type SecretAlert ¶
type SecretAlert struct {
Repo string `json:"repo"`
Number int `json:"number"`
SecretType string `json:"secret_type"`
State string `json:"state"`
Resolution string `json:"resolution,omitempty"`
PushProtection bool `json:"push_protection_bypassed"`
}
SecretAlert represents a secret scanning alert for output.
type SecretScanningAlert ¶
type SecretScanningAlert struct {
Number int `json:"number"`
State string `json:"state"`
SecretType string `json:"secret_type"`
Secret string `json:"secret"`
PushProtection bool `json:"push_protection_bypassed"`
Resolution string `json:"resolution"`
}
SecretScanningAlert represents a secret scanning alert.
Click to show internal directories.
Click to hide internal directories.