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

AsLog in cmd to avoid logging sensitive environments #7

Open
nasrulfuad opened this issue Jun 3, 2024 · 0 comments
Open

AsLog in cmd to avoid logging sensitive environments #7

nasrulfuad opened this issue Jun 3, 2024 · 0 comments

Comments

@nasrulfuad
Copy link
Contributor

https://github.com/TelkomIndonesia/go-boilerplate/blob/master/pkg/cmd/cmd.go#L223C1-L224C1

When the app start running, it will log all inside the cmd including sensitive env, like :

portal-klinik-bff-bff-1  | {"level":"info","ts":1717452487.6944478,"caller":"cmd/cmd.go:179","msg":"server starting","server":{"http_listen_addr":":8443","account_service_addr":"xxxx","redis_url":"redis:6379","redis_password":"xxxx","recaptcha_server_key":"xxxx","cmd":{"mac_derivable_keyset_path":"/Users/nasrulfuad/code/projects/his/portal-klinik-bff/pkg/postgres/testdata/tink-mac.json","aead_derivable_keyset_path":"/Users/nasrulfuad/code/projects/his/portal-klinik-bff/pkg/postgres/testdata/tink-aead.json","bidx_derivable_keyset_path":"/Users/nasrulfuad/code/projects/his/portal-klinik-bff/pkg/postgres/testdata/tink-mac.json","bidx_length":16,"tls_key_path":"/Users/nasrulfuad/code/projects/his/portal-klinik-bff/pkg/httpserver/testdata/set1/profile.key","tls_cert_path":"/Users/nasrulfuad/code/projects/his/portal-klinik-bff/pkg/httpserver/testdata/set1/profile.crt","tls_ca_path":"/Users/nasrulfuad/code/projects/his/portal-klinik-bff/pkg/httpserver/testdata/set1/ca.crt","tls_mutual_auth":false,"otel_trace_provider":null,"log_level":null}}}
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