-
-
Notifications
You must be signed in to change notification settings - Fork 407
fix(941390): add missing javascript prompt
and confirm
methods
#3395
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
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 your PR.
tests/regression/tests/REQUEST-941-APPLICATION-ATTACK-XSS/941390.yaml
Outdated
Show resolved
Hide resolved
PR looks good to me with the exception of the missing double quote. Happy to merge afterwards. |
…90.yaml Co-authored-by: Felipe Zipitría <3012076+fzipi@users.noreply.github.com>
@Xhoenix Can you please add also |
prompt
and confirm
methods
prompt
and confirm
methodsprompt
and confirm
methods
@RedXanadu Is there a way to test these two word additions to the rule using your script? I'm afraid adding them will be way more FP prone 🤔 |
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.
LGTM
Waiting for a comment from @RedXanadu. Ready to merge afterwards. |
I'll run before and after numbers and compare… |
The original rule caused no false positives in the natural language testing. The new regular expression does not cause any false positives with the set of 10,000 English test sentences. I even tried the corpus of 1,000,000 sentences just to be safe, and again there were 0 false positives caused by this new regex. Inevitably, there will be natural language false positives with this eventually. It's easy to create some, e.g.:
But it's easy to work backwards from a regex and create false positive payloads… Certainly, nothing triggered in the news article test sentences 🙂 |
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.
@Xhoenix A question about the change to rules/unix-shell.data
: is that a commit that fixes / belongs to a different issue/PR? I believe that file relates to the 93216x rules.
That So the idea would be to remove that change from this change and open a separate PR for it. It's a welcome addition to unix-shell.data. |
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.
One last small change, so we keep tests clean.
tests/regression/tests/REQUEST-941-APPLICATION-ATTACK-XSS/941390.yaml
Outdated
Show resolved
Hide resolved
tests/regression/tests/REQUEST-941-APPLICATION-ATTACK-XSS/941390.yaml
Outdated
Show resolved
Hide resolved
Cool. Let's get the HTTP methods into the URI and we're ready to merge. |
…90.yaml Co-authored-by: Felipe Zipitría <3012076+fzipi@users.noreply.github.com>
…90.yaml Co-authored-by: Felipe Zipitría <3012076+fzipi@users.noreply.github.com>
Add missing Javascript interaction methods:
prompt()
andconfirm()
.Fixes 9KH-231120-1 and #3381.
Reference: https://javascript.info/alert-prompt-confirm