I need to understand if the below code will lead to password leak when the below function is called:
#!/bin/sh
function call_function() {
password=$1
echo $password | sed 's/$/\$/g'
}
password1=$(call_function "abcd")
Will the above function return lead to any security risk?
I did try using ps -ef and trying to catch the password however i was not able to see password getting caught.