-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Java: CWE-079 Query to detect XSS with JavaServer Faces (JSF) #6393
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
javaGenerated file changes for java
- Java extensions,"``javax.*``, ``jakarta.*``",22,540,18,,,,,1,1,2
+ Java extensions,"``javax.*``, ``jakarta.*``",42,540,22,,,4,,1,1,2
- Totals,,84,2465,296,13,6,6,107,33,1,66
+ Totals,,104,2465,300,13,6,10,107,33,1,66
+ jakarta.faces.context,2,10,,,,,,,,,,,,,,2,10,,
+ javax.faces.context,2,10,,,,,,,,,,,,,,2,10,, |
I don't think we need this: there are lots of possible XSS vectors; we don't need to enumerate every one in the qhelp file.
Per previous commit, no need for a top-level JSF example
JSP and Servlet already shared this logic; might as well add JSF into the same mechanism.
These access application-owned resources AFAICT
2f6a53e
to
fcc0f1d
Compare
@luchua-bc I've polished this up to what I'd consider main query-pack standard -- you might want to take a look at the new commits to see what's changed which would be welcome in future for any query targeting the main (non-experimental) suite. |
Thanks @smowton a lot for refactoring the query into the main (non-experimental) suite. Those separate commits are crystal clear. I will make sure future queries follow the best practices:
|
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.
javaGenerated file changes for java
- Java extensions,"``javax.*``, ``jakarta.*``",40,552,27,,,,,1,1,2
+ Java extensions,"``javax.*``, ``jakarta.*``",54,552,31,,,4,,1,1,2
- Totals,,102,3554,398,13,6,6,107,33,1,66
+ Totals,,116,3554,402,13,6,10,107,33,1,66
+ jakarta.faces.context,2,7,,,,,,,,,,,,,,,,,,2,7,,
+ javax.faces.context,2,7,,,,,,,,,,,,,,,,,,2,7,, |
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.
Proxying @aschackmull's approval
JavaServer Faces (JSF) is a Java-based MVC web application framework intended to simplify development integration of web-based user interfaces. JavaServer Faces is a standardized display technology for component-based UI development, which was formalized through the Java Community Process and is a part of the Java EE platform.
JSF UI components are rendered as markup languages such as HTML and XML through a JSF
renderer
. User inputs that don't have proper sanitization and are directly written to a JSFrenderer
make the website vulnerable to cross-site scripting.The query detects unsafe usage of JSF
renderer
that are vulnerable to XSS attacks. Please consider to merge the PR. Thanks.