8000 Stop logging secret values passed as arguments · Issue #64 · m-lab/alertmanager-github-receiver · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
Stop logging secret values passed as arguments #64
Open
@findmyname666

Description

@findmyname666

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0