-
-
Notifications
You must be signed in to change notification settings - Fork 762
feat: add option to use tmux display-popup #3058
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
base: main
Are you sure you want to change the base?
Conversation
sure, but please at least wait until CI passes/finishes lol 😂 |
Greptile Summary
Important Files Changed
Confidence Score: 3/5 - While this is a solid feature implementation, there are potential security concerns around shell command construction, default configuration changes that could surprise users, and some edge cases in version parsing that need attention. |
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.
11 files reviewed, 7 comments
| set -l query (commandline -b | string replace -a "'" "'\\''") | ||
| set -l escaped_args "" | ||
| for arg in $argv | ||
| set escaped_args "$escaped_args '"(string replace -a "'" "'\\''" -- $arg)"'" | ||
| end |
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.
logic: Shell injection vulnerability: query and args are constructed into shell command without proper escaping validation. The escaping logic may not handle all edge cases.
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.
This is likely a false positive. Single quotes are POSIX strong quote, and as variables are wrapped in single quotes within sh -c, replacing every internal single quote with '\'' is sufficient to render all other (special) characters
Oopsie sorry, I forgot about CI... XD |
Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
This is a "continuation" of #1177 - which was a draft that used FIFOs (named pipes) to get output from the popup, however this causes popup not being closed properly, so in this PR I use tmpfile to store the result and read after popup closes. @ellie could you review this PR please?
P.S. Thank you @immae for sharing your idea!
Feature
config.tomlconfig.tomlzsh, bash, fishChecks