diff --git a/config/config.go b/config/config.go index db5f60d..201d615 100644 --- a/config/config.go +++ b/config/config.go @@ -10,16 +10,6 @@ import ( "github.com/spf13/viper" ) -type SeverityConfig struct { - Label string - Slack_emoji string -} - -type EcosystemConfig struct { - Label string - Slack_emoji string -} - type TeamConfig struct { Name string Github_slug string diff --git a/config/ecosystems.go b/config/ecosystems.go index 5df4114..93b2435 100644 --- a/config/ecosystems.go +++ b/config/ecosystems.go @@ -18,3 +18,18 @@ const ( FindingEcosystemRust FindingEcosystemType = "rust" FindingEcosystemSwift FindingEcosystemType = "swift" ) + +func GetConsoleEcosystemIcons() map[FindingEcosystemType]string { + return map[FindingEcosystemType]string{ + FindingEcosystemGo: "🦦", + FindingEcosystemJava: "🪶 ", + FindingEcosystemJS: "⬢ ", + FindingEcosystemPython: "🐍", + FindingEcosystemRuby: "♦️ ", + } +} + +type EcosystemConfig struct { + Label string + Slack_emoji string +} diff --git a/config/severities.go b/config/severities.go index a03db9e..6f3e17e 100644 --- a/config/severities.go +++ b/config/severities.go @@ -45,3 +45,19 @@ func GetSeverityReportOrder() []FindingSeverityType { FindingSeverityUndefined, } } + +func GetConsoleSeverityColors() map[FindingSeverityType]string { + return map[FindingSeverityType]string{ + FindingSeverityCritical: "#B21515", + FindingSeverityHigh: "#D26C00", + FindingSeverityModerate: "#FBD100", + FindingSeverityLow: "#233EB5", + FindingSeverityInfo: "#56B8F5", + FindingSeverityUndefined: "#CFD0D1", + } +} + +type SeverityConfig struct { + Label string + Slack_emoji string +}