mirror of
https://github.com/github/codeql.git
synced 2025-12-24 04:36:35 +01:00
JS: delete various outdated deprecations
This commit is contained in:
@@ -153,12 +153,6 @@ module API {
|
||||
*/
|
||||
DataFlow::SourceNode asSource() { Impl::use(this, result) }
|
||||
|
||||
/** DEPRECATED. This predicate has been renamed to `asSource`. */
|
||||
deprecated DataFlow::SourceNode getAnImmediateUse() { result = this.asSource() }
|
||||
|
||||
/** DEPRECATED. This predicate has been renamed to `getAValueReachableFromSource`. */
|
||||
deprecated DataFlow::Node getAUse() { result = this.getAValueReachableFromSource() }
|
||||
|
||||
/**
|
||||
* Gets a call to the function represented by this API component.
|
||||
*/
|
||||
@@ -212,12 +206,6 @@ module API {
|
||||
*/
|
||||
DataFlow::Node getAValueReachingSink() { result = Impl::trackDefNode(this.asSink()) }
|
||||
|
||||
/** DEPRECATED. This predicate has been renamed to `asSink`. */
|
||||
deprecated DataFlow::Node getARhs() { result = this.asSink() }
|
||||
|
||||
/** DEPRECATED. This predicate has been renamed to `getAValueReachingSink`. */
|
||||
deprecated DataFlow::Node getAValueReachingRhs() { result = this.getAValueReachingSink() }
|
||||
|
||||
/**
|
||||
* Gets a node representing member `m` of this API component.
|
||||
*
|
||||
@@ -622,12 +610,6 @@ module API {
|
||||
bindingset[this]
|
||||
EntryPoint() { any() }
|
||||
|
||||
/** DEPRECATED. This predicate has been renamed to `getASource`. */
|
||||
deprecated DataFlow::SourceNode getAUse() { none() }
|
||||
|
||||
/** DEPRECATED. This predicate has been renamed to `getASink`. */
|
||||
deprecated DataFlow::SourceNode getARhs() { none() }
|
||||
|
||||
/** Gets a data-flow node where a value enters the current codebase through this entry-point. */
|
||||
DataFlow::SourceNode getASource() { none() }
|
||||
|
||||
|
||||
@@ -138,14 +138,6 @@ module DataFlow {
|
||||
CallGraph::getABoundFunctionReference(result, boundArgs, _).flowsTo(this)
|
||||
}
|
||||
|
||||
/**
|
||||
* DEPRECATED: Use `DataFlow::ParameterNode::flowsTo()` instead.
|
||||
* Holds if this expression may refer to the initial value of parameter `p`.
|
||||
*/
|
||||
deprecated predicate mayReferToParameter(Parameter p) {
|
||||
parameterNode(p).(SourceNode).flowsTo(this)
|
||||
}
|
||||
|
||||
/**
|
||||
* Holds if this element is at the specified location.
|
||||
* The location spans column `startcolumn` of line `startline` to
|
||||
|
||||
@@ -1150,30 +1150,12 @@ module ClassNode {
|
||||
cached
|
||||
abstract FunctionNode getStaticMember(string name, MemberKind kind);
|
||||
|
||||
/**
|
||||
* DEPRECATED. Override `getStaticMember` instead.
|
||||
*
|
||||
* Gets the static method of this class with the given name.
|
||||
*/
|
||||
cached
|
||||
deprecated FunctionNode getStaticMethod(string name) { none() }
|
||||
|
||||
/**
|
||||
* Gets a static member of this class of the given kind.
|
||||
*/
|
||||
cached
|
||||
abstract FunctionNode getAStaticMember(MemberKind kind);
|
||||
|
||||
/**
|
||||
* DEPRECATED. Override `getAStaticMember` instead.
|
||||
*
|
||||
* Gets a static method of this class.
|
||||
*
|
||||
* The constructor is not considered a static method.
|
||||
*/
|
||||
cached
|
||||
deprecated FunctionNode getAStaticMethod() { none() }
|
||||
|
||||
/**
|
||||
* Gets a dataflow node representing a class to be used as the super-class
|
||||
* of this node.
|
||||
|
||||
@@ -75,9 +75,6 @@ predicate isExternsFile(File f) {
|
||||
*/
|
||||
predicate isLibraryFile(File f) { f.getATopLevel() instanceof FrameworkLibraryInstance }
|
||||
|
||||
/** DEPRECATED: Alias for isLibraryFile */
|
||||
deprecated predicate isLibaryFile = isLibraryFile/1;
|
||||
|
||||
/**
|
||||
* Holds if `f` contains template code.
|
||||
*/
|
||||
|
||||
@@ -618,27 +618,6 @@ private class JQLiteObject extends JQuery::ObjectSource::Range {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* DEPRECATED: Use `AngularJSCallNode` instead.
|
||||
* A call to an AngularJS function.
|
||||
*
|
||||
* Used for exposing behavior that is similar to the behavior of other libraries.
|
||||
*/
|
||||
deprecated class AngularJSCall extends CallExpr {
|
||||
AngularJSCallNode node;
|
||||
|
||||
AngularJSCall() { this.flow() = node }
|
||||
|
||||
/** Holds if `e` is an argument that this call interprets as HTML. */
|
||||
deprecated predicate interpretsArgumentAsHtml(Expr e) { node.interpretsArgumentAsHtml(e.flow()) }
|
||||
|
||||
/** Holds if `e` is an argument that this call stores globally, e.g. in a cookie. */
|
||||
deprecated predicate storesArgumentGlobally(Expr e) { node.storesArgumentGlobally(e.flow()) }
|
||||
|
||||
/** Holds if `e` is an argument that this call interprets as code. */
|
||||
deprecated predicate interpretsArgumentAsCode(Expr e) { node.interpretsArgumentAsCode(e.flow()) }
|
||||
}
|
||||
|
||||
/**
|
||||
* A call to an AngularJS function.
|
||||
*
|
||||
|
||||
@@ -447,21 +447,6 @@ BuiltinServiceReference getBuiltinServiceOfKind(string kind) {
|
||||
)
|
||||
}
|
||||
|
||||
/**
|
||||
* DEPRECATED: Use `ServiceRequestNode` instead.
|
||||
* A request for one or more AngularJS services.
|
||||
*/
|
||||
deprecated class ServiceRequest extends Expr {
|
||||
ServiceRequestNode node;
|
||||
|
||||
ServiceRequest() { this.flow() = node }
|
||||
|
||||
/** Gets the parameter of this request into which `service` is injected. */
|
||||
deprecated Parameter getDependencyParameter(ServiceReference service) {
|
||||
result.flow() = node.getDependencyParameter(service)
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* A request for one or more AngularJS services.
|
||||
*/
|
||||
|
||||
@@ -118,8 +118,6 @@ module Connect {
|
||||
override string getCredentialsKind() { result = kind }
|
||||
}
|
||||
|
||||
deprecated class RequestExpr = NodeJSLib::RequestExpr;
|
||||
|
||||
class RequestNode = NodeJSLib::RequestNode;
|
||||
|
||||
/**
|
||||
|
||||
@@ -5,23 +5,6 @@
|
||||
|
||||
import javascript
|
||||
|
||||
/**
|
||||
* DEPRECATED: Use `CredentialsNode` instead.
|
||||
* An expression whose value is used to supply credentials such
|
||||
* as a user name, a password, or a key.
|
||||
*/
|
||||
deprecated class CredentialsExpr extends Expr {
|
||||
CredentialsNode node;
|
||||
|
||||
CredentialsExpr() { node.asExpr() = this }
|
||||
|
||||
/**
|
||||
* Gets a description of the kind of credential this expression is used as,
|
||||
* such as `"user name"`, `"password"`, `"key"`.
|
||||
*/
|
||||
deprecated string getCredentialsKind() { result = node.getCredentialsKind() }
|
||||
}
|
||||
|
||||
/**
|
||||
* An expression whose value is used to supply credentials such
|
||||
* as a user name, a password, or a key.
|
||||
|
||||
@@ -55,14 +55,6 @@ module Express {
|
||||
WebpackDevServer::webpackDevServerApp().flowsTo(e)
|
||||
}
|
||||
|
||||
/**
|
||||
* DEPRECATED: Use `RouterDefinition.ref()` or `RouteSetup` instead.
|
||||
* An expression that refers to a route.
|
||||
*/
|
||||
deprecated class RouteExpr extends MethodCallExpr {
|
||||
RouteExpr() { isRouter(this.flow()) }
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the name of an Express router method that sets up a route.
|
||||
*/
|
||||
@@ -145,17 +137,6 @@ module Express {
|
||||
/** Holds if this is a call `use`, such as `app.use(handler)`. */
|
||||
predicate isUseCall() { this.getMethodName() = "use" }
|
||||
|
||||
/**
|
||||
* DEPRECATED: Use `getRouteHandlerNode` instead.
|
||||
* Gets the `n`th handler registered by this setup, with 0 being the first.
|
||||
*
|
||||
* This differs from `getARouteHandler` in that the argument expression is
|
||||
* returned, not its dataflow source.
|
||||
*/
|
||||
deprecated Expr getRouteHandlerExpr(int index) {
|
||||
result = this.getRouteHandlerNode(index).asExpr()
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the `n`th handler registered by this setup, with 0 being the first.
|
||||
*
|
||||
@@ -174,25 +155,11 @@ module Express {
|
||||
)
|
||||
}
|
||||
|
||||
/**
|
||||
* DEPRECATED: Use `getARouteHandlerNode` instead.
|
||||
* Gets an argument that represents a route handler being registered.
|
||||
*/
|
||||
deprecated Expr getARouteHandlerExpr() { result = this.getRouteHandlerExpr(_) }
|
||||
|
||||
/**
|
||||
* Gets an argument that represents a route handler being registered.
|
||||
*/
|
||||
DataFlow::Node getARouteHandlerNode() { result = this.getRouteHandlerNode(_) }
|
||||
|
||||
/**
|
||||
* DEPRECATED: Use `getLastRouteHandlerExpr` instead.
|
||||
* Gets the last argument representing a route handler being registered.
|
||||
*/
|
||||
deprecated Expr getLastRouteHandlerExpr() {
|
||||
result = max(int i | | this.getRouteHandlerExpr(i) order by i)
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the last argument representing a route handler being registered.
|
||||
*/
|
||||
@@ -294,52 +261,6 @@ module Express {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* DEPRECATED: Use `RouteHandlerNode` instead.
|
||||
* An expression used as an Express route handler, such as `submitHandler` below:
|
||||
* ```
|
||||
* app.post('/submit', submitHandler)
|
||||
* ```
|
||||
*
|
||||
* Unlike `RouterHandler`, this is the argument passed to a setup, as opposed to
|
||||
* a function that flows into such an argument.
|
||||
*/
|
||||
deprecated class RouteHandlerExpr extends Expr {
|
||||
RouteHandlerNode node;
|
||||
|
||||
RouteHandlerExpr() { this.flow() = node }
|
||||
|
||||
/** Gets the setup call that registers this route handler. */
|
||||
deprecated RouteSetup getSetup() { result = node.getSetup() }
|
||||
|
||||
/** Gets the function body of this handler, if it is defined locally. */
|
||||
deprecated RouteHandler getBody() { result = node.getBody() }
|
||||
|
||||
/** Holds if this is not followed by more handlers. */
|
||||
deprecated predicate isLastHandler() { node.isLastHandler() }
|
||||
|
||||
/** Gets a route handler that immediately precedes this in the route stack. */
|
||||
deprecated Express::RouteHandlerExpr getPreviousMiddleware() {
|
||||
result = node.getPreviousMiddleware().asExpr()
|
||||
}
|
||||
|
||||
/** Gets a route handler that may follow immediately after this one in its route stack. */
|
||||
deprecated Express::RouteHandlerExpr getNextMiddleware() {
|
||||
result = node.getNextMiddleware().asExpr()
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets a route handler that precedes this one (not necessarily immediately), may handle
|
||||
* same request method, and matches on the same path or a prefix.
|
||||
*/
|
||||
deprecated Express::RouteHandlerExpr getAMatchingAncestor() {
|
||||
result = node.getAMatchingAncestor().asExpr()
|
||||
}
|
||||
|
||||
/** Gets the router being registered as a sub-router here, if any. */
|
||||
deprecated RouterDefinition getAsSubRouter() { result = node.getAsSubRouter() }
|
||||
}
|
||||
|
||||
/**
|
||||
* An expression used as an Express route handler, such as `submitHandler` below:
|
||||
* ```
|
||||
@@ -584,14 +505,6 @@ module Express {
|
||||
override RouteHandler getRouteHandler() { none() } // Not known.
|
||||
}
|
||||
|
||||
/**
|
||||
* DEPRECATED: Use `ResponseNode` instead.
|
||||
* An Express response expression.
|
||||
*/
|
||||
deprecated class ResponseExpr extends NodeJSLib::ResponseExpr {
|
||||
ResponseExpr() { this.flow() instanceof ResponseNode }
|
||||
}
|
||||
|
||||
/**
|
||||
* An Express response expression.
|
||||
*/
|
||||
@@ -599,14 +512,6 @@ module Express {
|
||||
override ResponseSource src;
|
||||
}
|
||||
|
||||
/**
|
||||
* DEPRECATED: Use `RequestNode` instead.
|
||||
* An Express request expression.
|
||||
*/
|
||||
deprecated class RequestExpr extends NodeJSLib::RequestExpr {
|
||||
RequestExpr() { this.flow() instanceof RequestNode }
|
||||
}
|
||||
|
||||
/**
|
||||
* An Express request expression.
|
||||
*/
|
||||
|
||||
@@ -154,12 +154,6 @@ module Fastify {
|
||||
|
||||
override DataFlow::SourceNode getServer() { result = server }
|
||||
|
||||
/**
|
||||
* DEPRECATED: Use `getARouteHandlerNode` instead.
|
||||
* Gets an argument that represents a route handler being registered.
|
||||
*/
|
||||
deprecated DataFlow::Node getARouteHandlerExpr() { result = this.getARouteHandlerNode() }
|
||||
|
||||
/** Gets an argument that represents a route handler being registered. */
|
||||
DataFlow::Node getARouteHandlerNode() {
|
||||
if methodName = "route"
|
||||
|
||||
@@ -65,23 +65,9 @@ module Http {
|
||||
)
|
||||
}
|
||||
|
||||
/**
|
||||
* DEPRECATED: use `definesHeaderValue` instead.
|
||||
* Holds if the header with (lower-case) name `headerName` is set to the value of `headerValue`.
|
||||
*/
|
||||
deprecated predicate definesExplicitly(string headerName, Expr headerValue) {
|
||||
this.definesHeaderValue(headerName, headerValue.flow())
|
||||
}
|
||||
|
||||
/** Holds if the header with (lower-case) name `headerName` is set to the value of `headerValue`. */
|
||||
abstract predicate definesHeaderValue(string headerName, DataFlow::Node headerValue);
|
||||
|
||||
/**
|
||||
* DEPRECATED: Use `getNameNode()` instead.
|
||||
* Returns the expression used to compute the header name.
|
||||
*/
|
||||
deprecated Expr getNameExpr() { result = this.getNameNode().asExpr() }
|
||||
|
||||
/** Returns the expression used to compute the header name. */
|
||||
abstract DataFlow::Node getNameNode();
|
||||
}
|
||||
@@ -202,26 +188,12 @@ module Http {
|
||||
*/
|
||||
final Servers::ResponseSource getAResponseSource() { result.getRouteHandler() = this }
|
||||
|
||||
/**
|
||||
* DEPRECATED: Use `getARequestNode()` instead.
|
||||
* Gets an expression that contains a request object handled
|
||||
* by this handler.
|
||||
*/
|
||||
deprecated RequestExpr getARequestExpr() { result.flow() = this.getARequestNode() }
|
||||
|
||||
/**
|
||||
* Gets an expression that contains a request object handled
|
||||
* by this handler.
|
||||
*/
|
||||
RequestNode getARequestNode() { result.getRouteHandler() = this }
|
||||
|
||||
/**
|
||||
* DEPRECATED: Use `getAResponseNode()` instead.
|
||||
* Gets an expression that contains a response object provided
|
||||
* by this handler.
|
||||
*/
|
||||
deprecated ResponseExpr getAResponseExpr() { result.flow() = this.getAResponseNode() }
|
||||
|
||||
/**
|
||||
* Gets an expression that contains a response object provided
|
||||
* by this handler.
|
||||
@@ -265,30 +237,6 @@ module Http {
|
||||
abstract RouteHandler getRouteHandler();
|
||||
}
|
||||
|
||||
/**
|
||||
* DEPRECATED: Use `RequestNode` instead.
|
||||
* An expression that may contain a request object.
|
||||
*/
|
||||
deprecated class RequestExpr extends Expr {
|
||||
RequestExpr() { this.flow() instanceof ResponseNode }
|
||||
|
||||
/**
|
||||
* Gets the route handler that handles this request.
|
||||
*/
|
||||
RouteHandler getRouteHandler() { result = this.flow().(ResponseNode).getRouteHandler() }
|
||||
}
|
||||
|
||||
/**
|
||||
* DEPRECATED: Use `ResponseNode` instead.
|
||||
* An expression that may contain a response object.
|
||||
*/
|
||||
deprecated class ResponseExpr extends Expr {
|
||||
/**
|
||||
* Gets the route handler that handles this request.
|
||||
*/
|
||||
RouteHandler getRouteHandler() { result = this.flow().(ResponseNode).getRouteHandler() }
|
||||
}
|
||||
|
||||
/**
|
||||
* Boiler-plate implementation of a `Server` and its associated classes.
|
||||
* Made for easily defining new HTTP servers
|
||||
@@ -309,12 +257,6 @@ module Http {
|
||||
|
||||
/** Gets a data flow node referring to this server. */
|
||||
DataFlow::SourceNode ref() { result = this.ref(DataFlow::TypeTracker::end()) }
|
||||
|
||||
/**
|
||||
* DEPRECATED: Use `ref().flowsToExpr()` instead.
|
||||
* Holds if `sink` may refer to this server definition.
|
||||
*/
|
||||
deprecated predicate flowsTo(Expr sink) { this.ref().flowsToExpr(sink) }
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -402,30 +344,6 @@ module Http {
|
||||
override RouteHandler getRouteHandler() { result = src.getRouteHandler() }
|
||||
}
|
||||
|
||||
/**
|
||||
* A request expression arising from a request source.
|
||||
*/
|
||||
deprecated class StandardRequestExpr extends RequestExpr {
|
||||
RequestSource src;
|
||||
|
||||
StandardRequestExpr() { src.ref().flowsToExpr(this) }
|
||||
|
||||
override RouteHandler getRouteHandler() { result = src.getRouteHandler() }
|
||||
}
|
||||
|
||||
/**
|
||||
* A response expression arising from a response source.
|
||||
*/
|
||||
deprecated class StandardResponseExpr extends ResponseExpr {
|
||||
ResponseSource src;
|
||||
|
||||
StandardResponseExpr() { src.ref().flowsToExpr(this) }
|
||||
|
||||
override RouteHandler getRouteHandler() {
|
||||
result = this.flow().(StandardResponseNode).getRouteHandler()
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* A standard header definition.
|
||||
*/
|
||||
|
||||
@@ -87,14 +87,6 @@ module Hapi {
|
||||
override RouteHandler getRouteHandler() { result = rh }
|
||||
}
|
||||
|
||||
/**
|
||||
* DEPRECATED: Use `ResponseNode` instead.
|
||||
* A Hapi response expression.
|
||||
*/
|
||||
deprecated class ResponseExpr extends HTTP::Servers::StandardResponseExpr {
|
||||
ResponseExpr() { this.flow() instanceof ResponseNode }
|
||||
}
|
||||
|
||||
/**
|
||||
* A Hapi response node.
|
||||
*/
|
||||
@@ -102,14 +94,6 @@ module Hapi {
|
||||
override ResponseSource src;
|
||||
}
|
||||
|
||||
/**
|
||||
* DEPRECATED: Use `RequestNode` instead.
|
||||
* An Hapi request expression.
|
||||
*/
|
||||
deprecated class RequestExpr extends HTTP::Servers::StandardRequestExpr {
|
||||
RequestExpr() { this.flow() instanceof RequestNode }
|
||||
}
|
||||
|
||||
/**
|
||||
* A Hapi request node.
|
||||
*/
|
||||
@@ -255,8 +239,6 @@ module Hapi {
|
||||
pragma[noinline]
|
||||
private DataFlow::Node getRouteHandler() { result = handler }
|
||||
|
||||
deprecated Expr getRouteHandlerExpr() { result = handler.asExpr() }
|
||||
|
||||
override DataFlow::Node getServer() { result = server }
|
||||
}
|
||||
|
||||
|
||||
@@ -44,13 +44,6 @@ module Koa {
|
||||
result = this.getAFunctionValue().getParameter(0)
|
||||
}
|
||||
|
||||
/**
|
||||
* DEPRECATED: Use `getAContextNode` instead.
|
||||
* Gets an expression that contains the "context" object of
|
||||
* a route handler invocation.
|
||||
*/
|
||||
deprecated Expr getAContextExpr() { result = this.getAContextNode().asExpr() }
|
||||
|
||||
/**
|
||||
* Gets an expression that contains the "context" object of
|
||||
* a route handler invocation.
|
||||
@@ -61,15 +54,6 @@ module Koa {
|
||||
*/
|
||||
DataFlow::Node getAContextNode() { result.(ContextNode).getRouteHandler() = this }
|
||||
|
||||
/**
|
||||
* DEPRECATED: Use `getAResponseOrContextNode` instead.
|
||||
* Gets an expression that contains the context or response
|
||||
* object of a route handler invocation.
|
||||
*/
|
||||
deprecated Expr getAResponseOrContextExpr() {
|
||||
result = this.getAResponseOrContextNode().asExpr()
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets an expression that contains the context or response
|
||||
* object of a route handler invocation.
|
||||
@@ -78,13 +62,6 @@ module Koa {
|
||||
result = this.getAResponseNode() or result = this.getAContextNode()
|
||||
}
|
||||
|
||||
/**
|
||||
* DEPRECATED: Use `getARequestOrContextNode` instead.
|
||||
* Gets an expression that contains the context or request
|
||||
* object of a route handler invocation.
|
||||
*/
|
||||
deprecated Expr getARequestOrContextExpr() { result = this.getARequestOrContextNode().asExpr() }
|
||||
|
||||
/**
|
||||
* Gets an expression that contains the context or request
|
||||
* object of a route handler invocation.
|
||||
@@ -273,19 +250,6 @@ module Koa {
|
||||
override RouteHandler getRouteHandler() { result = ctx.getRouteHandler() }
|
||||
}
|
||||
|
||||
/**
|
||||
* DEPRECATED: Use `ContextNode` instead.
|
||||
* An expression that may hold a Koa context object.
|
||||
*/
|
||||
deprecated class ContextExpr extends Expr {
|
||||
ContextNode node;
|
||||
|
||||
ContextExpr() { node.asExpr() = this }
|
||||
|
||||
/** Gets the route handler that provides this response. */
|
||||
deprecated RouteHandler getRouteHandler() { result = node.getRouteHandler() }
|
||||
}
|
||||
|
||||
/**
|
||||
* An expression that may hold a Koa context object.
|
||||
*/
|
||||
@@ -300,14 +264,6 @@ module Koa {
|
||||
RouteHandler getRouteHandler() { result = src.getRouteHandler() }
|
||||
}
|
||||
|
||||
/**
|
||||
* DEPRECATED: Use `RequestNode` instead.
|
||||
* An expression that may hold a Koa request object.
|
||||
*/
|
||||
deprecated class RequestExpr extends HTTP::Servers::StandardRequestExpr {
|
||||
RequestExpr() { this.flow() instanceof RequestNode }
|
||||
}
|
||||
|
||||
/**
|
||||
* An expression that may hold a Koa request object.
|
||||
*/
|
||||
@@ -315,14 +271,6 @@ module Koa {
|
||||
override RequestSource src;
|
||||
}
|
||||
|
||||
/**
|
||||
* DEPRECATED: Use `ResponseNode` instead.
|
||||
* An expression that may hold a Koa response object.
|
||||
*/
|
||||
deprecated class ResponseExpr extends HTTP::Servers::StandardResponseExpr {
|
||||
ResponseExpr() { this.flow() instanceof ResponseNode }
|
||||
}
|
||||
|
||||
/**
|
||||
* An expression that may hold a Koa response object.
|
||||
*/
|
||||
|
||||
@@ -62,18 +62,10 @@ private module Micro {
|
||||
override Http::RouteHandler getRouteHandler() { result = h }
|
||||
}
|
||||
|
||||
deprecated class MicroRequestExpr extends NodeJSLib::RequestExpr {
|
||||
override MicroRequestSource src;
|
||||
}
|
||||
|
||||
class MicroRequestNode extends NodeJSLib::RequestNode {
|
||||
override MicroRequestSource src;
|
||||
}
|
||||
|
||||
deprecated class MicroReseponseExpr extends NodeJSLib::ResponseExpr {
|
||||
override MicroResponseSource src;
|
||||
}
|
||||
|
||||
class MicroResponseNode extends NodeJSLib::ResponseNode {
|
||||
override MicroResponseSource src;
|
||||
}
|
||||
|
||||
@@ -64,17 +64,6 @@ module NodeJSLib {
|
||||
)
|
||||
}
|
||||
|
||||
/**
|
||||
* DEPRECATED: Use `ResponseNode` instead.
|
||||
* A Node.js HTTP response.
|
||||
*
|
||||
* A server library that provides an (enhanced) NodesJS HTTP response
|
||||
* object should implement a library specific subclass of this class.
|
||||
*/
|
||||
deprecated class ResponseExpr extends HTTP::Servers::StandardResponseExpr {
|
||||
ResponseExpr() { this.flow() instanceof ResponseNode }
|
||||
}
|
||||
|
||||
/**
|
||||
* A Node.js HTTP response.
|
||||
*
|
||||
@@ -83,17 +72,6 @@ module NodeJSLib {
|
||||
*/
|
||||
abstract class ResponseNode extends Http::Servers::StandardResponseNode { }
|
||||
|
||||
/**
|
||||
* DEPRECATED: Use `RequestNode` instead.
|
||||
* A Node.js HTTP request.
|
||||
*
|
||||
* A server library that provides an (enhanced) NodesJS HTTP request
|
||||
* object should implement a library specific subclass of this class.
|
||||
*/
|
||||
deprecated class RequestExpr extends HTTP::Servers::StandardRequestExpr {
|
||||
RequestExpr() { this.flow() instanceof RequestNode }
|
||||
}
|
||||
|
||||
/**
|
||||
* A Node.js HTTP request.
|
||||
*
|
||||
@@ -168,14 +146,6 @@ module NodeJSLib {
|
||||
override RouteHandler getRouteHandler() { result = rh }
|
||||
}
|
||||
|
||||
/**
|
||||
* DEPRECATED: Use `BuiltinRouteHandlerResponseNode` instead.
|
||||
* A builtin Node.js HTTP response.
|
||||
*/
|
||||
deprecated private class BuiltinRouteHandlerResponseExpr extends ResponseExpr {
|
||||
BuiltinRouteHandlerResponseExpr() { src instanceof ResponseSource }
|
||||
}
|
||||
|
||||
/**
|
||||
* A builtin Node.js HTTP response.
|
||||
*/
|
||||
@@ -183,14 +153,6 @@ module NodeJSLib {
|
||||
BuiltinRouteHandlerResponseNode() { src instanceof ResponseSource }
|
||||
}
|
||||
|
||||
/**
|
||||
* DEPRECATED: Use `BuiltinRouteHandlerRequestNode` instead.
|
||||
* A builtin Node.js HTTP request.
|
||||
*/
|
||||
deprecated private class BuiltinRouteHandlerRequestExpr extends RequestExpr {
|
||||
BuiltinRouteHandlerRequestExpr() { src instanceof RequestSource }
|
||||
}
|
||||
|
||||
/**
|
||||
* A builtin Node.js HTTP request.
|
||||
*/
|
||||
@@ -288,12 +250,6 @@ module NodeJSLib {
|
||||
|
||||
override DataFlow::Node getServer() { result = server }
|
||||
|
||||
/**
|
||||
* DEPRECATED: Use `getRouteHandlerNode` instead.
|
||||
* Gets the expression for the handler registered by this setup.
|
||||
*/
|
||||
deprecated Expr getRouteHandlerExpr() { result = handler.asExpr() }
|
||||
|
||||
/**
|
||||
* Gets the expression for the handler registered by this setup.
|
||||
*/
|
||||
|
||||
@@ -72,14 +72,6 @@ module Restify {
|
||||
override RouteHandler getRouteHandler() { result = rh }
|
||||
}
|
||||
|
||||
/**
|
||||
* DEPRECATED: Use `ResponseNode` instead.
|
||||
* A Node.js HTTP response provided by Restify.
|
||||
*/
|
||||
deprecated class ResponseExpr extends NodeJSLib::ResponseExpr {
|
||||
ResponseExpr() { src instanceof ResponseSource }
|
||||
}
|
||||
|
||||
/**
|
||||
* A Node.js HTTP response provided by Restify.
|
||||
*/
|
||||
@@ -87,14 +79,6 @@ module Restify {
|
||||
ResponseNode() { src instanceof ResponseSource or src instanceof FormatterResponseSource }
|
||||
}
|
||||
|
||||
/**
|
||||
* DEPRECATED: Use `RequestNode` instead.
|
||||
* A Node.js HTTP request provided by Restify.
|
||||
*/
|
||||
deprecated class RequestExpr extends NodeJSLib::RequestExpr {
|
||||
RequestExpr() { src instanceof RequestSource }
|
||||
}
|
||||
|
||||
/**
|
||||
* A Node.js HTTP request provided by Restify.
|
||||
*/
|
||||
|
||||
@@ -13,22 +13,6 @@ import javascript
|
||||
import semmle.javascript.security.internal.SensitiveDataHeuristics
|
||||
private import HeuristicNames
|
||||
|
||||
/**
|
||||
* DEPRECATED: Use `SensitiveNode` instead.
|
||||
* An expression that might contain sensitive data.
|
||||
*/
|
||||
deprecated class SensitiveExpr extends Expr {
|
||||
SensitiveNode node;
|
||||
|
||||
SensitiveExpr() { node.asExpr() = this }
|
||||
|
||||
/** Gets a human-readable description of this expression for use in alert messages. */
|
||||
deprecated string describe() { result = node.describe() }
|
||||
|
||||
/** Gets a classification of the kind of sensitive data this expression might contain. */
|
||||
deprecated SensitiveDataClassification getClassification() { result = node.getClassification() }
|
||||
}
|
||||
|
||||
/** An expression that might contain sensitive data. */
|
||||
cached
|
||||
abstract class SensitiveNode extends DataFlow::Node {
|
||||
|
||||
@@ -18,23 +18,11 @@ class DomGlobalVariable extends GlobalVariable {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* DEPRECATED: Use `isDomNode` instead.
|
||||
* Holds if `e` could hold a value that comes from the DOM.
|
||||
*/
|
||||
deprecated predicate isDomValue(Expr e) { isDomNode(e.flow()) }
|
||||
|
||||
/**
|
||||
* Holds if `e` could hold a value that comes from the DOM.
|
||||
*/
|
||||
predicate isDomNode(DataFlow::Node e) { DOM::domValueRef().flowsTo(e) }
|
||||
|
||||
/**
|
||||
* DEPRECATED: Use `isLocationNode` instead.
|
||||
* Holds if `e` could refer to the `location` property of a DOM node.
|
||||
*/
|
||||
deprecated predicate isLocation(Expr e) { isLocationNode(e.flow()) }
|
||||
|
||||
/** Holds if `e` could refer to the `location` property of a DOM node. */
|
||||
predicate isLocationNode(DataFlow::Node e) {
|
||||
e = DOM::domValueRef().getAPropertyReference("location")
|
||||
@@ -42,43 +30,6 @@ predicate isLocationNode(DataFlow::Node e) {
|
||||
e = DataFlow::globalVarRef("location")
|
||||
}
|
||||
|
||||
/**
|
||||
* DEPRECATED. In most cases, a sanitizer based on this predicate can be removed, as
|
||||
* taint tracking no longer step through the properties of the location object by default.
|
||||
*
|
||||
* Holds if `pacc` accesses a part of `document.location` that is
|
||||
* not considered user-controlled, that is, anything except
|
||||
* `href`, `hash` and `search`.
|
||||
*/
|
||||
deprecated predicate isSafeLocationProperty(PropAccess pacc) {
|
||||
exists(string prop | pacc = DOM::locationRef().getAPropertyRead(prop).asExpr() |
|
||||
prop != "href" and prop != "hash" and prop != "search"
|
||||
)
|
||||
}
|
||||
|
||||
/**
|
||||
* DEPRECATED: Use `DomMethodCallNode` instead.
|
||||
* A call to a DOM method.
|
||||
*/
|
||||
deprecated class DomMethodCallExpr extends MethodCallExpr {
|
||||
DomMethodCallNode node;
|
||||
|
||||
DomMethodCallExpr() { this.flow() = node }
|
||||
|
||||
/** Holds if `arg` is an argument that is interpreted as HTML. */
|
||||
deprecated predicate interpretsArgumentsAsHtml(Expr arg) {
|
||||
node.interpretsArgumentsAsHtml(arg.flow())
|
||||
}
|
||||
|
||||
/** Holds if `arg` is an argument that is used as an URL. */
|
||||
deprecated predicate interpretsArgumentsAsURL(Expr arg) {
|
||||
node.interpretsArgumentsAsURL(arg.flow())
|
||||
}
|
||||
|
||||
/** DEPRECATED: Alias for interpretsArgumentsAsHtml */
|
||||
deprecated predicate interpretsArgumentsAsHTML(Expr arg) { this.interpretsArgumentsAsHtml(arg) }
|
||||
}
|
||||
|
||||
/**
|
||||
* A call to a DOM method.
|
||||
*/
|
||||
@@ -129,36 +80,6 @@ class DomMethodCallNode extends DataFlow::MethodCallNode {
|
||||
)
|
||||
)
|
||||
}
|
||||
|
||||
/** DEPRECATED: Alias for interpretsArgumentsAsUrl */
|
||||
deprecated predicate interpretsArgumentsAsURL(DataFlow::Node arg) {
|
||||
this.interpretsArgumentsAsUrl(arg)
|
||||
}
|
||||
|
||||
/** DEPRECATED: Alias for interpretsArgumentsAsHtml */
|
||||
deprecated predicate interpretsArgumentsAsHTML(DataFlow::Node arg) {
|
||||
this.interpretsArgumentsAsHtml(arg)
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* DEPRECATED: Use `DomPropertyWrite` instead.
|
||||
* An assignment to a property of a DOM object.
|
||||
*/
|
||||
deprecated class DomPropWriteNode extends Assignment {
|
||||
DomPropertyWrite node;
|
||||
|
||||
DomPropWriteNode() { this.flow() = node }
|
||||
|
||||
/**
|
||||
* Holds if the assigned value is interpreted as HTML.
|
||||
*/
|
||||
predicate interpretsValueAsHtml() { node.interpretsValueAsHtml() }
|
||||
|
||||
/**
|
||||
* Holds if the assigned value is interpreted as JavaScript via javascript: protocol.
|
||||
*/
|
||||
predicate interpretsValueAsJavaScriptUrl() { node.interpretsValueAsJavaScriptUrl() }
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -120,9 +120,6 @@ module DomBasedXss {
|
||||
WriteUrlSink() { super.isXssSink() }
|
||||
}
|
||||
|
||||
/** DEPRECATED: Alias for `WriteUrlSink`. */
|
||||
deprecated class WriteURLSink = WriteUrlSink;
|
||||
|
||||
/**
|
||||
* An expression whose value is interpreted as HTML or CSS
|
||||
* and may be inserted into the DOM.
|
||||
|
||||
@@ -138,43 +138,3 @@ module Shared {
|
||||
IsEscapedInSwitchSanitizer() { this.asExpr() = getAPathEscapedInSwitch().getAUse() }
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* DEPRECATED: Use the `DomBasedXssCustomizations.qll` file instead.
|
||||
* Provides classes and predicates for the DOM-based XSS query.
|
||||
*/
|
||||
deprecated module DomBasedXss {
|
||||
import DomBasedXssCustomizations::DomBasedXss
|
||||
}
|
||||
|
||||
/**
|
||||
* DEPRECATED: Use the `DomBasedXssCustomizations.qll` file instead.
|
||||
* Provides classes and predicates for the reflected XSS query.
|
||||
*/
|
||||
deprecated module ReflectedXss {
|
||||
import ReflectedXssCustomizations::ReflectedXss
|
||||
}
|
||||
|
||||
/**
|
||||
* DEPRECATED: Use the `StoredXssCustomizations.qll` file instead.
|
||||
* Provides classes and predicates for the stored XSS query.
|
||||
*/
|
||||
deprecated module StoredXss {
|
||||
import StoredXssCustomizations::StoredXss
|
||||
}
|
||||
|
||||
/**
|
||||
* DEPRECATED: Use the `XssThroughDomCustomizations.qll` file instead.
|
||||
* Provides classes and predicates for the XSS through DOM query.
|
||||
*/
|
||||
deprecated module XssThroughDom {
|
||||
import XssThroughDomCustomizations::XssThroughDom
|
||||
}
|
||||
|
||||
/**
|
||||
* DEPRECATED: Use the `ExceptionXssCustomizations.qll` file instead.
|
||||
* Provides classes for customizing the `ExceptionXss` query.
|
||||
*/
|
||||
deprecated module ExceptionXss {
|
||||
import ExceptionXssCustomizations::ExceptionXss
|
||||
}
|
||||
|
||||
@@ -1,4 +0,0 @@
|
||||
/** DEPRECATED: Use `semmle.javascript.Actions` instead. */
|
||||
deprecated module Actions {
|
||||
import semmle.javascript.Actions::Actions
|
||||
}
|
||||
Reference in New Issue
Block a user