-
Notifications
You must be signed in to change notification settings - Fork 1.7k
JS: refactor most library models away from AST nodes #8604
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
Merged
Merged
Changes from all commits
Commits
Show all changes
39 commits
Select commit
Hold shift + click to select a range
a03e6a8
deprecate the HTTP `flowsTo` predicates to avoid confusion with `Sour…
erik-krogh d4ccc75
refactor RedirectInvocation to a DataFlow::Node
erik-krogh ce0175a
don't use `astNode` in `StandardHeaderDefinition`
erik-krogh 19e8081
refactor `definesExplicitly` to use DataFlow::Node
erik-krogh 24b8455
change `ResponseBody` to a `DataFlow::Node`
erik-krogh ced4843
change `CookieDefinition` to a `DataFlow::Node`
erik-krogh d98028b
change `ServerDefinition` to a `DataFlow::Node`
erik-krogh 9cb7522
change `RouteSetup` to a `DataFlow::Node`
erik-krogh 30d9299
deprecate `RequestExpr` and `ResponseExpr` and use `ResponseNode` and…
erik-krogh 288230d
update tests to reflect the extra DataFlow::Nodes from `ResponseNode`…
erik-krogh dfb7782
replace `getA?RouteHandlerExpr` with `getA?RouteHandlerNode`
erik-krogh 9224038
update the tests to reflect the extra `DataFlow::Node`s
erik-krogh 3eb4866
update `Express::RouterDefinition` to a `DataFlow::InvokeNode`
erik-krogh 3da34ca
update `Express::RouteExpr` to a `DataFlow::Node`
erik-krogh 4cfbf15
deprecate `RouteHandlerExpr` and make `RouteHandlerNode` instead
erik-krogh 8266b08
update the predicates on `Express::RouteHandler` to use dataflow nodes
erik-krogh fc54ba8
update the existing expression based Express models
erik-krogh 136124f
convert the remaining Koa models to DataFlow nodes
erik-krogh 2f429e7
convert some leftovers to use dataflow nodes
erik-krogh 9bea110
convert the DOM model to use DataFlow nodes
erik-krogh aa9261f
convert the AngularJS model to use DataFlow nodes
erik-krogh 5ebea8c
fix express in the POI test
erik-krogh e0e8085
update the cryptoLibraries to use dataflow nodes
erik-krogh 4d05343
refactor a use of MethodCallExpr in `ClientSideUrlRedirectCustomizati…
erik-krogh c5b1588
update the SQL/NoSQL models to use dataflow nodes
erik-krogh 0c4f08c
refactor the CredentialsExpr to be a dataflow node
erik-krogh b4968eb
refactor the SensitiveExpr to be a dataflow node
erik-krogh 6697dd1
rewrite some expression based predicates in `TaintTracking.qll`
erik-krogh 5b61db9
refactor miscellaneous expression uses to dataflow nodes
erik-krogh 833480d
add change note
erik-krogh 73a9361
fix typo in qldoc
erik-krogh 74a79f8
simplify int check
erik-krogh e387eba
add `domNode.innerHTML += sink` as a DOM sink
erik-krogh 26f5643
update the deprecation notice of `RouteExpr` such that it points to p…
erik-krogh e64f96c
rewrite the change-note to emphasise that the change is potentially b…
erik-krogh b398f96
expand change-note to mention classes that have a changed basetype
erik-krogh 90bc8a5
run the explicit-this patch on javascript/
erik-krogh 54eb041
rename an upper-cased acronym
erik-krogh 4e14177
fix typo in change-note
erik-krogh File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
57 changes: 57 additions & 0 deletions
57
javascript/ql/lib/change-notes/2022-04-04-dataflow-models.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
--- | ||
category: breaking | ||
--- | ||
* Many library models have been rewritten to use dataflow nodes instead of the AST. | ||
The types of some classes have been changed, and these changes may break existing code. | ||
Other classes and predicates have been renamed, in these cases the old name is still available as a deprecated feature. | ||
|
||
* The basetype of the following list of classes has changed from an expression to a dataflow node, and thus code using these classes might break. | ||
The fix to these breakages is usually to use `asExpr()` to get an expression from a dataflow node, or to use `.flow()` to get a dataflow node from an expression. | ||
- DOM.qll#WebStorageWrite | ||
- CryptoLibraries.qll#CryptographicOperation | ||
- Express.qll#Express::RequestBodyAccess | ||
- HTTP.qll#HTTP::ResponseBody | ||
- HTTP.qll#HTTP::CookieDefinition | ||
- HTTP.qll#HTTP::ServerDefinition | ||
- HTTP.qll#HTTP::RouteSetup | ||
- NoSQL.qll#NoSql::Query | ||
- SQL.qll#SQL::SqlString | ||
- SQL.qll#SQL::SqlSanitizer | ||
- HTTP.qll#ResponseBody | ||
- HTTP.qll#CookieDefinition | ||
- HTTP.qll#ServerDefinition | ||
- HTTP.qll#RouteSetup | ||
- HTTP.qll#HTTP::RedirectInvocation | ||
- HTTP.qll#RedirectInvocation | ||
- Express.qll#Express::RouterDefinition | ||
- AngularJSCore.qll#LinkFunction | ||
- Connect.qll#Connect::StandardRouteHandler | ||
- CryptoLibraries.qll#CryptographicKeyCredentialsExpr | ||
- AWS.qll#AWS::Credentials | ||
- Azure.qll#Azure::Credentials | ||
- Connect.qll#Connect::Credentials | ||
- DigitalOcean.qll#DigitalOcean::Credentials | ||
- Express.qll#Express::Credentials | ||
- NodeJSLib.qll#NodeJSLib::Credentials | ||
- PkgCloud.qll#PkgCloud::Credentials | ||
- Request.qll#Request::Credentials | ||
- ServiceDefinitions.qll#InjectableFunctionServiceRequest | ||
- SensitiveActions.qll#SensitiveVariableAccess | ||
- SensitiveActions.qll#CleartextPasswordExpr | ||
- Connect.qll#Connect::ServerDefinition | ||
- Restify.qll#Restify::ServerDefinition | ||
- Connect.qll#Connect::RouteSetup | ||
- Express.qll#Express::RouteSetup | ||
- Fastify.qll#Fastify::RouteSetup | ||
- Hapi.qll#Hapi::RouteSetup | ||
- Koa.qll#Koa::RouteSetup | ||
- Restify.qll#Restify::RouteSetup | ||
- NodeJSLib.qll#NodeJSLib::RouteSetup | ||
- Express.qll#Express::StandardRouteHandler | ||
- Express.qll#Express::SetCookie | ||
- Hapi.qll#Hapi::RouteHandler | ||
- HTTP.qll#HTTP::Servers::StandardHeaderDefinition | ||
- HTTP.qll#Servers::StandardHeaderDefinition | ||
- Hapi.qll#Hapi::ServerDefinition | ||
- Koa.qll#Koa::AppDefinition | ||
- SensitiveActions.qll#SensitiveCall |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.