-
Notifications
You must be signed in to change notification settings - Fork 1.8k
JS: Add models for webix
#13529
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
JS: Add models for webix
#13529
Conversation
Co-authored-by: Kevin Stubbings <Kwstubbs@users.noreply.github.com>
LGTM, just need an update to the test expectations for |
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.
Some optional comments for using API graphs instead of local data flow. Note that they're written off the top of the my head and I may have made mistakes.
javascript/ql/lib/semmle/javascript/security/dataflow/CodeInjectionCustomizations.qll
Outdated
Show resolved
Hide resolved
javascript/ql/lib/semmle/javascript/security/dataflow/CodeInjectionCustomizations.qll
Outdated
Show resolved
Hide resolved
javascript/ql/lib/semmle/javascript/security/dataflow/CodeInjectionCustomizations.qll
Outdated
Show resolved
Hide resolved
Co-authored-by: Asger F <asgerf@github.com>
Thanks @asgerf! Done ✅ |
@asgerf I noticed that webix could be used in the form of <script src="../../codebase/webix.js" type="text/javascript" charset="utf-8"></script>
<script>webix.extend(object1, object_with_usercontrolled_values) </script> Would CodeQL be able to identify calls inside script tags (within an HTML file)? We would like to support this use case as well if possible. Thanks! |
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.
Would CodeQL be able to identify calls inside script tags (within an HTML file)? We would like to support this use case as well if possible. Thanks!
Yes, we'd usually use DataFlow::globalVarRef("webix")
to find uses of the global variable webix
, see the inline suggestion.
It's slightly cumbersome to get that working with API graphs (we're working on simplifying it). A good example of how to do this can be found in the D3 model:
result = any(D3GlobalEntry i).getANode() |
Nice catch @Kwstubbs, I have adapted the modeling as per #13529 (review) @asgerf suggestion |
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 final comment. I'll start an evaluation of the PR in the meantime.
Co-authored-by: Asger F <asgerf@github.com>
This PR adds modeling for the Webix framework.
cc @Kwstubbs