diff --git a/internal/patrol/config.go b/internal/patrol/config.go index b2b55ee..7caf4d6 100644 --- a/internal/patrol/config.go +++ b/internal/patrol/config.go @@ -28,5 +28,9 @@ func getConfiguration(filename string) (config scanner.ProjectConfig, found bool log.Warn().Strs("keys", keys).Msg("Found undecoded keys in project configuration") } + if config.SlackChannel != "" { + config.ReportToSlackChannel = config.SlackChannel + } + return config, true, nil } diff --git a/internal/scanner/vulnscanner.go b/internal/scanner/vulnscanner.go index 77e8089..f66cad9 100644 --- a/internal/scanner/vulnscanner.go +++ b/internal/scanner/vulnscanner.go @@ -51,6 +51,7 @@ type AcknowledgedVuln struct { type ProjectConfig struct { ReportToSlackChannel string `toml:"report-to-slack-channel"` + SlackChannel string `toml:"slack-channel"` // TODO #27: Break in v1.0. Kept for backwards-compatibility Acknowledged []AcknowledgedVuln `toml:"acknowledged"` }