diff --git a/config/config.go b/config/config.go index 1777d6a..7522c7b 100644 --- a/config/config.go +++ b/config/config.go @@ -19,7 +19,6 @@ type TeamConfig struct { type Config struct { Default_slack_channel string - Disable_slack bool Github_org string Slack_auth_token string Github_token string @@ -28,6 +27,7 @@ type Config struct { Severity []SeverityConfig Ecosystem []EcosystemConfig Team []TeamConfig + Reporters []string } func fileExists(fname string) bool { diff --git a/internal/scan.go b/internal/scan.go index 9497f26..f97c6e0 100644 --- a/internal/scan.go +++ b/internal/scan.go @@ -36,7 +36,7 @@ func Scan(cmd *cobra.Command, args []string) { // Load and report out to all configured reporters reporters := []reporting.Reporter{} - if !cfg.Disable_slack { + if slices.Contains(cfg.Reporters, "slack") { slackReporter, err := reporting.NewSlackReporter(&cfg) if err != nil { log.Error().Err(err).Msg("Failed to create Slack reporter.")