Documentation ¶
Index ¶
- Constants
- Variables
- func GetConsoleEcosystemIcons() map[FindingEcosystemType]string
- func GetConsoleSeverityColors() map[FindingSeverityType]string
- func GetIconForEcosystem(ecosystem FindingEcosystemType, ecosystems []EcosystemConfig) string
- func GetIconForSeverity(severity FindingSeverityType, severities []SeverityConfig) string
- func NewSeverityMap() map[FindingSeverityType]int
- func SetConfigDefaults()
- type Config
- type EcosystemConfig
- type FindingEcosystemType
- type FindingSeverityType
- type SeverityConfig
- type TeamConfig
Constants ¶
View Source
const DEFAULT_SLACK_ICON = " "
Variables ¶
View Source
var SeverityNames = map[FindingSeverityType]string{ FindingSeverityCritical: "Critical", FindingSeverityHigh: "High", FindingSeverityModerate: "Moderate", FindingSeverityLow: "Low", FindingSeverityInfo: "Info", FindingSeverityUndefined: "Undefined", }
Functions ¶
func GetConsoleEcosystemIcons ¶
func GetConsoleEcosystemIcons() map[FindingEcosystemType]string
func GetConsoleSeverityColors ¶
func GetConsoleSeverityColors() map[FindingSeverityType]string
func GetIconForEcosystem ¶
func GetIconForEcosystem(ecosystem FindingEcosystemType, ecosystems []EcosystemConfig) string
func GetIconForSeverity ¶
func GetIconForSeverity(severity FindingSeverityType, severities []SeverityConfig) string
func NewSeverityMap ¶
func NewSeverityMap() map[FindingSeverityType]int
NewSeverityMap returns a map of finding severities all associated with a value of 0, meant to be populated with a count of findings in the relevant scope. Notably, this map does not include either "Info" or "Undefined" severities, as these are only reported if present.
func SetConfigDefaults ¶
func SetConfigDefaults()
Types ¶
type Config ¶
type Config struct { Default_slack_channel string Github_org string Slack_auth_token string Github_token string Quiet bool Verbose int Severity []SeverityConfig Ecosystem []EcosystemConfig Team []TeamConfig Reporters []string }
func GetUserConfig ¶
type EcosystemConfig ¶
type FindingEcosystemType ¶
type FindingEcosystemType string
const ( FindingEcosystemApt FindingEcosystemType = "apt" FindingEcosystemCSharp FindingEcosystemType = "csharp" FindingEcosystemDart FindingEcosystemType = "dart" FindingEcosystemErlang FindingEcosystemType = "erlang" FindingEcosystemGHA FindingEcosystemType = "gha" // GitHub Actions FindingEcosystemGo FindingEcosystemType = "go" FindingEcosystemJava FindingEcosystemType = "java" FindingEcosystemJS FindingEcosystemType = "js" // Includes TypeScript FindingEcosystemPHP FindingEcosystemType = "php" FindingEcosystemPython FindingEcosystemType = "python" FindingEcosystemRPM FindingEcosystemType = "rpm" FindingEcosystemRuby FindingEcosystemType = "ruby" FindingEcosystemRust FindingEcosystemType = "rust" FindingEcosystemSwift FindingEcosystemType = "swift" )
type FindingSeverityType ¶
type FindingSeverityType uint8
const ( FindingSeverityCritical FindingSeverityType = iota FindingSeverityHigh FindingSeverityModerate FindingSeverityLow FindingSeverityInfo FindingSeverityUndefined )
func GetSeverityReportOrder ¶
func GetSeverityReportOrder() []FindingSeverityType
GetSeverityReportOrder returns the order in which we want to report severities. This is necessary because we cannot declare a constant array in Go.
type SeverityConfig ¶
type TeamConfig ¶
func GetTeamConfigBySlug ¶
func GetTeamConfigBySlug(teamSlug string, teams []TeamConfig) (TeamConfig, error)
Click to show internal directories.
Click to hide internal directories.