Thank you for bringing this to our attention!
We had several RnD meetings to discuss this issue and we're considering changing the run-script command so that sensitive data will not be leaked by mistake.
In the meanwhile, you'll be glad to know that there is a way to avoid this issue today (no API change is required):
* The run-script API has an "args" parameter.
* The data in the "args" parameter is passed to the script however the data in the "args" parameter does not appear in the audit logs.
"mgmt_cli run-script script-name 'sample1' script 'my_script.sh -p $1' args 'my secret password' targets r80_20_ga -r true"
The audit log for the above script would show "my_script.sh -p $1" and will not include the secret password.
We'll update the run-script API documentation to bring it to the attention of other users.