-
-
Notifications
You must be signed in to change notification settings - Fork 4.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Do not set -x for bash userdata #1186
Comments
👍🏽, do not want default behavior to be "spew everything, including secrets" |
Counter point, given
ie you have to be root to see the output, I think having removed -x just makes troubleshooting problems in pre userdata harder, and I missed this change in release notes, but fixed it easily by adding it back inside our script |
You can still set |
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further. |
I have issues
I'm submitting a...
What is the current behavior?
Using
-x
in bash shows all output, unintentional and intentional. Great for debugging, but also a good way to leak sensitive data.Combined with almost every permissive/readonly policy allowing
ec2:Get*
that allows this to be seen easily by read-only users with no access to the instance/secret via theGetConsoleOutput
ec2 call.If this is a bug, how to reproduce? Please include a code sample if relevant.
Output shows:
What's the expected behavior?
Userdata runs but does not show swallowed output
$()
Are you able to fix this problem and submit a PR? Link here if you have already.
Yes.
Environment details
Any other relevant info
The text was updated successfully, but these errors were encountered: