Prevent secret logging #5815
Unanswered
MaelAbgrall
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Heyo
I'm using Axios in my backend, and sometimes there are a few errors. Nothing problematic since everything is in try-catch clauses, but I realised that logging the trace for Axios can leak secrets, so I'm only logging the trace when in dev.
I'm curious if there is a way to log this trace while preventing leaking secrets. Python and FastAPI, for example, had a very handy "secret" type that would replace the string with "******" whenever it was logged.
Is there similar functionality in Axios? A way to indicate a certain variable is a secret and should not be logged in the trace?
Note also that I'm unfortunately dealing with a lot of secrets, so a solution like Python above would be much easier than a bespoke catch clause for every API call I'm making
Beta Was this translation helpful? Give feedback.
All reactions