-
-
Notifications
You must be signed in to change notification settings - Fork 404
fix(security): alias false negative #3740
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
Conversation
tests/regression/tests/REQUEST-932-APPLICATION-ATTACK-RCE/932175.yaml
Outdated
Show resolved
Hide resolved
…75.yaml Co-authored-by: Felipe Zipitría <3012076+fzipi@users.noreply.github.com>
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.
From what I read, using -p
just prints the aliases. How impactful would be that?
It prints and also creates an alias in the same command. For e.g,
works the same as:
|
Looks like zsh has lots of additional options:
|
Yup, looks like zsh also does. I only checked bash because it's the most commonly used shell in servers, but looks like now we've to add zsh too, which would mean we probably need to take into consideration other unix shells. What do you suggest we should do:
|
I think a better approach would be to use a single regex pattern to catch all the flags, like:-
|
Sure, that will work. Check first if the regex has insensitive comparison before adding |
@Xhoenix You are missing |
Also, these needs to be handled if we want to support zsh (all of them should be valid, according to docs):
Additionaly, some examples from the docs not matched right now:
|
After another look, i think you should completely change your regex. Your current work is: i.e. you copied original regex |
I think that do need to be improved. According to our documentation , using an or(|) in the assembly file will create the necessary regex you mentioned. |
Can you send a link? It's definitely not created. I recommend to test your regexes for example on https://regex101.com/ . |
Can you resolve also these? |
Co-authored-by: azurit <jozef@sudolsky.sk>
I checked and the |
Co-authored-by: azurit <jozef@sudolsky.sk>
Co-authored-by: azurit <jozef@sudolsky.sk>
tests/regression/tests/REQUEST-932-APPLICATION-ATTACK-RCE/932175.yaml
Outdated
Show resolved
Hide resolved
@Xhoenix Feel free to merge this. |
Unix alias bypass with
-p
flag in bash shell.