-
Notifications
You must be signed in to change notification settings - Fork 1
fix: localstack installation on ubuntu/i3 #77
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
fix: localstack installation on ubuntu/i3 #77
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for addressing this! 👏
I think it's not the best security practice to ask for system credentials in the VS Code input box. A malicious extension could easily mimic such input box. However, I think the implementation is acceptable as long as:
- it stays only as a fallback for advanced Linux users who use custom setups and are more likely to understand the risks/find a workaround to install LocalStack in a different way.
passwordvariable scope is kept as the smallest possible so that the password string is garbage-collected as soon as possible.stdinapproach is kept- no storage/caching - every command should ask for password again.
suggestion: add these points and risks as comments, this code path should be as guarded as possible from misuse.
| }); | ||
|
|
||
| // Write password to stdin and close it | ||
| child.stdin.write(`${password}\n`); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
praise: nice way to avoid exposing password in any kind of output! 👍
65537b2 to
c23df92
Compare
Totally agree. I decided to go with this because it seemed the only alternative was to let the install fail on such systems. Added a comment explaining the security concern like you suggested. |
c23df92 to
8e33d30
Compare
This PR fixes two installation issues with the LocalStack CLI:
pkexecfails due to missing polkit agent (graphical authentication dialog), the installer now falls back to prompting for sudo password via VS Code input boxThis is the password prompt when using i3 (using vscode):
This is the password prompt when using Gnome desktop env (using pkexec):

Sorry for the literal screen shot 😁