Security : Unable to obfuscate JobPreLoad env vars

I am unable to set environment variables within JobPreLoad.py without the values being logged to the console/monitor.
We don’t want to expose the credentials being set.

As per these tickets :

The solution provided in the first link only works in windows, as indicated in the second link.

How can I update env vars for a job without exposing credentials?