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

Stop logging secret values passed as arguments #64

Open
findmyname666 opened this issue Oct 13, 2023 · 0 comments
Open

Stop logging secret values passed as arguments #64

findmyname666 opened this issue Oct 13, 2023 · 0 comments

Comments

@findmyname666
Copy link

findmyname666 commented Oct 13, 2023

Please stop logging authentication creds / token passed as argument or environment variable.
Example beginning of the log:

2023/10/13 10:52:10 Argument alert-template-file=
Alertmanager URL: {{.Data.ExternalURL}}
{{range .Data.Alerts}}
  * {{.Status}} {{.GeneratorURL}}
  {{if .Labels}}
    Labels:
  {{- end}}
  {{range $key, $value := .Labels}}
    - {{$key}} = {{$value -}}
  {{end}}
  {{if .Annotations}}
    Annotations:
  {{- end}}
  {{range $key, $value := .Annotations}}
    - {{$key}} = {{$value -}}
  {{end}}
{{end}}

TODO: add graph url from annotations.

2023/10/13 10:52:10 Argument alertlabel=alert:boom:
2023/10/13 10:52:10 Argument authtoken=github_reducted_
2023/10/13 10:52:10 Argument authtoken-file=

Looking at the code we could use function ArgsFromEnvWithLog(f, false) instead of ArgsFromEnv in the main function.

@findmyname666 findmyname666 changed the title Stop logging secret values passed as a argument(s) Stop logging secret values passed as arguments Oct 13, 2023
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

No branches or pull requests

1 participant