Avoiding logging/leaking auth credentials during sqlpage.exec() calls #218
-
Hi @lovasoa, I'm exploring methods to prevent credentials from being exposed in shell logs when using For tools like Could you provide insights on how SQLPage handles the arguments passed to |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
SQLPage calls just the command you pass to it (so if you run curl, it will launch the curl binary, not bash). It the collects the program's stdout and makes it available to your sql file. If you don't print it explicitly, it won't be printed. |
Beta Was this translation helpful? Give feedback.
-
The arguments to the command can still be leaked as part of the error message if the command fails. But the full error will not be displayed if you are in production mode (ENVIRONMENT=production) : https://github.com/lovasoa/SQLpage/blob/main/configuration.md#configuring-sqlpage If you want to read the full code, it's here: https://github.com/lovasoa/SQLpage/blob/main/src%2Fwebserver%2Fdatabase%2Fsql_pseudofunctions.rs#L157 |
Beta Was this translation helpful? Give feedback.
SQLPage calls just the command you pass to it (so if you run curl, it will launch the curl binary, not bash). It the collects the program's stdout and makes it available to your sql file. If you don't print it explicitly, it won't be printed.
So nothing is printed to SQLPage's logs at the default logging level, and nothing gets into bash_history, since bash isn't even part of the picture.