-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
JavaScript CodeQL library updates: new Angular source and sink #18397
base: main
Are you sure you want to change the base?
Conversation
javascript/ql/lib/semmle/javascript/security/dataflow/RemoteFlowSources.qll
Fixed
Show fixed
Hide fixed
javascript/ql/lib/semmle/javascript/security/dataflow/RemoteFlowSources.qll
Fixed
Show fixed
Hide fixed
javascript/ql/lib/semmle/javascript/security/dataflow/RemoteFlowSources.qll
Fixed
Show fixed
Hide fixed
javascript/ql/lib/semmle/javascript/security/dataflow/RemoteFlowSources.qll
Fixed
Show fixed
Hide fixed
javascript/ql/lib/semmle/javascript/security/dataflow/RemoteFlowSources.qll
Fixed
Show fixed
Hide fixed
I'm wondering which other properties being set on elements might need to be treated as XSS sinks, so that I don't fix up just I'll see if I can copy what's done in the existing library. I'm thinking that |
.getMember("setProperty") | ||
.getACall() and | ||
this = setProperty.getParameter(2).asSink() and | ||
setProperty.getParameter(1).asSink().asExpr().(StringLiteral).getValue() = "innerHTML" |
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.
setProperty.getParameter(1).asSink().asExpr().(StringLiteral).getValue() = "innerHTML" | |
setProperty.getArgument(1).getStringValue() = "innerHTML" |
/** | ||
* A remote flow source that is a member of an Angular component class. | ||
*/ | ||
private class AngularInputUse extends RemoteFlowSource, InputMemberUse { |
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.
As discussed internally, I'd prefer to introduce a threat model kind for view component inputs like this, as they're not truly remote inputs.
You might be able to model this as an |
Pull Request checklist
All query authors
.qhelp
. See the documentation in this repository.Internal query authors only
.ql
,.qll
, or.qhelp
files. See the documentation (internal access required).