mirror of
https://github.com/github/codeql.git
synced 2025-12-24 04:36:35 +01:00
run the non-us patch with "modelled/modeled"
This commit is contained in:
@@ -170,7 +170,7 @@ module Ssa {
|
||||
/**
|
||||
* Gets the control flow node of this SSA definition, if any. Phi nodes are
|
||||
* examples of SSA definitions without a control flow node, as they are
|
||||
* modelled at index `-1` in the relevant basic block.
|
||||
* modeled at index `-1` in the relevant basic block.
|
||||
*/
|
||||
final ControlFlow::Node getControlFlowNode() {
|
||||
exists(ControlFlow::BasicBlock bb, int i | this.definesAt(_, bb, i) | result = bb.getNode(i))
|
||||
|
||||
@@ -62,7 +62,7 @@ class JSON2CSVTaintStep extends TaintTracking::SharedTaintStep {
|
||||
/**
|
||||
* A step through the [`prettyjson`](https://www.npmjs.com/package/prettyjson) library.
|
||||
* This is not quite a `JSON.stringify` call, as it e.g. does not wrap keys in double quotes.
|
||||
* It's therefore modelled as a taint-step rather than as a `JSON.stringify` call.
|
||||
* It's therefore modeled as a taint-step rather than as a `JSON.stringify` call.
|
||||
*/
|
||||
class PrettyJSONTaintStep extends TaintTracking::SharedTaintStep {
|
||||
override predicate step(DataFlow::Node pred, DataFlow::Node succ) {
|
||||
|
||||
@@ -130,7 +130,7 @@ module RangeAnalysis {
|
||||
}
|
||||
|
||||
/**
|
||||
* Holds if `r` can be modelled as `r = root * sign + bias`.
|
||||
* Holds if `r` can be modeled as `r = root * sign + bias`.
|
||||
*
|
||||
* Only looks "one step", that is, does not follow data flow and does not recursively
|
||||
* unfold nested arithmetic expressions.
|
||||
@@ -203,7 +203,7 @@ module RangeAnalysis {
|
||||
}
|
||||
|
||||
/**
|
||||
* Holds if `r` can be modelled as `r = root * sign + bias`.
|
||||
* Holds if `r` can be modeled as `r = root * sign + bias`.
|
||||
*/
|
||||
predicate linearDefinition(DataFlow::Node r, DataFlow::Node root, int sign, Bias bias) {
|
||||
if exists(r.getImmediatePredecessor())
|
||||
@@ -229,7 +229,7 @@ module RangeAnalysis {
|
||||
}
|
||||
|
||||
/**
|
||||
* Holds if `r` can be modelled as `r = xroot * xsign + yroot * ysign + bias`.
|
||||
* Holds if `r` can be modeled as `r = xroot * xsign + yroot * ysign + bias`.
|
||||
*/
|
||||
predicate linearDefinitionSum(
|
||||
DataFlow::Node r, DataFlow::Node xroot, int xsign, DataFlow::Node yroot, int ysign, Bias bias
|
||||
@@ -260,7 +260,7 @@ module RangeAnalysis {
|
||||
}
|
||||
|
||||
/**
|
||||
* Holds if the given comparison can be modelled as `A <op> B + bias` where `<op>` is the comparison operator,
|
||||
* Holds if the given comparison can be modeled as `A <op> B + bias` where `<op>` is the comparison operator,
|
||||
* and `A` is `a * asign` and likewise `B` is `b * bsign`.
|
||||
*/
|
||||
predicate linearComparison(
|
||||
|
||||
@@ -297,7 +297,7 @@ module Routing {
|
||||
* req.app; // alias for 'app'
|
||||
* })
|
||||
* ```
|
||||
* This can be modelled by mapping `(0, "app")` to the `app` data-flow node (`n=0` corresponds
|
||||
* This can be modeled by mapping `(0, "app")` to the `app` data-flow node (`n=0` corresponds
|
||||
* to the `req` parameter).
|
||||
*/
|
||||
DataFlow::Node getValueImplicitlyStoredInAccessPath(int n, string path) { none() }
|
||||
@@ -466,7 +466,7 @@ module Routing {
|
||||
}
|
||||
|
||||
/**
|
||||
* A node flowing into a use site, modelled as a child of the use site.
|
||||
* A node flowing into a use site, modeled as a child of the use site.
|
||||
*/
|
||||
private class UseSiteSource extends UseSite {
|
||||
UseSiteSource() { this = any(UseSite use).getSource() }
|
||||
@@ -717,7 +717,7 @@ module Routing {
|
||||
/**
|
||||
* A call where a mutable router object escapes into a parameter or is returned from a function.
|
||||
*
|
||||
* This is modelled as a route setup targeting the "local router" value and having
|
||||
* This is modeled as a route setup targeting the "local router" value and having
|
||||
* the "target router" as its only child.
|
||||
*
|
||||
* For example,
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
* affect `x`, while `yield` expressions in functions other than `f`
|
||||
* still may affect it.
|
||||
*
|
||||
* This is modelled as follows.
|
||||
* This is modeled as follows.
|
||||
*
|
||||
* Within each function `g` that accesses a variable `x` declared in an
|
||||
* enclosing function `f`, we introduce a pseudo-assignment to `x` called
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
* not allow reasoning about nested property writes of the form `p.q.r` (except where `p.q`
|
||||
* is a module/exports object and hence handled by local flow).
|
||||
*
|
||||
* Also note that object inheritance is not modelled. Soundness is, however, preserved in
|
||||
* Also note that object inheritance is not modeled. Soundness is, however, preserved in
|
||||
* the sense that all expressions whole value derives (directly or indirectly) from a property
|
||||
* read are marked as indefinite.
|
||||
*/
|
||||
@@ -175,9 +175,9 @@ class AnalyzedValueNode extends AnalyzedNode, DataFlow::ValueNode { }
|
||||
* A module for which analysis results are available.
|
||||
*
|
||||
* The type inference supports AMD, CommonJS and ES2015 modules. All three
|
||||
* variants are modelled as CommonJS modules, with `module` object and a default
|
||||
* variants are modeled as CommonJS modules, with `module` object and a default
|
||||
* `exports` object which is the initial value of `module.exports`. ES2015
|
||||
* exports are modelled as property writes on `module.exports`, and imports
|
||||
* exports are modeled as property writes on `module.exports`, and imports
|
||||
* as property reads on any potential value of `module.exports`.
|
||||
*/
|
||||
class AnalyzedModule extends TopLevel {
|
||||
|
||||
@@ -475,7 +475,7 @@ private newtype TAnalyzedGlobal =
|
||||
TAnalyzedGlocal(GlobalVariable gv, TopLevel tl) { useIn(gv, _, tl) and exists(defIn(gv, tl)) } or
|
||||
/**
|
||||
* A global variable that is used in at least one toplevel where it is not defined, and
|
||||
* hence has to be modelled as a truly global variable.
|
||||
* hence has to be modeled as a truly global variable.
|
||||
*/
|
||||
TAnalyzedGenuineGlobal(GlobalVariable gv) {
|
||||
exists(TopLevel tl |
|
||||
@@ -525,7 +525,7 @@ private class AnalyzedGlocal extends AnalyzedGlobal, TAnalyzedGlocal {
|
||||
|
||||
/**
|
||||
* A global variable that is used in at least one toplevel where it is not defined, and
|
||||
* hence has to be modelled as a truly global variable.
|
||||
* hence has to be modeled as a truly global variable.
|
||||
*/
|
||||
private class AnalyzedGenuineGlobal extends AnalyzedGlobal, TAnalyzedGenuineGlobal {
|
||||
GlobalVariable gv;
|
||||
|
||||
@@ -352,7 +352,7 @@ module Express {
|
||||
* If the preceding handler's path cannot be determined, it is assumed to match.
|
||||
*
|
||||
* Note that this predicate is not complete: path globs such as `'*'` are not currently
|
||||
* handled, and relative paths of subrouters are not modelled. In particular, if an outer
|
||||
* handled, and relative paths of subrouters are not modeled. In particular, if an outer
|
||||
* router installs a route handler `r1` on a path that matches the path of a route handler
|
||||
* `r2` installed on a subrouter, `r1` will not be recognized as an ancestor of `r2`.
|
||||
*/
|
||||
|
||||
@@ -288,7 +288,7 @@ module Redux {
|
||||
}
|
||||
|
||||
/**
|
||||
* A call to `reduce-reducers`, modelled as a reducer that dispatches to an arbitrary subreducer.
|
||||
* A call to `reduce-reducers`, modeled as a reducer that dispatches to an arbitrary subreducer.
|
||||
*
|
||||
* In reality, this function chains together all of the reducers, but in practice it is only used
|
||||
* when the reducers handle a disjoint set of action types, which makes it behave as if it
|
||||
|
||||
@@ -37,7 +37,7 @@ module ShellJS {
|
||||
override string getName() { result = name }
|
||||
}
|
||||
|
||||
/** The `shelljs.exec` library modelled as a `shelljs` member. */
|
||||
/** The `shelljs.exec` library modeled as a `shelljs` member. */
|
||||
private class ShellJsExec extends Range {
|
||||
ShellJsExec() { this = DataFlow::moduleImport("shelljs.exec") }
|
||||
|
||||
@@ -76,7 +76,7 @@ module ShellJS {
|
||||
}
|
||||
|
||||
/**
|
||||
* A file system access that can't be modelled as a read or a write.
|
||||
* A file system access that can't be modeled as a read or a write.
|
||||
*/
|
||||
private class ShellJSGenericFileAccess extends FileSystemAccess, ShellJSCall {
|
||||
ShellJSGenericFileAccess() {
|
||||
@@ -132,7 +132,7 @@ module ShellJS {
|
||||
}
|
||||
|
||||
/**
|
||||
* A call to `shelljs.exec()` modelled as command execution.
|
||||
* A call to `shelljs.exec()` modeled as command execution.
|
||||
*/
|
||||
private class ShellJSExec extends SystemCommandExecution, ShellJSCall {
|
||||
ShellJSExec() { name = "exec" }
|
||||
|
||||
@@ -19,7 +19,7 @@ import javascript
|
||||
private string channelName() { result = "message" }
|
||||
|
||||
/**
|
||||
* The names of the libraries modelled in this file.
|
||||
* The names of the libraries modeled in this file.
|
||||
*/
|
||||
private module LibraryNames {
|
||||
string sockjs() { result = "SockJS" }
|
||||
|
||||
@@ -61,7 +61,7 @@ private module RegexpMatching {
|
||||
|
||||
/**
|
||||
* Gets a state the regular expression `reg` can be in after matching the `i`th char in `str`.
|
||||
* The regular expression is modelled as a non-determistic finite automaton,
|
||||
* The regular expression is modeled as a non-determistic finite automaton,
|
||||
* the regular expression can therefore be in multiple states after matching a character.
|
||||
*
|
||||
* It's a forward search to all possible states, and there is thus no guarantee that the state is on a path to an accepting state.
|
||||
|
||||
@@ -385,7 +385,7 @@ private Node update(Node node) {
|
||||
* ```python
|
||||
* f(0, 1, 2, a=3)
|
||||
* ```
|
||||
* will be modelled as
|
||||
* will be modeled as
|
||||
* ```python
|
||||
* f(0, 1, [*t], [**d])
|
||||
* ```
|
||||
@@ -398,7 +398,7 @@ private Node update(Node node) {
|
||||
* ```python
|
||||
* f(0, **{"y": 1, "a": 3})
|
||||
* ```
|
||||
* no tuple argument is synthesized. It is modelled as
|
||||
* no tuple argument is synthesized. It is modeled as
|
||||
* ```python
|
||||
* f(0, [y=1], [**d])
|
||||
* ```
|
||||
|
||||
@@ -61,7 +61,7 @@ private module RegexpMatching {
|
||||
|
||||
/**
|
||||
* Gets a state the regular expression `reg` can be in after matching the `i`th char in `str`.
|
||||
* The regular expression is modelled as a non-determistic finite automaton,
|
||||
* The regular expression is modeled as a non-determistic finite automaton,
|
||||
* the regular expression can therefore be in multiple states after matching a character.
|
||||
*
|
||||
* It's a forward search to all possible states, and there is thus no guarantee that the state is on a path to an accepting state.
|
||||
|
||||
@@ -18,7 +18,7 @@ module Ssa {
|
||||
/**
|
||||
* Gets the control flow node of this SSA definition, if any. Phi nodes are
|
||||
* examples of SSA definitions without a control flow node, as they are
|
||||
* modelled at index `-1` in the relevant basic block.
|
||||
* modeled at index `-1` in the relevant basic block.
|
||||
*/
|
||||
final CfgNode getControlFlowNode() {
|
||||
exists(BasicBlock bb, int i | this.definesAt(_, bb, i) | result = bb.getNode(i))
|
||||
|
||||
@@ -61,7 +61,7 @@ private module RegexpMatching {
|
||||
|
||||
/**
|
||||
* Gets a state the regular expression `reg` can be in after matching the `i`th char in `str`.
|
||||
* The regular expression is modelled as a non-determistic finite automaton,
|
||||
* The regular expression is modeled as a non-determistic finite automaton,
|
||||
* the regular expression can therefore be in multiple states after matching a character.
|
||||
*
|
||||
* It's a forward search to all possible states, and there is thus no guarantee that the state is on a path to an accepting state.
|
||||
|
||||
Reference in New Issue
Block a user