Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Get Slack token from file instead of environment variable #72

Merged
merged 2 commits into from
Nov 28, 2023

Conversation

vcatlassian
Copy link
Contributor

Following Kubernetes security best practice (https://www.tenable.com/audits/items/CIS_Kubernetes_v1.6.1_Level_2_Master.audit:98de3da69271994afb6211cf86ae4c6b), try to get Slack token from file first, only when the file name is not set, fall back to load token from environment variable directly. Also added unit tests and updated doc.

Closes #71.

otherwise get it from env var
awprice
awprice previously approved these changes Nov 27, 2023
Copy link
Collaborator

@awprice awprice left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Good to see the changes are backwards compatible

pkg/notifications/slack/builder.go Outdated Show resolved Hide resolved
pkg/notifications/slack/builder.go Outdated Show resolved Hide resolved
@vcatlassian vcatlassian merged commit 8d07962 into master Nov 28, 2023
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Feature Request] Get Slack token from file instead of environment variable
4 participants