mirror of
https://github.com/github/codeql.git
synced 2026-04-28 10:15:14 +02:00
JS: Autoformat
This commit is contained in:
@@ -39,7 +39,8 @@ module ClassValidator {
|
||||
|
||||
/** Holds if the given field has a decorator that sanitizes its value for the purpose of taint tracking. */
|
||||
predicate isFieldSanitizedByDecorator(FieldDefinition field) {
|
||||
field.getADecorator().getExpression().flow() = sanitizingDecorator().getReturn().getAValueReachableFromSource()
|
||||
field.getADecorator().getExpression().flow() =
|
||||
sanitizingDecorator().getReturn().getAValueReachableFromSource()
|
||||
}
|
||||
|
||||
pragma[noinline]
|
||||
|
||||
@@ -440,7 +440,8 @@ private module MsSql {
|
||||
override TaggedTemplateExpr astNode;
|
||||
|
||||
QueryTemplateExpr() {
|
||||
mssql().getMember("query").getAValueReachableFromSource() = DataFlow::valueNode(astNode.getTag())
|
||||
mssql().getMember("query").getAValueReachableFromSource() =
|
||||
DataFlow::valueNode(astNode.getTag())
|
||||
}
|
||||
|
||||
override DataFlow::Node getAResult() {
|
||||
|
||||
@@ -29,7 +29,9 @@ module ParseTorrent {
|
||||
}
|
||||
|
||||
/** Gets a data flow node referring to a parsed torrent. */
|
||||
DataFlow::SourceNode parsedTorrentRef() { result = any(ParsedTorrent t).asApiNode().getAValueReachableFromSource() }
|
||||
DataFlow::SourceNode parsedTorrentRef() {
|
||||
result = any(ParsedTorrent t).asApiNode().getAValueReachableFromSource()
|
||||
}
|
||||
|
||||
/**
|
||||
* An access to user-controlled torrent information.
|
||||
|
||||
@@ -700,11 +700,7 @@ module Vue {
|
||||
.getASource()
|
||||
or
|
||||
result =
|
||||
router
|
||||
.getParameter(0)
|
||||
.getMember("scrollBehavior")
|
||||
.getParameter([0, 1])
|
||||
.getASource()
|
||||
router.getParameter(0).getMember("scrollBehavior").getParameter([0, 1]).getASource()
|
||||
)
|
||||
or
|
||||
result = routeConfig().getMember("beforeEnter").getParameter([0, 1]).getASource()
|
||||
|
||||
@@ -88,7 +88,8 @@ module Vuex {
|
||||
pragma[noinline]
|
||||
string getNamespace() {
|
||||
getNumArgument() = 2 and
|
||||
result = appendToNamespace(namespace, getParameter(0).getAValueReachingSink().getStringValue())
|
||||
result =
|
||||
appendToNamespace(namespace, getParameter(0).getAValueReachingSink().getStringValue())
|
||||
or
|
||||
getNumArgument() = 1 and
|
||||
result = namespace
|
||||
@@ -303,9 +304,7 @@ module Vuex {
|
||||
}
|
||||
|
||||
/** Gets a value that refers to the given access path of the state. */
|
||||
DataFlow::Node stateMutationSucc(string path) {
|
||||
result = stateRefByAccessPath(path).getASource()
|
||||
}
|
||||
DataFlow::Node stateMutationSucc(string path) { result = stateRefByAccessPath(path).getASource() }
|
||||
|
||||
/** Holds if `pred -> succ` is a step from state mutation to state access. */
|
||||
predicate stateMutationStep(DataFlow::Node pred, DataFlow::Node succ) {
|
||||
|
||||
@@ -282,11 +282,7 @@ module XML {
|
||||
|
||||
override DataFlow::Node getAResult() {
|
||||
result =
|
||||
parser
|
||||
.getReturn()
|
||||
.getMember(any(string s | s.matches("on%")))
|
||||
.getAParameter()
|
||||
.getASource()
|
||||
parser.getReturn().getMember(any(string s | s.matches("on%"))).getAParameter().getASource()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -152,9 +152,7 @@ abstract class RateLimitingMiddleware extends DataFlow::SourceNode {
|
||||
* A rate limiter constructed using the `express-rate-limit` package.
|
||||
*/
|
||||
class ExpressRateLimit extends RateLimitingMiddleware {
|
||||
ExpressRateLimit() {
|
||||
this = API::moduleImport("express-rate-limit").getReturn().getASource()
|
||||
}
|
||||
ExpressRateLimit() { this = API::moduleImport("express-rate-limit").getReturn().getASource() }
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -208,8 +208,7 @@ module XssThroughDom {
|
||||
exists(API::Node useForm |
|
||||
useForm = API::moduleImport("react-hook-form").getMember("useForm").getReturn()
|
||||
|
|
||||
this =
|
||||
useForm.getMember("handleSubmit").getParameter(0).getParameter(0).getASource()
|
||||
this = useForm.getMember("handleSubmit").getParameter(0).getParameter(0).getASource()
|
||||
or
|
||||
this = useForm.getMember("getValues").getACall()
|
||||
)
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
import javascript
|
||||
|
||||
query DataFlow::Node dbUse() { result = API::moduleImport("@example/db").getInstance().getAValueReachableFromSource() }
|
||||
query DataFlow::Node dbUse() {
|
||||
result = API::moduleImport("@example/db").getInstance().getAValueReachableFromSource()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user