зеркало из https://github.com/github/codeql.git
Merge branch 'master' of https://github.com/github/codeql into pr/erik-krogh/3566
This commit is contained in:
Коммит
d05a61c745
|
@ -3,8 +3,10 @@
|
|||
## General improvements
|
||||
|
||||
* Support for the following frameworks and libraries has been improved:
|
||||
- [Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise)
|
||||
- [bluebird](http://bluebirdjs.com/)
|
||||
- [express](https://www.npmjs.com/package/express)
|
||||
- [fastify](https://www.npmjs.com/package/fastify)
|
||||
- [fstream](https://www.npmjs.com/package/fstream)
|
||||
- [jGrowl](https://github.com/stanlemon/jGrowl)
|
||||
- [jQuery](https://jquery.com/)
|
||||
|
@ -13,12 +15,11 @@
|
|||
- [mssql](https://www.npmjs.com/package/mssql)
|
||||
- [mysql](https://www.npmjs.com/package/mysql)
|
||||
- [pg](https://www.npmjs.com/package/pg)
|
||||
- [Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise)
|
||||
- [sequelize](https://www.npmjs.com/package/sequelize)
|
||||
- [spanner](https://www.npmjs.com/package/spanner)
|
||||
- [sqlite](https://www.npmjs.com/package/sqlite)
|
||||
- [ssh2](https://www.npmjs.com/package/ssh2)
|
||||
- [ssh2-streams](https://www.npmjs.com/package/ssh2-streams)
|
||||
- [ssh2](https://www.npmjs.com/package/ssh2)
|
||||
|
||||
* TypeScript 3.9 is now supported.
|
||||
|
||||
|
@ -35,41 +36,42 @@
|
|||
|
||||
| **Query** | **Expected impact** | **Change** |
|
||||
|--------------------------------|------------------------------|---------------------------------------------------------------------------|
|
||||
| Misspelled variable name (`js/misspelled-variable-name`) | Message changed | The message for this query now correctly identifies the misspelled variable in additional cases. |
|
||||
| Uncontrolled data used in path expression (`js/path-injection`) | More results | This query now recognizes additional file system calls. |
|
||||
| Uncontrolled command line (`js/command-line-injection`) | More results | This query now recognizes additional command execution calls. |
|
||||
| Client-side URL redirect (`js/client-side-unvalidated-url-redirection`) | Less results | This query now recognizes additional safe patterns of doing URL redirects. |
|
||||
| Client-side cross-site scripting (`js/xss`) | Less results | This query now recognizes additional safe patterns of constructing HTML. |
|
||||
| Incomplete URL scheme check (`js/incomplete-url-scheme-check`) | More results | This query now recognizes additional url scheme checks. |
|
||||
| Prototype pollution in utility function (`js/prototype-pollution-utility`) | More results | This query now recognizes additional utility functions as vulnerable to prototype polution. |
|
||||
| Expression has no effect (`js/useless-expression`) | Less results | This query no longer flags an expression when that expression is the only content of the containing file. |
|
||||
| Unknown directive (`js/unknown-directive`) | Less results | This query no longer flags directives generated by the Babel compiler. |
|
||||
| Client-side URL redirect (`js/client-side-unvalidated-url-redirection`) | Fewer results | This query now recognizes additional safe patterns of doing URL redirects. |
|
||||
| Client-side cross-site scripting (`js/xss`) | Fewer results | This query now recognizes additional safe patterns of constructing HTML. |
|
||||
| Code injection (`js/code-injection`) | More results | More potential vulnerabilities involving NoSQL code operators are now recognized. |
|
||||
| Expression has no effect (`js/useless-expression`) | Fewer results | This query no longer flags an expression when that expression is the only content of the containing file. |
|
||||
| Incomplete URL scheme check (`js/incomplete-url-scheme-check`) | More results | This query now recognizes additional url scheme checks. |
|
||||
| Misspelled variable name (`js/misspelled-variable-name`) | Message changed | The message for this query now correctly identifies the misspelled variable in additional cases. |
|
||||
| Prototype pollution in utility function (`js/prototype-pollution-utility`) | More results | This query now recognizes additional utility functions as vulnerable to prototype polution. |
|
||||
| Prototype pollution in utility function (`js/prototype-pollution-utility`) | More results | This query now recognizes more coding patterns that are vulnerable to prototype pollution. |
|
||||
| Uncontrolled command line (`js/command-line-injection`) | More results | This query now recognizes additional command execution calls. |
|
||||
| Uncontrolled data used in path expression (`js/path-injection`) | More results | This query now recognizes additional file system calls. |
|
||||
| Unknown directive (`js/unknown-directive`) | Fewer results | This query no longer flags directives generated by the Babel compiler. |
|
||||
| Unused property (`js/unused-property`) | Fewer results | This query no longer flags properties of objects that are operands of `yield` expressions. |
|
||||
| Zip Slip (`js/zipslip`) | More results | This query now recognizes additional vulnerabilities. |
|
||||
| Unused property (`js/unused-property`) | Less results | This query no longer flags properties of objects that are operands of `yield` expressions. |
|
||||
|
||||
The following low-precision queries are no longer run by default on LGTM (their results already were not displayed):
|
||||
|
||||
- `js/angular/dead-event-listener`
|
||||
- `js/angular/unused-dependency`
|
||||
- `js/conflicting-html-attribute`
|
||||
- `js/useless-assignment-to-global`
|
||||
- `js/too-many-parameters`
|
||||
- `js/unused-property`
|
||||
- `js/bitwise-sign-check`
|
||||
- `js/comparison-of-identical-expressions`
|
||||
- `js/misspelled-identifier`
|
||||
- `js/jsdoc/malformed-param-tag`
|
||||
- `js/jsdoc/unknown-parameter`
|
||||
- `js/jsdoc/missing-parameter`
|
||||
- `js/omitted-array-element`
|
||||
- `js/conflicting-html-attribute`
|
||||
- `js/ignored-setter-parameter`
|
||||
- `js/jsdoc/malformed-param-tag`
|
||||
- `js/jsdoc/missing-parameter`
|
||||
- `js/jsdoc/unknown-parameter`
|
||||
- `js/json-in-javascript-file`
|
||||
- `js/misspelled-identifier`
|
||||
- `js/nested-loops-with-same-variable`
|
||||
- `js/node/cyclic-import`
|
||||
- `js/node/unused-npm-dependency`
|
||||
- `js/single-run-loop`
|
||||
- `js/nested-loops-with-same-variable`
|
||||
- `js/omitted-array-element`
|
||||
- `js/return-outside-function`
|
||||
- `js/single-run-loop`
|
||||
- `js/too-many-parameters`
|
||||
- `js/unused-property`
|
||||
- `js/useless-assignment-to-global`
|
||||
|
||||
## Changes to libraries
|
||||
|
||||
|
@ -79,3 +81,4 @@ The following low-precision queries are no longer run by default on LGTM (their
|
|||
- `Parameter.flow()` now gets the correct data flow node for a parameter. Previously this had a result, but the node was disconnected from the data flow graph.
|
||||
- `ParameterNode.asExpr()` and `.getAstNode()` now gets the parameter's AST node, whereas previously it had no result.
|
||||
- `Expr.flow()` now has a more meaningful result for destructuring patterns. Previously this node was disconnected from the data flow graph. Now it represents the values being destructured by the pattern.
|
||||
* The global data-flow and taint-tracking libraries now model indirect parameter accesses through the `arguments` object in some cases, which may lead to additional results from some of the security queries, particularly "Prototype pollution in utility function".
|
||||
|
|
|
@ -1,31 +1,52 @@
|
|||
/** Provides a class for working with defect query results stored in dashboard databases. */
|
||||
|
||||
import cpp
|
||||
|
||||
/**
|
||||
* Holds if `id` in the opaque identifier of a result reported by query `queryPath`,
|
||||
* such that `message` is the associated message and the location of the result spans
|
||||
* column `startcolumn` of line `startline` to column `endcolumn` of line `endline`
|
||||
* in file `filepath`.
|
||||
*
|
||||
* For more information, see [Locations](https://help.semmle.com/QL/learn-ql/ql/locations.html).
|
||||
*/
|
||||
external predicate defectResults(
|
||||
int id, string queryPath, string file, int startline, int startcol, int endline, int endcol,
|
||||
string message
|
||||
);
|
||||
|
||||
/**
|
||||
* A defect query result stored in a dashboard database.
|
||||
*/
|
||||
class DefectResult extends int {
|
||||
DefectResult() { defectResults(this, _, _, _, _, _, _, _) }
|
||||
|
||||
/** Gets the path of the query that reported the result. */
|
||||
string getQueryPath() { defectResults(this, result, _, _, _, _, _, _) }
|
||||
|
||||
/** Gets the file in which this query result was reported. */
|
||||
File getFile() {
|
||||
exists(string path |
|
||||
defectResults(this, _, path, _, _, _, _, _) and result.getAbsolutePath() = path
|
||||
)
|
||||
}
|
||||
|
||||
/** Gets the line on which the location of this query result starts. */
|
||||
int getStartLine() { defectResults(this, _, _, result, _, _, _, _) }
|
||||
|
||||
/** Gets the column on which the location of this query result starts. */
|
||||
int getStartColumn() { defectResults(this, _, _, _, result, _, _, _) }
|
||||
|
||||
/** Gets the line on which the location of this query result ends. */
|
||||
int getEndLine() { defectResults(this, _, _, _, _, result, _, _) }
|
||||
|
||||
/** Gets the column on which the location of this query result ends. */
|
||||
int getEndColumn() { defectResults(this, _, _, _, _, _, result, _) }
|
||||
|
||||
/** Gets the message associated with this query result. */
|
||||
string getMessage() { defectResults(this, _, _, _, _, _, _, result) }
|
||||
|
||||
/** Gets the URL corresponding to the location of this query result. */
|
||||
string getURL() {
|
||||
result =
|
||||
"file://" + getFile().getAbsolutePath() + ":" + getStartLine() + ":" + getStartColumn() + ":" +
|
||||
|
|
|
@ -1,26 +1,45 @@
|
|||
/**
|
||||
* Provides classes for working with external data.
|
||||
*/
|
||||
|
||||
import cpp
|
||||
|
||||
/**
|
||||
* An external data item.
|
||||
*/
|
||||
class ExternalData extends @externalDataElement {
|
||||
/** Gets the path of the file this data was loaded from. */
|
||||
string getDataPath() { externalData(this, result, _, _) }
|
||||
|
||||
/**
|
||||
* Gets the path of the file this data was loaded from, with its
|
||||
* extension replaced by `.ql`.
|
||||
*/
|
||||
string getQueryPath() { result = getDataPath().regexpReplaceAll("\\.[^.]*$", ".ql") }
|
||||
|
||||
/** Gets the number of fields in this data item. */
|
||||
int getNumFields() { result = 1 + max(int i | externalData(this, _, i, _) | i) }
|
||||
|
||||
string getField(int index) { externalData(this, _, index, result) }
|
||||
/** Gets the value of the `i`th field of this data item. */
|
||||
string getField(int i) { externalData(this, _, i, result) }
|
||||
|
||||
int getFieldAsInt(int index) { result = getField(index).toInt() }
|
||||
/** Gets the integer value of the `i`th field of this data item. */
|
||||
int getFieldAsInt(int i) { result = getField(i).toInt() }
|
||||
|
||||
float getFieldAsFloat(int index) { result = getField(index).toFloat() }
|
||||
/** Gets the floating-point value of the `i`th field of this data item. */
|
||||
float getFieldAsFloat(int i) { result = getField(i).toFloat() }
|
||||
|
||||
date getFieldAsDate(int index) { result = getField(index).toDate() }
|
||||
/** Gets the value of the `i`th field of this data item, interpreted as a date. */
|
||||
date getFieldAsDate(int i) { result = getField(i).toDate() }
|
||||
|
||||
/** Gets a textual representation of this data item. */
|
||||
string toString() { result = getQueryPath() + ": " + buildTupleString(0) }
|
||||
|
||||
private string buildTupleString(int start) {
|
||||
start = getNumFields() - 1 and result = getField(start)
|
||||
/** Gets a textual representation of this data item, starting with the `n`th field. */
|
||||
private string buildTupleString(int n) {
|
||||
n = getNumFields() - 1 and result = getField(n)
|
||||
or
|
||||
start < getNumFields() - 1 and result = getField(start) + "," + buildTupleString(start + 1)
|
||||
n < getNumFields() - 1 and result = getField(n) + "," + buildTupleString(n + 1)
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -33,7 +52,9 @@ class DefectExternalData extends ExternalData {
|
|||
this.getNumFields() = 2
|
||||
}
|
||||
|
||||
/** Gets the URL associated with this data item. */
|
||||
string getURL() { result = getField(0) }
|
||||
|
||||
/** Gets the message associated with this data item. */
|
||||
string getMessage() { result = getField(1) }
|
||||
}
|
||||
|
|
|
@ -1,31 +1,58 @@
|
|||
/** Provides a class for working with metric query results stored in dashboard databases. */
|
||||
|
||||
import cpp
|
||||
|
||||
/**
|
||||
* Holds if `id` in the opaque identifier of a result reported by query `queryPath`,
|
||||
* such that `value` is the reported metric value and the location of the result spans
|
||||
* column `startcolumn` of line `startline` to column `endcolumn` of line `endline`
|
||||
* in file `filepath`.
|
||||
*
|
||||
* For more information, see [Locations](https://help.semmle.com/QL/learn-ql/ql/locations.html).
|
||||
*/
|
||||
external predicate metricResults(
|
||||
int id, string queryPath, string file, int startline, int startcol, int endline, int endcol,
|
||||
float value
|
||||
);
|
||||
|
||||
/**
|
||||
* A metric query result stored in a dashboard database.
|
||||
*/
|
||||
class MetricResult extends int {
|
||||
MetricResult() { metricResults(this, _, _, _, _, _, _, _) }
|
||||
|
||||
/** Gets the path of the query that reported the result. */
|
||||
string getQueryPath() { metricResults(this, result, _, _, _, _, _, _) }
|
||||
|
||||
/** Gets the file in which this query result was reported. */
|
||||
File getFile() {
|
||||
exists(string path |
|
||||
metricResults(this, _, path, _, _, _, _, _) and result.getAbsolutePath() = path
|
||||
)
|
||||
}
|
||||
|
||||
/** Gets the line on which the location of this query result starts. */
|
||||
int getStartLine() { metricResults(this, _, _, result, _, _, _, _) }
|
||||
|
||||
/** Gets the column on which the location of this query result starts. */
|
||||
int getStartColumn() { metricResults(this, _, _, _, result, _, _, _) }
|
||||
|
||||
/** Gets the line on which the location of this query result ends. */
|
||||
int getEndLine() { metricResults(this, _, _, _, _, result, _, _) }
|
||||
|
||||
/** Gets the column on which the location of this query result ends. */
|
||||
int getEndColumn() { metricResults(this, _, _, _, _, _, result, _) }
|
||||
|
||||
/**
|
||||
* Holds if there is a `Location` entity whose location is the same as
|
||||
* the location of this query result.
|
||||
*/
|
||||
predicate hasMatchingLocation() { exists(this.getMatchingLocation()) }
|
||||
|
||||
/**
|
||||
* Gets the `Location` entity whose location is the same as the location
|
||||
* of this query result.
|
||||
*/
|
||||
Location getMatchingLocation() {
|
||||
result.getFile() = this.getFile() and
|
||||
result.getStartLine() = this.getStartLine() and
|
||||
|
@ -34,8 +61,10 @@ class MetricResult extends int {
|
|||
result.getEndColumn() = this.getEndColumn()
|
||||
}
|
||||
|
||||
/** Gets the value associated with this query result. */
|
||||
float getValue() { metricResults(this, _, _, _, _, _, _, result) }
|
||||
|
||||
/** Gets the URL corresponding to the location of this query result. */
|
||||
string getURL() {
|
||||
result =
|
||||
"file://" + getFile().getAbsolutePath() + ":" + getStartLine() + ":" + getStartColumn() + ":" +
|
||||
|
|
|
@ -98,7 +98,12 @@ class Declaration extends Locatable, @declaration {
|
|||
this.hasQualifiedName(namespaceQualifier, "", baseName)
|
||||
}
|
||||
|
||||
override string toString() { result = this.getName() }
|
||||
/**
|
||||
* Gets a description of this `Declaration` for display purposes.
|
||||
*/
|
||||
string getDescription() { result = this.getName() }
|
||||
|
||||
final override string toString() { result = this.getDescription() }
|
||||
|
||||
/**
|
||||
* Gets the name of this declaration.
|
||||
|
|
|
@ -79,7 +79,10 @@ class Namespace extends NameQualifyingElement, @namespace {
|
|||
/** Gets the metric namespace. */
|
||||
MetricNamespace getMetrics() { result = this }
|
||||
|
||||
override string toString() { result = this.getQualifiedName() }
|
||||
/** Gets a version of the `QualifiedName` that is more suitable for display purposes. */
|
||||
string getFriendlyName() { result = this.getQualifiedName() }
|
||||
|
||||
final override string toString() { result = getFriendlyName() }
|
||||
|
||||
/** Gets a declaration of (part of) this namespace. */
|
||||
NamespaceDeclarationEntry getADeclarationEntry() { result.getNamespace() = this }
|
||||
|
@ -104,7 +107,7 @@ class NamespaceDeclarationEntry extends Locatable, @namespace_decl {
|
|||
namespace_decls(underlyingElement(this), unresolveElement(result), _, _)
|
||||
}
|
||||
|
||||
override string toString() { result = this.getNamespace().toString() }
|
||||
override string toString() { result = this.getNamespace().getFriendlyName() }
|
||||
|
||||
/**
|
||||
* Gets the location of the token preceding the namespace declaration
|
||||
|
@ -150,7 +153,7 @@ class UsingDeclarationEntry extends UsingEntry {
|
|||
*/
|
||||
Declaration getDeclaration() { usings(underlyingElement(this), unresolveElement(result), _) }
|
||||
|
||||
override string toString() { result = "using " + this.getDeclaration().toString() }
|
||||
override string toString() { result = "using " + this.getDeclaration().getDescription() }
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -169,7 +172,7 @@ class UsingDirectiveEntry extends UsingEntry {
|
|||
*/
|
||||
Namespace getNamespace() { usings(underlyingElement(this), unresolveElement(result), _) }
|
||||
|
||||
override string toString() { result = "using namespace " + this.getNamespace().toString() }
|
||||
override string toString() { result = "using namespace " + this.getNamespace().getFriendlyName() }
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -204,7 +207,7 @@ class GlobalNamespace extends Namespace {
|
|||
*/
|
||||
deprecated string getFullName() { result = this.getName() }
|
||||
|
||||
override string toString() { result = "(global namespace)" }
|
||||
override string getFriendlyName() { result = "(global namespace)" }
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -260,24 +260,33 @@ class ParameterDeclarationEntry extends VariableDeclarationEntry {
|
|||
*/
|
||||
int getIndex() { param_decl_bind(underlyingElement(this), result, _) }
|
||||
|
||||
private string getAnonymousParameterDescription() {
|
||||
not exists(getName()) and
|
||||
exists(string idx |
|
||||
idx =
|
||||
((getIndex() + 1).toString() + "th")
|
||||
.replaceAll("1th", "1st")
|
||||
.replaceAll("2th", "2nd")
|
||||
.replaceAll("3th", "3rd")
|
||||
.replaceAll("11st", "11th")
|
||||
.replaceAll("12nd", "12th")
|
||||
.replaceAll("13rd", "13th") and
|
||||
if exists(getCanonicalName())
|
||||
then result = "declaration of " + getCanonicalName() + " as anonymous " + idx + " parameter"
|
||||
else result = "declaration of " + idx + " parameter"
|
||||
)
|
||||
}
|
||||
|
||||
override string toString() {
|
||||
if exists(getName())
|
||||
then result = super.toString()
|
||||
else
|
||||
exists(string idx |
|
||||
idx =
|
||||
((getIndex() + 1).toString() + "th")
|
||||
.replaceAll("1th", "1st")
|
||||
.replaceAll("2th", "2nd")
|
||||
.replaceAll("3th", "3rd")
|
||||
.replaceAll("11st", "11th")
|
||||
.replaceAll("12nd", "12th")
|
||||
.replaceAll("13rd", "13th")
|
||||
|
|
||||
if exists(getCanonicalName())
|
||||
then result = "declaration of " + getCanonicalName() + " as anonymous " + idx + " parameter"
|
||||
else result = "declaration of " + idx + " parameter"
|
||||
)
|
||||
isDefinition() and
|
||||
result = "definition of " + getName()
|
||||
or
|
||||
not isDefinition() and
|
||||
if getName() = getCanonicalName()
|
||||
then result = "declaration of " + getName()
|
||||
else result = "declaration of " + getCanonicalName() + " as " + getName()
|
||||
or
|
||||
result = getAnonymousParameterDescription()
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -116,7 +116,7 @@ class XMLFile extends XMLParent, File {
|
|||
XMLFile() { xmlEncoding(this, _) }
|
||||
|
||||
/** Gets a printable representation of this XML file. */
|
||||
override string toString() { result = XMLParent.super.toString() }
|
||||
override string toString() { result = getName() }
|
||||
|
||||
/** Gets the name of this XML file. */
|
||||
override string getName() { result = File.super.getAbsolutePath() }
|
||||
|
@ -236,7 +236,7 @@ class XMLElement extends @xmlelement, XMLParent, XMLLocatable {
|
|||
string getAttributeValue(string name) { result = this.getAttribute(name).getValue() }
|
||||
|
||||
/** Gets a printable representation of this XML element. */
|
||||
override string toString() { result = XMLParent.super.toString() }
|
||||
override string toString() { result = getName() }
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -86,7 +86,7 @@ class Closure extends Class {
|
|||
result.getName() = "operator()"
|
||||
}
|
||||
|
||||
override string toString() { result = "decltype([...](...){...})" }
|
||||
override string getDescription() { result = "decltype([...](...){...})" }
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -99,7 +99,7 @@ class Closure extends Class {
|
|||
* ```
|
||||
*/
|
||||
class LambdaCapture extends Locatable, @lambdacapture {
|
||||
override string toString() { result = getField().toString() }
|
||||
override string toString() { result = getField().getName() }
|
||||
|
||||
override string getCanonicalQLClass() { result = "LambdaCapture" }
|
||||
|
||||
|
|
|
@ -362,7 +362,7 @@ CppType getTypeForPRValueOrUnknown(Type type) {
|
|||
/**
|
||||
* Gets the `CppType` that represents a glvalue of type `type`.
|
||||
*/
|
||||
CppType getTypeForGLValue(Type type) { result.hasType(type, true) }
|
||||
CppGLValueAddressType getTypeForGLValue(Type type) { result.hasType(type, true) }
|
||||
|
||||
/**
|
||||
* Gets the `CppType` that represents a prvalue of type `int`.
|
||||
|
|
|
@ -15,10 +15,14 @@ int vsnprintf(char *s, size_t n, const char *format, va_list arg);
|
|||
|
||||
int mysprintf(char *s, size_t n, const char *format, ...)
|
||||
{
|
||||
int result;
|
||||
|
||||
va_list args;
|
||||
va_start(args, format);
|
||||
vsnprintf(s, n, format, args);
|
||||
result = vsnprintf(s, n, format, args);
|
||||
va_end(args);
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
int sscanf(const char *s, const char *format, ...);
|
||||
|
|
|
@ -3,112 +3,114 @@
|
|||
| file://:0:0:0:0 | p#0 | file://:0:0:0:0 | p#0 | |
|
||||
| file://:0:0:0:0 | p#0 | file://:0:0:0:0 | p#0 | |
|
||||
| file://:0:0:0:0 | p#0 | file://:0:0:0:0 | p#0 | |
|
||||
| format.cpp:16:21:16:21 | s | format.cpp:20:13:20:13 | s | |
|
||||
| format.cpp:16:31:16:31 | n | format.cpp:20:16:20:16 | n | |
|
||||
| format.cpp:16:46:16:51 | format | format.cpp:20:19:20:24 | format | |
|
||||
| format.cpp:18:10:18:13 | args | format.cpp:20:27:20:30 | args | |
|
||||
| format.cpp:46:21:46:24 | {...} | format.cpp:47:17:47:22 | buffer | |
|
||||
| format.cpp:46:21:46:24 | {...} | format.cpp:48:8:48:13 | buffer | |
|
||||
| format.cpp:46:23:46:23 | 0 | format.cpp:46:21:46:24 | {...} | TAINT |
|
||||
| format.cpp:47:17:47:22 | ref arg buffer | format.cpp:48:8:48:13 | buffer | |
|
||||
| format.cpp:47:30:47:33 | %s | format.cpp:47:17:47:22 | ref arg buffer | TAINT |
|
||||
| format.cpp:47:36:47:43 | Hello. | format.cpp:47:17:47:22 | ref arg buffer | TAINT |
|
||||
| format.cpp:51:21:51:24 | {...} | format.cpp:52:17:52:22 | buffer | |
|
||||
| format.cpp:51:21:51:24 | {...} | format.cpp:53:8:53:13 | buffer | |
|
||||
| format.cpp:51:23:51:23 | 0 | format.cpp:51:21:51:24 | {...} | TAINT |
|
||||
| format.cpp:52:17:52:22 | ref arg buffer | format.cpp:53:8:53:13 | buffer | |
|
||||
| format.cpp:52:30:52:33 | %s | format.cpp:52:17:52:22 | ref arg buffer | TAINT |
|
||||
| format.cpp:52:36:52:49 | call to source | format.cpp:52:17:52:22 | ref arg buffer | TAINT |
|
||||
| format.cpp:56:21:56:24 | {...} | format.cpp:57:17:57:22 | buffer | |
|
||||
| format.cpp:56:21:56:24 | {...} | format.cpp:58:8:58:13 | buffer | |
|
||||
| format.cpp:56:23:56:23 | 0 | format.cpp:56:21:56:24 | {...} | TAINT |
|
||||
| format.cpp:57:17:57:22 | ref arg buffer | format.cpp:58:8:58:13 | buffer | |
|
||||
| format.cpp:57:30:57:43 | call to source | format.cpp:57:17:57:22 | ref arg buffer | TAINT |
|
||||
| format.cpp:57:48:57:55 | Hello. | format.cpp:57:17:57:22 | ref arg buffer | TAINT |
|
||||
| format.cpp:61:21:61:24 | {...} | format.cpp:62:17:62:22 | buffer | |
|
||||
| format.cpp:61:21:61:24 | {...} | format.cpp:63:8:63:13 | buffer | |
|
||||
| format.cpp:61:23:61:23 | 0 | format.cpp:61:21:61:24 | {...} | TAINT |
|
||||
| format.cpp:62:17:62:22 | ref arg buffer | format.cpp:63:8:63:13 | buffer | |
|
||||
| format.cpp:62:30:62:39 | %s %s %s | format.cpp:62:17:62:22 | ref arg buffer | TAINT |
|
||||
| format.cpp:62:42:62:44 | a | format.cpp:62:17:62:22 | ref arg buffer | TAINT |
|
||||
| format.cpp:62:47:62:49 | b | format.cpp:62:17:62:22 | ref arg buffer | TAINT |
|
||||
| format.cpp:62:52:62:65 | call to source | format.cpp:62:17:62:22 | ref arg buffer | TAINT |
|
||||
| format.cpp:66:21:66:24 | {...} | format.cpp:67:17:67:22 | buffer | |
|
||||
| format.cpp:66:21:66:24 | {...} | format.cpp:68:8:68:13 | buffer | |
|
||||
| format.cpp:66:23:66:23 | 0 | format.cpp:66:21:66:24 | {...} | TAINT |
|
||||
| format.cpp:67:17:67:22 | ref arg buffer | format.cpp:68:8:68:13 | buffer | |
|
||||
| format.cpp:67:30:67:35 | %.*s | format.cpp:67:17:67:22 | ref arg buffer | TAINT |
|
||||
| format.cpp:67:38:67:39 | 10 | format.cpp:67:17:67:22 | ref arg buffer | TAINT |
|
||||
| format.cpp:67:42:67:55 | call to source | format.cpp:67:17:67:22 | ref arg buffer | TAINT |
|
||||
| format.cpp:72:21:72:24 | {...} | format.cpp:73:17:73:22 | buffer | |
|
||||
| format.cpp:72:21:72:24 | {...} | format.cpp:74:8:74:13 | buffer | |
|
||||
| format.cpp:72:23:72:23 | 0 | format.cpp:72:21:72:24 | {...} | TAINT |
|
||||
| format.cpp:73:17:73:22 | ref arg buffer | format.cpp:74:8:74:13 | buffer | |
|
||||
| format.cpp:73:30:73:33 | %i | format.cpp:73:17:73:22 | ref arg buffer | TAINT |
|
||||
| format.cpp:73:36:73:36 | 0 | format.cpp:73:17:73:22 | ref arg buffer | TAINT |
|
||||
| format.cpp:77:21:77:24 | {...} | format.cpp:78:17:78:22 | buffer | |
|
||||
| format.cpp:77:21:77:24 | {...} | format.cpp:79:8:79:13 | buffer | |
|
||||
| format.cpp:77:23:77:23 | 0 | format.cpp:77:21:77:24 | {...} | TAINT |
|
||||
| format.cpp:78:17:78:22 | ref arg buffer | format.cpp:79:8:79:13 | buffer | |
|
||||
| format.cpp:78:30:78:33 | %i | format.cpp:78:17:78:22 | ref arg buffer | TAINT |
|
||||
| format.cpp:78:36:78:41 | call to source | format.cpp:78:17:78:22 | ref arg buffer | TAINT |
|
||||
| format.cpp:82:21:82:24 | {...} | format.cpp:83:17:83:22 | buffer | |
|
||||
| format.cpp:82:21:82:24 | {...} | format.cpp:84:8:84:13 | buffer | |
|
||||
| format.cpp:82:23:82:23 | 0 | format.cpp:82:21:82:24 | {...} | TAINT |
|
||||
| format.cpp:83:17:83:22 | ref arg buffer | format.cpp:84:8:84:13 | buffer | |
|
||||
| format.cpp:83:30:83:35 | %.*s | format.cpp:83:17:83:22 | ref arg buffer | TAINT |
|
||||
| format.cpp:83:38:83:43 | call to source | format.cpp:83:17:83:22 | ref arg buffer | TAINT |
|
||||
| format.cpp:83:48:83:55 | Hello. | format.cpp:83:17:83:22 | ref arg buffer | TAINT |
|
||||
| format.cpp:88:21:88:24 | {...} | format.cpp:89:17:89:22 | buffer | |
|
||||
| format.cpp:88:21:88:24 | {...} | format.cpp:90:8:90:13 | buffer | |
|
||||
| format.cpp:88:23:88:23 | 0 | format.cpp:88:21:88:24 | {...} | TAINT |
|
||||
| format.cpp:89:17:89:22 | ref arg buffer | format.cpp:90:8:90:13 | buffer | |
|
||||
| format.cpp:89:30:89:33 | %p | format.cpp:89:17:89:22 | ref arg buffer | TAINT |
|
||||
| format.cpp:89:36:89:49 | call to source | format.cpp:89:17:89:22 | ref arg buffer | TAINT |
|
||||
| format.cpp:94:21:94:24 | {...} | format.cpp:95:16:95:21 | buffer | |
|
||||
| format.cpp:94:21:94:24 | {...} | format.cpp:96:8:96:13 | buffer | |
|
||||
| format.cpp:94:23:94:23 | 0 | format.cpp:94:21:94:24 | {...} | TAINT |
|
||||
| format.cpp:95:16:95:21 | ref arg buffer | format.cpp:96:8:96:13 | buffer | |
|
||||
| format.cpp:95:24:95:27 | %s | format.cpp:95:16:95:21 | ref arg buffer | TAINT |
|
||||
| format.cpp:95:30:95:43 | call to source | format.cpp:95:16:95:21 | ref arg buffer | TAINT |
|
||||
| format.cpp:99:21:99:24 | {...} | format.cpp:100:16:100:21 | buffer | |
|
||||
| format.cpp:99:21:99:24 | {...} | format.cpp:101:8:101:13 | buffer | |
|
||||
| format.cpp:99:23:99:23 | 0 | format.cpp:99:21:99:24 | {...} | TAINT |
|
||||
| format.cpp:100:16:100:21 | ref arg buffer | format.cpp:101:8:101:13 | buffer | |
|
||||
| format.cpp:100:24:100:28 | %ls | format.cpp:100:16:100:21 | ref arg buffer | TAINT |
|
||||
| format.cpp:100:31:100:45 | call to source | format.cpp:100:16:100:21 | ref arg buffer | TAINT |
|
||||
| format.cpp:104:25:104:28 | {...} | format.cpp:105:17:105:23 | wbuffer | |
|
||||
| format.cpp:104:25:104:28 | {...} | format.cpp:106:8:106:14 | wbuffer | |
|
||||
| format.cpp:104:27:104:27 | 0 | format.cpp:104:25:104:28 | {...} | TAINT |
|
||||
| format.cpp:105:17:105:23 | ref arg wbuffer | format.cpp:106:8:106:14 | wbuffer | |
|
||||
| format.cpp:105:31:105:35 | %s | format.cpp:105:17:105:23 | ref arg wbuffer | TAINT |
|
||||
| format.cpp:105:38:105:52 | call to source | format.cpp:105:17:105:23 | ref arg wbuffer | TAINT |
|
||||
| format.cpp:109:21:109:24 | {...} | format.cpp:110:18:110:23 | buffer | |
|
||||
| format.cpp:109:21:109:24 | {...} | format.cpp:111:8:111:13 | buffer | |
|
||||
| format.cpp:109:23:109:23 | 0 | format.cpp:109:21:109:24 | {...} | TAINT |
|
||||
| format.cpp:110:18:110:23 | ref arg buffer | format.cpp:111:8:111:13 | buffer | |
|
||||
| format.cpp:115:10:115:11 | 0 | format.cpp:116:29:116:29 | i | |
|
||||
| format.cpp:115:10:115:11 | 0 | format.cpp:117:8:117:8 | i | |
|
||||
| format.cpp:116:28:116:29 | ref arg & ... | format.cpp:116:29:116:29 | i [inner post update] | |
|
||||
| format.cpp:116:28:116:29 | ref arg & ... | format.cpp:117:8:117:8 | i | |
|
||||
| format.cpp:116:29:116:29 | i | format.cpp:116:28:116:29 | & ... | |
|
||||
| format.cpp:120:10:120:11 | 0 | format.cpp:121:40:121:40 | i | |
|
||||
| format.cpp:120:10:120:11 | 0 | format.cpp:122:8:122:8 | i | |
|
||||
| format.cpp:121:39:121:40 | ref arg & ... | format.cpp:121:40:121:40 | i [inner post update] | |
|
||||
| format.cpp:121:39:121:40 | ref arg & ... | format.cpp:122:8:122:8 | i | |
|
||||
| format.cpp:121:40:121:40 | i | format.cpp:121:39:121:40 | & ... | |
|
||||
| format.cpp:125:21:125:24 | {...} | format.cpp:126:32:126:37 | buffer | |
|
||||
| format.cpp:125:21:125:24 | {...} | format.cpp:127:8:127:13 | buffer | |
|
||||
| format.cpp:125:23:125:23 | 0 | format.cpp:125:21:125:24 | {...} | TAINT |
|
||||
| format.cpp:126:31:126:37 | ref arg & ... | format.cpp:126:32:126:37 | buffer [inner post update] | |
|
||||
| format.cpp:126:31:126:37 | ref arg & ... | format.cpp:127:8:127:13 | buffer | |
|
||||
| format.cpp:126:32:126:37 | buffer | format.cpp:126:31:126:37 | & ... | |
|
||||
| format.cpp:130:21:130:24 | {...} | format.cpp:131:40:131:45 | buffer | |
|
||||
| format.cpp:130:21:130:24 | {...} | format.cpp:132:8:132:13 | buffer | |
|
||||
| format.cpp:130:23:130:23 | 0 | format.cpp:130:21:130:24 | {...} | TAINT |
|
||||
| format.cpp:131:39:131:45 | ref arg & ... | format.cpp:131:40:131:45 | buffer [inner post update] | |
|
||||
| format.cpp:131:39:131:45 | ref arg & ... | format.cpp:132:8:132:13 | buffer | |
|
||||
| format.cpp:131:40:131:45 | buffer | format.cpp:131:39:131:45 | & ... | |
|
||||
| format.cpp:16:21:16:21 | s | format.cpp:22:22:22:22 | s | |
|
||||
| format.cpp:16:31:16:31 | n | format.cpp:22:25:22:25 | n | |
|
||||
| format.cpp:16:46:16:51 | format | format.cpp:22:28:22:33 | format | |
|
||||
| format.cpp:20:10:20:13 | args | format.cpp:22:36:22:39 | args | |
|
||||
| format.cpp:22:12:22:20 | call to vsnprintf | format.cpp:22:3:22:40 | ... = ... | |
|
||||
| format.cpp:22:12:22:20 | call to vsnprintf | format.cpp:25:9:25:14 | result | |
|
||||
| format.cpp:50:21:50:24 | {...} | format.cpp:51:17:51:22 | buffer | |
|
||||
| format.cpp:50:21:50:24 | {...} | format.cpp:52:8:52:13 | buffer | |
|
||||
| format.cpp:50:23:50:23 | 0 | format.cpp:50:21:50:24 | {...} | TAINT |
|
||||
| format.cpp:51:17:51:22 | ref arg buffer | format.cpp:52:8:52:13 | buffer | |
|
||||
| format.cpp:51:30:51:33 | %s | format.cpp:51:17:51:22 | ref arg buffer | TAINT |
|
||||
| format.cpp:51:36:51:43 | Hello. | format.cpp:51:17:51:22 | ref arg buffer | TAINT |
|
||||
| format.cpp:55:21:55:24 | {...} | format.cpp:56:17:56:22 | buffer | |
|
||||
| format.cpp:55:21:55:24 | {...} | format.cpp:57:8:57:13 | buffer | |
|
||||
| format.cpp:55:23:55:23 | 0 | format.cpp:55:21:55:24 | {...} | TAINT |
|
||||
| format.cpp:56:17:56:22 | ref arg buffer | format.cpp:57:8:57:13 | buffer | |
|
||||
| format.cpp:56:30:56:33 | %s | format.cpp:56:17:56:22 | ref arg buffer | TAINT |
|
||||
| format.cpp:56:36:56:49 | call to source | format.cpp:56:17:56:22 | ref arg buffer | TAINT |
|
||||
| format.cpp:60:21:60:24 | {...} | format.cpp:61:17:61:22 | buffer | |
|
||||
| format.cpp:60:21:60:24 | {...} | format.cpp:62:8:62:13 | buffer | |
|
||||
| format.cpp:60:23:60:23 | 0 | format.cpp:60:21:60:24 | {...} | TAINT |
|
||||
| format.cpp:61:17:61:22 | ref arg buffer | format.cpp:62:8:62:13 | buffer | |
|
||||
| format.cpp:61:30:61:43 | call to source | format.cpp:61:17:61:22 | ref arg buffer | TAINT |
|
||||
| format.cpp:61:48:61:55 | Hello. | format.cpp:61:17:61:22 | ref arg buffer | TAINT |
|
||||
| format.cpp:65:21:65:24 | {...} | format.cpp:66:17:66:22 | buffer | |
|
||||
| format.cpp:65:21:65:24 | {...} | format.cpp:67:8:67:13 | buffer | |
|
||||
| format.cpp:65:23:65:23 | 0 | format.cpp:65:21:65:24 | {...} | TAINT |
|
||||
| format.cpp:66:17:66:22 | ref arg buffer | format.cpp:67:8:67:13 | buffer | |
|
||||
| format.cpp:66:30:66:39 | %s %s %s | format.cpp:66:17:66:22 | ref arg buffer | TAINT |
|
||||
| format.cpp:66:42:66:44 | a | format.cpp:66:17:66:22 | ref arg buffer | TAINT |
|
||||
| format.cpp:66:47:66:49 | b | format.cpp:66:17:66:22 | ref arg buffer | TAINT |
|
||||
| format.cpp:66:52:66:65 | call to source | format.cpp:66:17:66:22 | ref arg buffer | TAINT |
|
||||
| format.cpp:70:21:70:24 | {...} | format.cpp:71:17:71:22 | buffer | |
|
||||
| format.cpp:70:21:70:24 | {...} | format.cpp:72:8:72:13 | buffer | |
|
||||
| format.cpp:70:23:70:23 | 0 | format.cpp:70:21:70:24 | {...} | TAINT |
|
||||
| format.cpp:71:17:71:22 | ref arg buffer | format.cpp:72:8:72:13 | buffer | |
|
||||
| format.cpp:71:30:71:35 | %.*s | format.cpp:71:17:71:22 | ref arg buffer | TAINT |
|
||||
| format.cpp:71:38:71:39 | 10 | format.cpp:71:17:71:22 | ref arg buffer | TAINT |
|
||||
| format.cpp:71:42:71:55 | call to source | format.cpp:71:17:71:22 | ref arg buffer | TAINT |
|
||||
| format.cpp:76:21:76:24 | {...} | format.cpp:77:17:77:22 | buffer | |
|
||||
| format.cpp:76:21:76:24 | {...} | format.cpp:78:8:78:13 | buffer | |
|
||||
| format.cpp:76:23:76:23 | 0 | format.cpp:76:21:76:24 | {...} | TAINT |
|
||||
| format.cpp:77:17:77:22 | ref arg buffer | format.cpp:78:8:78:13 | buffer | |
|
||||
| format.cpp:77:30:77:33 | %i | format.cpp:77:17:77:22 | ref arg buffer | TAINT |
|
||||
| format.cpp:77:36:77:36 | 0 | format.cpp:77:17:77:22 | ref arg buffer | TAINT |
|
||||
| format.cpp:81:21:81:24 | {...} | format.cpp:82:17:82:22 | buffer | |
|
||||
| format.cpp:81:21:81:24 | {...} | format.cpp:83:8:83:13 | buffer | |
|
||||
| format.cpp:81:23:81:23 | 0 | format.cpp:81:21:81:24 | {...} | TAINT |
|
||||
| format.cpp:82:17:82:22 | ref arg buffer | format.cpp:83:8:83:13 | buffer | |
|
||||
| format.cpp:82:30:82:33 | %i | format.cpp:82:17:82:22 | ref arg buffer | TAINT |
|
||||
| format.cpp:82:36:82:41 | call to source | format.cpp:82:17:82:22 | ref arg buffer | TAINT |
|
||||
| format.cpp:86:21:86:24 | {...} | format.cpp:87:17:87:22 | buffer | |
|
||||
| format.cpp:86:21:86:24 | {...} | format.cpp:88:8:88:13 | buffer | |
|
||||
| format.cpp:86:23:86:23 | 0 | format.cpp:86:21:86:24 | {...} | TAINT |
|
||||
| format.cpp:87:17:87:22 | ref arg buffer | format.cpp:88:8:88:13 | buffer | |
|
||||
| format.cpp:87:30:87:35 | %.*s | format.cpp:87:17:87:22 | ref arg buffer | TAINT |
|
||||
| format.cpp:87:38:87:43 | call to source | format.cpp:87:17:87:22 | ref arg buffer | TAINT |
|
||||
| format.cpp:87:48:87:55 | Hello. | format.cpp:87:17:87:22 | ref arg buffer | TAINT |
|
||||
| format.cpp:92:21:92:24 | {...} | format.cpp:93:17:93:22 | buffer | |
|
||||
| format.cpp:92:21:92:24 | {...} | format.cpp:94:8:94:13 | buffer | |
|
||||
| format.cpp:92:23:92:23 | 0 | format.cpp:92:21:92:24 | {...} | TAINT |
|
||||
| format.cpp:93:17:93:22 | ref arg buffer | format.cpp:94:8:94:13 | buffer | |
|
||||
| format.cpp:93:30:93:33 | %p | format.cpp:93:17:93:22 | ref arg buffer | TAINT |
|
||||
| format.cpp:93:36:93:49 | call to source | format.cpp:93:17:93:22 | ref arg buffer | TAINT |
|
||||
| format.cpp:98:21:98:24 | {...} | format.cpp:99:16:99:21 | buffer | |
|
||||
| format.cpp:98:21:98:24 | {...} | format.cpp:100:8:100:13 | buffer | |
|
||||
| format.cpp:98:23:98:23 | 0 | format.cpp:98:21:98:24 | {...} | TAINT |
|
||||
| format.cpp:99:16:99:21 | ref arg buffer | format.cpp:100:8:100:13 | buffer | |
|
||||
| format.cpp:99:24:99:27 | %s | format.cpp:99:16:99:21 | ref arg buffer | TAINT |
|
||||
| format.cpp:99:30:99:43 | call to source | format.cpp:99:16:99:21 | ref arg buffer | TAINT |
|
||||
| format.cpp:103:21:103:24 | {...} | format.cpp:104:16:104:21 | buffer | |
|
||||
| format.cpp:103:21:103:24 | {...} | format.cpp:105:8:105:13 | buffer | |
|
||||
| format.cpp:103:23:103:23 | 0 | format.cpp:103:21:103:24 | {...} | TAINT |
|
||||
| format.cpp:104:16:104:21 | ref arg buffer | format.cpp:105:8:105:13 | buffer | |
|
||||
| format.cpp:104:24:104:28 | %ls | format.cpp:104:16:104:21 | ref arg buffer | TAINT |
|
||||
| format.cpp:104:31:104:45 | call to source | format.cpp:104:16:104:21 | ref arg buffer | TAINT |
|
||||
| format.cpp:108:25:108:28 | {...} | format.cpp:109:17:109:23 | wbuffer | |
|
||||
| format.cpp:108:25:108:28 | {...} | format.cpp:110:8:110:14 | wbuffer | |
|
||||
| format.cpp:108:27:108:27 | 0 | format.cpp:108:25:108:28 | {...} | TAINT |
|
||||
| format.cpp:109:17:109:23 | ref arg wbuffer | format.cpp:110:8:110:14 | wbuffer | |
|
||||
| format.cpp:109:31:109:35 | %s | format.cpp:109:17:109:23 | ref arg wbuffer | TAINT |
|
||||
| format.cpp:109:38:109:52 | call to source | format.cpp:109:17:109:23 | ref arg wbuffer | TAINT |
|
||||
| format.cpp:113:21:113:24 | {...} | format.cpp:114:18:114:23 | buffer | |
|
||||
| format.cpp:113:21:113:24 | {...} | format.cpp:115:8:115:13 | buffer | |
|
||||
| format.cpp:113:23:113:23 | 0 | format.cpp:113:21:113:24 | {...} | TAINT |
|
||||
| format.cpp:114:18:114:23 | ref arg buffer | format.cpp:115:8:115:13 | buffer | |
|
||||
| format.cpp:119:10:119:11 | 0 | format.cpp:120:29:120:29 | i | |
|
||||
| format.cpp:119:10:119:11 | 0 | format.cpp:121:8:121:8 | i | |
|
||||
| format.cpp:120:28:120:29 | ref arg & ... | format.cpp:120:29:120:29 | i [inner post update] | |
|
||||
| format.cpp:120:28:120:29 | ref arg & ... | format.cpp:121:8:121:8 | i | |
|
||||
| format.cpp:120:29:120:29 | i | format.cpp:120:28:120:29 | & ... | |
|
||||
| format.cpp:124:10:124:11 | 0 | format.cpp:125:40:125:40 | i | |
|
||||
| format.cpp:124:10:124:11 | 0 | format.cpp:126:8:126:8 | i | |
|
||||
| format.cpp:125:39:125:40 | ref arg & ... | format.cpp:125:40:125:40 | i [inner post update] | |
|
||||
| format.cpp:125:39:125:40 | ref arg & ... | format.cpp:126:8:126:8 | i | |
|
||||
| format.cpp:125:40:125:40 | i | format.cpp:125:39:125:40 | & ... | |
|
||||
| format.cpp:129:21:129:24 | {...} | format.cpp:130:32:130:37 | buffer | |
|
||||
| format.cpp:129:21:129:24 | {...} | format.cpp:131:8:131:13 | buffer | |
|
||||
| format.cpp:129:23:129:23 | 0 | format.cpp:129:21:129:24 | {...} | TAINT |
|
||||
| format.cpp:130:31:130:37 | ref arg & ... | format.cpp:130:32:130:37 | buffer [inner post update] | |
|
||||
| format.cpp:130:31:130:37 | ref arg & ... | format.cpp:131:8:131:13 | buffer | |
|
||||
| format.cpp:130:32:130:37 | buffer | format.cpp:130:31:130:37 | & ... | |
|
||||
| format.cpp:134:21:134:24 | {...} | format.cpp:135:40:135:45 | buffer | |
|
||||
| format.cpp:134:21:134:24 | {...} | format.cpp:136:8:136:13 | buffer | |
|
||||
| format.cpp:134:23:134:23 | 0 | format.cpp:134:21:134:24 | {...} | TAINT |
|
||||
| format.cpp:135:39:135:45 | ref arg & ... | format.cpp:135:40:135:45 | buffer [inner post update] | |
|
||||
| format.cpp:135:39:135:45 | ref arg & ... | format.cpp:136:8:136:13 | buffer | |
|
||||
| format.cpp:135:40:135:45 | buffer | format.cpp:135:39:135:45 | & ... | |
|
||||
| stl.cpp:67:12:67:17 | call to source | stl.cpp:71:7:71:7 | a | |
|
||||
| stl.cpp:68:16:68:20 | 123 | stl.cpp:68:16:68:21 | call to basic_string | TAINT |
|
||||
| stl.cpp:68:16:68:21 | call to basic_string | stl.cpp:72:7:72:7 | b | |
|
||||
|
|
|
@ -1,13 +1,13 @@
|
|||
| format.cpp:53:8:53:13 | buffer | format.cpp:52:36:52:49 | call to source |
|
||||
| format.cpp:58:8:58:13 | buffer | format.cpp:57:30:57:43 | call to source |
|
||||
| format.cpp:63:8:63:13 | buffer | format.cpp:62:52:62:65 | call to source |
|
||||
| format.cpp:68:8:68:13 | buffer | format.cpp:67:42:67:55 | call to source |
|
||||
| format.cpp:79:8:79:13 | buffer | format.cpp:78:36:78:41 | call to source |
|
||||
| format.cpp:84:8:84:13 | buffer | format.cpp:83:38:83:43 | call to source |
|
||||
| format.cpp:90:8:90:13 | buffer | format.cpp:89:36:89:49 | call to source |
|
||||
| format.cpp:96:8:96:13 | buffer | format.cpp:95:30:95:43 | call to source |
|
||||
| format.cpp:101:8:101:13 | buffer | format.cpp:100:31:100:45 | call to source |
|
||||
| format.cpp:106:8:106:14 | wbuffer | format.cpp:105:38:105:52 | call to source |
|
||||
| format.cpp:57:8:57:13 | buffer | format.cpp:56:36:56:49 | call to source |
|
||||
| format.cpp:62:8:62:13 | buffer | format.cpp:61:30:61:43 | call to source |
|
||||
| format.cpp:67:8:67:13 | buffer | format.cpp:66:52:66:65 | call to source |
|
||||
| format.cpp:72:8:72:13 | buffer | format.cpp:71:42:71:55 | call to source |
|
||||
| format.cpp:83:8:83:13 | buffer | format.cpp:82:36:82:41 | call to source |
|
||||
| format.cpp:88:8:88:13 | buffer | format.cpp:87:38:87:43 | call to source |
|
||||
| format.cpp:94:8:94:13 | buffer | format.cpp:93:36:93:49 | call to source |
|
||||
| format.cpp:100:8:100:13 | buffer | format.cpp:99:30:99:43 | call to source |
|
||||
| format.cpp:105:8:105:13 | buffer | format.cpp:104:31:104:45 | call to source |
|
||||
| format.cpp:110:8:110:14 | wbuffer | format.cpp:109:38:109:52 | call to source |
|
||||
| stl.cpp:71:7:71:7 | a | stl.cpp:67:12:67:17 | call to source |
|
||||
| stl.cpp:73:7:73:7 | c | stl.cpp:69:16:69:21 | call to source |
|
||||
| stl.cpp:75:9:75:13 | call to c_str | stl.cpp:69:16:69:21 | call to source |
|
||||
|
|
|
@ -1,13 +1,13 @@
|
|||
| format.cpp:53:8:53:13 | format.cpp:52:36:52:49 | AST only |
|
||||
| format.cpp:58:8:58:13 | format.cpp:57:30:57:43 | AST only |
|
||||
| format.cpp:63:8:63:13 | format.cpp:62:52:62:65 | AST only |
|
||||
| format.cpp:68:8:68:13 | format.cpp:67:42:67:55 | AST only |
|
||||
| format.cpp:79:8:79:13 | format.cpp:78:36:78:41 | AST only |
|
||||
| format.cpp:84:8:84:13 | format.cpp:83:38:83:43 | AST only |
|
||||
| format.cpp:90:8:90:13 | format.cpp:89:36:89:49 | AST only |
|
||||
| format.cpp:96:8:96:13 | format.cpp:95:30:95:43 | AST only |
|
||||
| format.cpp:101:8:101:13 | format.cpp:100:31:100:45 | AST only |
|
||||
| format.cpp:106:8:106:14 | format.cpp:105:38:105:52 | AST only |
|
||||
| format.cpp:57:8:57:13 | format.cpp:56:36:56:49 | AST only |
|
||||
| format.cpp:62:8:62:13 | format.cpp:61:30:61:43 | AST only |
|
||||
| format.cpp:67:8:67:13 | format.cpp:66:52:66:65 | AST only |
|
||||
| format.cpp:72:8:72:13 | format.cpp:71:42:71:55 | AST only |
|
||||
| format.cpp:83:8:83:13 | format.cpp:82:36:82:41 | AST only |
|
||||
| format.cpp:88:8:88:13 | format.cpp:87:38:87:43 | AST only |
|
||||
| format.cpp:94:8:94:13 | format.cpp:93:36:93:49 | AST only |
|
||||
| format.cpp:100:8:100:13 | format.cpp:99:30:99:43 | AST only |
|
||||
| format.cpp:105:8:105:13 | format.cpp:104:31:104:45 | AST only |
|
||||
| format.cpp:110:8:110:14 | format.cpp:109:38:109:52 | AST only |
|
||||
| stl.cpp:73:7:73:7 | stl.cpp:69:16:69:21 | AST only |
|
||||
| stl.cpp:75:9:75:13 | stl.cpp:69:16:69:21 | AST only |
|
||||
| stl.cpp:125:13:125:17 | stl.cpp:117:10:117:15 | AST only |
|
||||
|
|
|
@ -2,7 +2,7 @@ import cpp
|
|||
|
||||
class FunctionMonkeyPatch extends Function {
|
||||
language[monotonicAggregates]
|
||||
override string toString() {
|
||||
override string getDescription() {
|
||||
exists(string name, string templateArgs, string args |
|
||||
result = name + templateArgs + args and
|
||||
name = this.getQualifiedName() and
|
||||
|
@ -30,7 +30,9 @@ class FunctionMonkeyPatch extends Function {
|
|||
}
|
||||
|
||||
class ParameterMonkeyPatch extends Parameter {
|
||||
override string toString() { result = super.getType().getName() + " " + super.toString() }
|
||||
override string getDescription() {
|
||||
result = super.getType().getName() + " " + super.getDescription()
|
||||
}
|
||||
}
|
||||
|
||||
from Element e, Element ti
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
| templates.cpp:9:5:9:14 | using c |
|
||||
| usings.cpp:8:1:8:11 | using nf |
|
||||
| usings.cpp:9:1:9:17 | using namespace N |
|
||||
| usings.cpp:18:3:18:13 | using bf |
|
||||
| usings.cpp:21:5:21:14 | using gf |
|
||||
| usings.cpp:34:3:34:20 | using tbf |
|
||||
| usings.cpp:42:5:42:22 | using foo |
|
||||
| templates.cpp:9:5:9:14 | using c | UsingDeclarationEntry, enclosingElement:std |
|
||||
| usings.cpp:8:1:8:11 | using nf | UsingDeclarationEntry, enclosingElement:(global namespace) |
|
||||
| usings.cpp:9:1:9:17 | using namespace N | UsingDirectiveEntry, enclosingElement:(global namespace) |
|
||||
| usings.cpp:18:3:18:13 | using bf | UsingDeclarationEntry, enclosingElement:D |
|
||||
| usings.cpp:21:5:21:14 | using gf | UsingDeclarationEntry, enclosingElement:{ ... } |
|
||||
| usings.cpp:34:3:34:20 | using tbf | UsingDeclarationEntry, enclosingElement:TD |
|
||||
| usings.cpp:42:5:42:22 | using foo | UsingDeclarationEntry, enclosingElement:nsbar |
|
||||
|
|
|
@ -1,4 +1,14 @@
|
|||
import cpp
|
||||
|
||||
string describe(UsingEntry ue) {
|
||||
ue instanceof UsingDeclarationEntry and
|
||||
result = "UsingDeclarationEntry"
|
||||
or
|
||||
ue instanceof UsingDirectiveEntry and
|
||||
result = "UsingDirectiveEntry"
|
||||
or
|
||||
result = "enclosingElement:" + ue.getEnclosingElement().toString()
|
||||
}
|
||||
|
||||
from UsingEntry ue
|
||||
select ue
|
||||
select ue, concat(describe(ue), ", ")
|
||||
|
|
|
@ -1,7 +0,0 @@
|
|||
| templates.cpp:9:5:9:14 | using c | file://:0:0:0:0 | std |
|
||||
| usings.cpp:8:1:8:11 | using nf | file://:0:0:0:0 | (global namespace) |
|
||||
| usings.cpp:9:1:9:17 | using namespace N | file://:0:0:0:0 | (global namespace) |
|
||||
| usings.cpp:18:3:18:13 | using bf | usings.cpp:16:8:16:8 | D |
|
||||
| usings.cpp:21:5:21:14 | using gf | usings.cpp:20:13:23:3 | { ... } |
|
||||
| usings.cpp:34:3:34:20 | using tbf | usings.cpp:32:8:32:9 | TD |
|
||||
| usings.cpp:42:5:42:22 | using foo | usings.cpp:41:11:41:15 | nsbar |
|
|
@ -1,5 +0,0 @@
|
|||
import cpp
|
||||
|
||||
from UsingEntry ue, Element e
|
||||
where e = ue.getEnclosingElement()
|
||||
select ue, e
|
|
@ -1160,26 +1160,6 @@ class UsingStmt extends Stmt, @using_stmt {
|
|||
* ```
|
||||
*/
|
||||
Expr getAnExpr() { none() }
|
||||
|
||||
/**
|
||||
* DEPRECATED: Use UsingBlockStmt.getExpr() instead.
|
||||
* Gets the expression directly used by this `using` statement, if any. For
|
||||
* example, `f` on line 2 in
|
||||
*
|
||||
* ```
|
||||
* var f = File.Open("settings.xml");
|
||||
* using (f) {
|
||||
* ...
|
||||
* }
|
||||
* ```
|
||||
*/
|
||||
deprecated Expr getExpr() { none() }
|
||||
|
||||
/**
|
||||
* DEPRECATED: Use UsingBlockStmt.getBody() instead.
|
||||
* Gets the body of this `using` statement.
|
||||
*/
|
||||
deprecated Stmt getBody() { none() }
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -1212,7 +1192,7 @@ class UsingBlockStmt extends UsingStmt, @using_block_stmt {
|
|||
* }
|
||||
* ```
|
||||
*/
|
||||
override Expr getExpr() { result = this.getChild(0) }
|
||||
Expr getExpr() { result = this.getChild(0) }
|
||||
|
||||
override Expr getAnExpr() {
|
||||
result = this.getAVariableDeclExpr().getInitializer()
|
||||
|
@ -1221,7 +1201,7 @@ class UsingBlockStmt extends UsingStmt, @using_block_stmt {
|
|||
}
|
||||
|
||||
/** Gets the body of this `using` statement. */
|
||||
override Stmt getBody() { result.getParent() = this }
|
||||
Stmt getBody() { result.getParent() = this }
|
||||
|
||||
override string toString() { result = "using (...) {...}" }
|
||||
}
|
||||
|
|
|
@ -116,7 +116,7 @@ class XMLFile extends XMLParent, File {
|
|||
XMLFile() { xmlEncoding(this, _) }
|
||||
|
||||
/** Gets a printable representation of this XML file. */
|
||||
override string toString() { result = XMLParent.super.toString() }
|
||||
override string toString() { result = getName() }
|
||||
|
||||
/** Gets the name of this XML file. */
|
||||
override string getName() { result = File.super.getAbsolutePath() }
|
||||
|
@ -236,7 +236,7 @@ class XMLElement extends @xmlelement, XMLParent, XMLLocatable {
|
|||
string getAttributeValue(string name) { result = this.getAttribute(name).getValue() }
|
||||
|
||||
/** Gets a printable representation of this XML element. */
|
||||
override string toString() { result = XMLParent.super.toString() }
|
||||
override string toString() { result = getName() }
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -0,0 +1,17 @@
|
|||
public boolean shouldOverrideUrlLoading(WebView view, String url) {
|
||||
{
|
||||
Uri uri = Uri.parse(url);
|
||||
// BAD: partial domain match, which allows an attacker to register a domain like myexample.com to circumvent the verification
|
||||
if (uri.getHost() != null && uri.getHost().endsWith("example.com")) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
{
|
||||
Uri uri = Uri.parse(url);
|
||||
// GOOD: full domain match
|
||||
if (uri.getHost() != null && uri.getHost().endsWith(".example.com")) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,28 @@
|
|||
<!DOCTYPE qhelp PUBLIC
|
||||
"-//Semmle//qhelp//EN"
|
||||
"qhelp.dtd">
|
||||
<qhelp>
|
||||
|
||||
<overview>
|
||||
<p>Apps that rely on URL Parsing to verify that a given URL is pointing to a trust server may be susceptible to many different ways to get URL parsing and verification wrong, which allows an attacker to register a fake site to break the access control.</p>
|
||||
</overview>
|
||||
|
||||
<recommendation>
|
||||
<p>Verify the whole host and domain (FQDN) or check endsWith dot+domain.</p>
|
||||
</recommendation>
|
||||
|
||||
<example>
|
||||
<p>The following example shows two ways of verifying host domain. In the 'BAD' case,
|
||||
verification is implemented as partial domain match. In the 'GOOD' case, full domain is verified.</p>
|
||||
<sample src="IncorrectURLVerification.java" />
|
||||
</example>
|
||||
|
||||
<references>
|
||||
<li>
|
||||
<a href="https://drive.google.com/file/d/0BwMN49Gzo3x6T1N5WGQ4TTNlMHBOb1ZRQTVEWnVBZjFUaE5N/view">Common Android app vulnerabilities from Sebastian Porst of Google</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="https://www.bugcrowd.com/resources/webinars/overview-of-common-android-app-vulnerabilities/">Common Android app vulnerabilities from bugcrowd</a>
|
||||
</li>
|
||||
</references>
|
||||
</qhelp>
|
|
@ -0,0 +1,97 @@
|
|||
/**
|
||||
* @id java/incorrect-url-verification
|
||||
* @name Incorrect URL verification
|
||||
* @description Apps that rely on URL parsing to verify that a given URL is pointing to a trusted server are susceptible to wrong ways of URL parsing and verification.
|
||||
* @kind problem
|
||||
* @tags security
|
||||
* external/cwe-939
|
||||
*/
|
||||
|
||||
import java
|
||||
|
||||
/**
|
||||
* The Java class `android.R.string` specific to Android applications, which contains references to application specific resources defined in /res/values/strings.xml.
|
||||
* For example, <resources>...<string name="host">example.com</string>...</resources> in the application com.example.android.web can be referred as R.string.host with the type com.example.android.web.R$string
|
||||
*/
|
||||
class AndroidRString extends RefType {
|
||||
AndroidRString() { this.hasQualifiedName(_, "R$string") }
|
||||
}
|
||||
|
||||
/**
|
||||
* The Java class `android.net.Uri` and `java.net.URL`.
|
||||
*/
|
||||
class Uri extends RefType {
|
||||
Uri() {
|
||||
hasQualifiedName("android.net", "Uri") or
|
||||
hasQualifiedName("java.net", "URL")
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* The method `getHost()` declared in `android.net.Uri` and `java.net.URL`.
|
||||
*/
|
||||
class UriGetHostMethod extends Method {
|
||||
UriGetHostMethod() {
|
||||
getDeclaringType() instanceof Uri and
|
||||
hasName("getHost") and
|
||||
getNumberOfParameters() = 0
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* The method access with incorrect string comparision
|
||||
*/
|
||||
class HostVerificationMethodAccess extends MethodAccess {
|
||||
HostVerificationMethodAccess() {
|
||||
(
|
||||
this.getMethod().hasName("endsWith") or
|
||||
this.getMethod().hasName("contains") or
|
||||
this.getMethod().hasName("indexOf")
|
||||
) and
|
||||
this.getMethod().getNumberOfParameters() = 1 and
|
||||
(
|
||||
this.getArgument(0).(StringLiteral).getRepresentedString().charAt(0) != "." //string constant comparison e.g. uri.getHost().endsWith("example.com")
|
||||
or
|
||||
this
|
||||
.getArgument(0)
|
||||
.(AddExpr)
|
||||
.getLeftOperand()
|
||||
.(VarAccess)
|
||||
.getVariable()
|
||||
.getAnAssignedValue()
|
||||
.(StringLiteral)
|
||||
.getRepresentedString()
|
||||
.charAt(0) != "." //var1+var2, check var1 starts with "." e.g. String domainName = "example"; Uri.parse(url).getHost().endsWith(domainName+".com")
|
||||
or
|
||||
this
|
||||
.getArgument(0)
|
||||
.(AddExpr)
|
||||
.getLeftOperand()
|
||||
.(StringLiteral)
|
||||
.getRepresentedString()
|
||||
.charAt(0) != "." //"."+var2, check string constant "." e.g. String domainName = "example.com"; Uri.parse(url).getHost().endsWith("www."+domainName)
|
||||
or
|
||||
exists(MethodAccess ma, Method m, Field f |
|
||||
this.getArgument(0) = ma and
|
||||
ma.getMethod() = m and
|
||||
m.hasName("getString") and
|
||||
m.getDeclaringType().getQualifiedName() = "android.content.res.Resources" and
|
||||
ma.getArgument(0).(FieldRead).getField() = f and
|
||||
f.getDeclaringType() instanceof AndroidRString
|
||||
) //Check resource properties in /res/values/strings.xml in Android mobile applications using res.getString(R.string.key)
|
||||
or
|
||||
this
|
||||
.getArgument(0)
|
||||
.(VarAccess)
|
||||
.getVariable()
|
||||
.getAnAssignedValue()
|
||||
.(StringLiteral)
|
||||
.getRepresentedString()
|
||||
.charAt(0) != "." //check variable starts with "." e.g. String domainName = "example.com"; Uri.parse(url).getHost().endsWith(domainName)
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
from UriGetHostMethod um, MethodAccess uma, HostVerificationMethodAccess hma
|
||||
where hma.getQualifier() = uma and uma.getMethod() = um
|
||||
select hma, "Method has potentially $@ ", hma.getArgument(0), "improper URL verification"
|
|
@ -116,7 +116,7 @@ class XMLFile extends XMLParent, File {
|
|||
XMLFile() { xmlEncoding(this, _) }
|
||||
|
||||
/** Gets a printable representation of this XML file. */
|
||||
override string toString() { result = XMLParent.super.toString() }
|
||||
override string toString() { result = getName() }
|
||||
|
||||
/** Gets the name of this XML file. */
|
||||
override string getName() { result = File.super.getAbsolutePath() }
|
||||
|
@ -236,7 +236,7 @@ class XMLElement extends @xmlelement, XMLParent, XMLLocatable {
|
|||
string getAttributeValue(string name) { result = this.getAttribute(name).getValue() }
|
||||
|
||||
/** Gets a printable representation of this XML element. */
|
||||
override string toString() { result = XMLParent.super.toString() }
|
||||
override string toString() { result = getName() }
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -220,4 +220,28 @@ public class C {
|
|||
return;
|
||||
}
|
||||
}
|
||||
|
||||
private Object foo16;
|
||||
|
||||
private Object getFoo16() {
|
||||
return this.foo16;
|
||||
}
|
||||
|
||||
public static void ex16(C c) {
|
||||
int[] xs = c.getFoo16() != null ? new int[5] : null;
|
||||
if (c.getFoo16() != null) {
|
||||
xs[0]++; // NPE - false positive
|
||||
}
|
||||
}
|
||||
|
||||
public static final int MAXLEN = 1024;
|
||||
|
||||
public void ex17() {
|
||||
int[] xs = null;
|
||||
// loop executes at least once
|
||||
for (int i = 32; i <= MAXLEN; i *= 2) {
|
||||
xs = new int[5];
|
||||
}
|
||||
xs[0]++; // OK
|
||||
}
|
||||
}
|
||||
|
|
|
@ -31,5 +31,6 @@
|
|||
| C.java:188:9:188:11 | obj | Variable $@ may be null here because of $@ assignment. | C.java:181:5:181:22 | Object obj | obj | C.java:181:12:181:21 | obj | this |
|
||||
| C.java:207:9:207:11 | obj | Variable $@ may be null here because of $@ assignment. | C.java:201:5:201:22 | Object obj | obj | C.java:201:12:201:21 | obj | this |
|
||||
| C.java:219:9:219:10 | o1 | Variable $@ may be null here as suggested by $@ null guard. | C.java:212:20:212:28 | o1 | o1 | C.java:213:9:213:18 | ... == ... | this |
|
||||
| C.java:233:7:233:8 | xs | Variable $@ may be null here because of $@ assignment. | C.java:231:5:231:56 | int[] xs | xs | C.java:231:11:231:55 | xs | this |
|
||||
| F.java:11:5:11:7 | obj | Variable $@ may be null here as suggested by $@ null guard. | F.java:8:18:8:27 | obj | obj | F.java:9:9:9:19 | ... == ... | this |
|
||||
| F.java:17:5:17:7 | obj | Variable $@ may be null here as suggested by $@ null guard. | F.java:14:18:14:27 | obj | obj | F.java:15:9:15:19 | ... == ... | this |
|
||||
|
|
|
@ -175,4 +175,23 @@ public class A {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
void m14(int[] xs) {
|
||||
for (int i = 0; i < xs.length + 1; i++) {
|
||||
if (i == 0 && xs.length > 0) {
|
||||
xs[i]++; // OK - FP
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void m15(int[] xs) {
|
||||
for (int i = 0; i < xs.length; i++) {
|
||||
int x = ++i;
|
||||
int y = ++i;
|
||||
if (y < xs.length) {
|
||||
xs[x]++; // OK - FP
|
||||
xs[y]++; // OK
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -10,3 +10,5 @@
|
|||
| A.java:111:14:111:21 | ...[...] | This array access might be out of bounds, as the index might be equal to the array length + 1. |
|
||||
| A.java:122:16:122:23 | ...[...] | This array access might be out of bounds, as the index might be equal to the array length + 3. |
|
||||
| A.java:134:16:134:23 | ...[...] | This array access might be out of bounds, as the index might be equal to the array length. |
|
||||
| A.java:182:9:182:13 | ...[...] | This array access might be out of bounds, as the index might be equal to the array length. |
|
||||
| A.java:192:9:192:13 | ...[...] | This array access might be out of bounds, as the index might be equal to the array length. |
|
||||
|
|
|
@ -86,6 +86,12 @@ public class TypeScriptParser {
|
|||
*/
|
||||
public static final String TYPESCRIPT_TIMEOUT_VAR = "SEMMLE_TYPESCRIPT_TIMEOUT";
|
||||
|
||||
/**
|
||||
* An environment variable that can be set to specify a number of retries when verifying
|
||||
* the TypeScript installation. Default is 3.
|
||||
*/
|
||||
public static final String TYPESCRIPT_RETRIES_VAR = "SEMMLE_TYPESCRIPT_RETRIES";
|
||||
|
||||
/**
|
||||
* An environment variable (without the <tt>SEMMLE_</tt> or <tt>LGTM_</tt> prefix), that can be
|
||||
* set to indicate the maximum heap space usable by the Node.js process, in addition to its
|
||||
|
@ -179,9 +185,6 @@ public class TypeScriptParser {
|
|||
public String verifyNodeInstallation() {
|
||||
if (nodeJsVersionString != null) return nodeJsVersionString;
|
||||
|
||||
ByteArrayOutputStream out = new ByteArrayOutputStream();
|
||||
ByteArrayOutputStream err = new ByteArrayOutputStream();
|
||||
|
||||
// Determine where to find the Node.js runtime.
|
||||
String explicitNodeJsRuntime = Env.systemEnv().get(TYPESCRIPT_NODE_RUNTIME_VAR);
|
||||
if (explicitNodeJsRuntime != null) {
|
||||
|
@ -198,12 +201,41 @@ public class TypeScriptParser {
|
|||
nodeJsRuntimeExtraArgs = Arrays.asList(extraArgs.split("\\s+"));
|
||||
}
|
||||
|
||||
// Run 'node --version' with a timeout, and retry a few times if it times out.
|
||||
// If the Java process is suspended we may get a spurious timeout, and we want to
|
||||
// support long suspensions in cloud environments. Instead of setting a huge timeout,
|
||||
// retrying guarantees we can survive arbitrary suspensions as long as they don't happen
|
||||
// too many times in rapid succession.
|
||||
int timeout = Env.systemEnv().getInt(TYPESCRIPT_TIMEOUT_VAR, 10000);
|
||||
int numRetries = Env.systemEnv().getInt(TYPESCRIPT_RETRIES_VAR, 3);
|
||||
for (int i = 0; i < numRetries - 1; ++i) {
|
||||
try {
|
||||
return startNodeAndGetVersion(timeout);
|
||||
} catch (InterruptedError e) {
|
||||
Exceptions.ignore(e, "We will retry the call that caused this exception.");
|
||||
System.err.println("Starting Node.js seems to take a long time. Retrying.");
|
||||
}
|
||||
}
|
||||
try {
|
||||
return startNodeAndGetVersion(timeout);
|
||||
} catch (InterruptedError e) {
|
||||
Exceptions.ignore(e, "Exception details are not important.");
|
||||
throw new CatastrophicError(
|
||||
"Could not start Node.js (timed out after " + (timeout / 1000) + "s and " + numRetries + " attempts");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks that Node.js is installed and can be run and returns its version string.
|
||||
*/
|
||||
private String startNodeAndGetVersion(int timeout) throws InterruptedError {
|
||||
ByteArrayOutputStream out = new ByteArrayOutputStream();
|
||||
ByteArrayOutputStream err = new ByteArrayOutputStream();
|
||||
Builder b =
|
||||
new Builder(
|
||||
getNodeJsRuntimeInvocation("--version"), out, err, getParserWrapper().getParentFile());
|
||||
b.expectFailure(); // We want to do our own logging in case of an error.
|
||||
|
||||
int timeout = Env.systemEnv().getInt(TYPESCRIPT_TIMEOUT_VAR, 10000);
|
||||
try {
|
||||
int r = b.execute(timeout);
|
||||
String stdout = new String(out.toByteArray());
|
||||
|
@ -213,10 +245,6 @@ public class TypeScriptParser {
|
|||
"Could not start Node.js. It is required for TypeScript extraction.\n" + stderr);
|
||||
}
|
||||
return nodeJsVersionString = stdout;
|
||||
} catch (InterruptedError e) {
|
||||
Exceptions.ignore(e, "Exception details are not important.");
|
||||
throw new CatastrophicError(
|
||||
"Could not start Node.js (timed out after " + (timeout / 1000) + "s).");
|
||||
} catch (ResourceError e) {
|
||||
// In case 'node' is not found, the process builder converts the IOException
|
||||
// into a ResourceError.
|
||||
|
|
|
@ -152,6 +152,18 @@ private class RequireVariable extends Variable {
|
|||
*/
|
||||
private predicate moduleInFile(Module m, File f) { m.getFile() = f }
|
||||
|
||||
/**
|
||||
* Holds if `nd` may refer to `require`, either directly or modulo local data flow.
|
||||
*/
|
||||
cached
|
||||
private predicate isRequire(DataFlow::Node nd) {
|
||||
nd.asExpr() = any(RequireVariable req).getAnAccess() and
|
||||
// `mjs` files explicitly disallow `require`
|
||||
not nd.getFile().getExtension() = "mjs"
|
||||
or
|
||||
isRequire(nd.getAPredecessor())
|
||||
}
|
||||
|
||||
/**
|
||||
* A `require` import.
|
||||
*
|
||||
|
@ -162,12 +174,7 @@ private predicate moduleInFile(Module m, File f) { m.getFile() = f }
|
|||
* ```
|
||||
*/
|
||||
class Require extends CallExpr, Import {
|
||||
cached
|
||||
Require() {
|
||||
any(RequireVariable req).getAnAccess() = getCallee() and
|
||||
// `mjs` files explicitly disallow `require`
|
||||
not getFile().getExtension() = "mjs"
|
||||
}
|
||||
Require() { isRequire(getCallee().flow()) }
|
||||
|
||||
override PathExpr getImportedPath() { result = getArgument(0) }
|
||||
|
||||
|
@ -257,8 +264,8 @@ private class RequirePath extends PathExprCandidate {
|
|||
RequirePath() {
|
||||
this = any(Require req).getArgument(0)
|
||||
or
|
||||
exists(RequireVariable req, MethodCallExpr reqres |
|
||||
reqres.getReceiver() = req.getAnAccess() and
|
||||
exists(MethodCallExpr reqres |
|
||||
isRequire(reqres.getReceiver().flow()) and
|
||||
reqres.getMethodName() = "resolve" and
|
||||
this = reqres.getArgument(0)
|
||||
)
|
||||
|
|
|
@ -116,7 +116,7 @@ class XMLFile extends XMLParent, File {
|
|||
XMLFile() { xmlEncoding(this, _) }
|
||||
|
||||
/** Gets a printable representation of this XML file. */
|
||||
override string toString() { result = XMLParent.super.toString() }
|
||||
override string toString() { result = getName() }
|
||||
|
||||
/** Gets the name of this XML file. */
|
||||
override string getName() { result = File.super.getAbsolutePath() }
|
||||
|
@ -236,7 +236,7 @@ class XMLElement extends @xmlelement, XMLParent, XMLLocatable {
|
|||
string getAttributeValue(string name) { result = this.getAttribute(name).getValue() }
|
||||
|
||||
/** Gets a printable representation of this XML element. */
|
||||
override string toString() { result = XMLParent.super.toString() }
|
||||
override string toString() { result = getName() }
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -151,11 +151,14 @@ private module CachedSteps {
|
|||
) {
|
||||
calls(invk, f) and
|
||||
(
|
||||
exists(int i, Parameter p |
|
||||
f.getParameter(i) = p and
|
||||
not p.isRestParameter() and
|
||||
arg = invk.getArgument(i) and
|
||||
parm = DataFlow::parameterNode(p)
|
||||
exists(int i | arg = invk.getArgument(i) |
|
||||
exists(Parameter p |
|
||||
f.getParameter(i) = p and
|
||||
not p.isRestParameter() and
|
||||
parm = DataFlow::parameterNode(p)
|
||||
)
|
||||
or
|
||||
parm = reflectiveParameterAccess(f, i)
|
||||
)
|
||||
or
|
||||
arg = invk.(DataFlow::CallNode).getReceiver() and
|
||||
|
@ -185,6 +188,22 @@ private module CachedSteps {
|
|||
)
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets a data-flow node inside `f` that refers to the `arguments` object of `f`.
|
||||
*/
|
||||
private DataFlow::Node argumentsAccess(Function f) {
|
||||
result.getContainer().getEnclosingContainer*() = f and
|
||||
result.analyze().getAValue().(AbstractArguments).getFunction() = f
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets a data-flow node that refers to the `i`th parameter of `f` through its `arguments`
|
||||
* object.
|
||||
*/
|
||||
private DataFlow::SourceNode reflectiveParameterAccess(Function f, int i) {
|
||||
result.(DataFlow::PropRead).accesses(argumentsAccess(f), any(string p | i = p.toInt()))
|
||||
}
|
||||
|
||||
/**
|
||||
* Holds if there is a flow step from `pred` to `succ` through parameter passing
|
||||
* to a function call.
|
||||
|
|
|
@ -0,0 +1,291 @@
|
|||
/**
|
||||
* Provides classes for working with [Fastify](https://www.fastify.io/) applications.
|
||||
*/
|
||||
|
||||
import javascript
|
||||
import semmle.javascript.frameworks.HTTP
|
||||
|
||||
/**
|
||||
* Provides classes for working with [Fastify](https://www.fastify.io/) applications.
|
||||
*/
|
||||
module Fastify {
|
||||
/**
|
||||
* An expression that creates a new Fastify server.
|
||||
*/
|
||||
abstract class ServerDefinition extends HTTP::Servers::StandardServerDefinition { }
|
||||
|
||||
/**
|
||||
* A standard way to create a Fastify server.
|
||||
*/
|
||||
class StandardServerDefinition extends ServerDefinition {
|
||||
StandardServerDefinition() {
|
||||
this = DataFlow::moduleImport("fastify").getAnInvocation().asExpr()
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* A function used as a Fastify route handler.
|
||||
*
|
||||
* By default, only handlers installed by a Fastify route setup are recognized,
|
||||
* but support for other kinds of route handlers can be added by implementing
|
||||
* additional subclasses of this class.
|
||||
*/
|
||||
abstract class RouteHandler extends HTTP::Servers::StandardRouteHandler, DataFlow::ValueNode {
|
||||
/**
|
||||
* Gets the parameter of the route handler that contains the request object.
|
||||
*/
|
||||
abstract DataFlow::ParameterNode getRequestParameter();
|
||||
|
||||
/**
|
||||
* Gets the parameter of the route handler that contains the reply object.
|
||||
*/
|
||||
abstract DataFlow::ParameterNode getReplyParameter();
|
||||
}
|
||||
|
||||
/**
|
||||
* A Fastify route handler installed by a route setup.
|
||||
*/
|
||||
class StandardRouteHandler extends RouteHandler, DataFlow::FunctionNode {
|
||||
StandardRouteHandler() { this = any(RouteSetup setup).getARouteHandler() }
|
||||
|
||||
override DataFlow::ParameterNode getRequestParameter() { result = this.getParameter(0) }
|
||||
|
||||
override DataFlow::ParameterNode getReplyParameter() { result = this.getParameter(1) }
|
||||
}
|
||||
|
||||
/**
|
||||
* A Fastify reply source, that is, the `reply` parameter of a
|
||||
* route handler.
|
||||
*/
|
||||
private class ReplySource extends HTTP::Servers::ResponseSource {
|
||||
RouteHandler rh;
|
||||
|
||||
ReplySource() { this = rh.getReplyParameter() }
|
||||
|
||||
/**
|
||||
* Gets the route handler that provides this response.
|
||||
*/
|
||||
override RouteHandler getRouteHandler() { result = rh }
|
||||
}
|
||||
|
||||
/**
|
||||
* A Fastify request source, that is, the request parameter of a
|
||||
* route handler.
|
||||
*/
|
||||
private class RequestSource extends HTTP::Servers::RequestSource {
|
||||
RouteHandler rh;
|
||||
|
||||
RequestSource() { this = rh.getRequestParameter() }
|
||||
|
||||
/**
|
||||
* Gets the route handler that handles this request.
|
||||
*/
|
||||
override RouteHandler getRouteHandler() { result = rh }
|
||||
}
|
||||
|
||||
/**
|
||||
* A call to a Fastify method that sets up a route.
|
||||
*/
|
||||
class RouteSetup extends MethodCallExpr, HTTP::Servers::StandardRouteSetup {
|
||||
ServerDefinition server;
|
||||
string methodName;
|
||||
|
||||
RouteSetup() {
|
||||
this.getMethodName() = methodName and
|
||||
methodName = ["route", "get", "head", "post", "put", "delete", "options", "patch"] and
|
||||
server.flowsTo(this.getReceiver())
|
||||
}
|
||||
|
||||
override DataFlow::SourceNode getARouteHandler() {
|
||||
result = getARouteHandler(DataFlow::TypeBackTracker::end())
|
||||
}
|
||||
|
||||
private DataFlow::SourceNode getARouteHandler(DataFlow::TypeBackTracker t) {
|
||||
t.start() and
|
||||
result = this.getARouteHandlerExpr().getALocalSource()
|
||||
or
|
||||
exists(DataFlow::TypeBackTracker t2 | result = this.getARouteHandler(t2).backtrack(t2, t))
|
||||
}
|
||||
|
||||
override Expr getServer() { result = server }
|
||||
|
||||
/** Gets an argument that represents a route handler being registered. */
|
||||
private DataFlow::Node getARouteHandlerExpr() {
|
||||
if methodName = "route"
|
||||
then
|
||||
result =
|
||||
this
|
||||
.flow()
|
||||
.(DataFlow::MethodCallNode)
|
||||
.getOptionArgument(0,
|
||||
["onRequest", "preParsing", "preValidation", "preHandler", "preSerialization",
|
||||
"onSend", "onResponse", "handler"])
|
||||
else result = getLastArgument().flow()
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* An access to a user-controlled Fastify request input.
|
||||
*/
|
||||
private class RequestInputAccess extends HTTP::RequestInputAccess {
|
||||
RouteHandler rh;
|
||||
string kind;
|
||||
|
||||
RequestInputAccess() {
|
||||
exists(string name | this = rh.getARequestSource().ref().getAPropertyRead(name) |
|
||||
kind = "parameter" and
|
||||
name = ["params", "query"]
|
||||
or
|
||||
kind = "body" and
|
||||
name = "body"
|
||||
)
|
||||
}
|
||||
|
||||
override RouteHandler getRouteHandler() { result = rh }
|
||||
|
||||
override string getKind() { result = kind }
|
||||
|
||||
override predicate isUserControlledObject() {
|
||||
kind = "body" and
|
||||
(
|
||||
usesFastifyPlugin(rh,
|
||||
DataFlow::moduleImport(["fastify-xml-body-parser", "fastify-formbody"]))
|
||||
or
|
||||
usesMiddleware(rh,
|
||||
any(ExpressLibraries::BodyParser bodyParser | bodyParser.producesUserControlledObjects()))
|
||||
)
|
||||
or
|
||||
kind = "parameter" and
|
||||
usesFastifyPlugin(rh, DataFlow::moduleImport("fastify-qs"))
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Holds if `rh` uses `plugin`.
|
||||
*/
|
||||
private predicate usesFastifyPlugin(RouteHandler rh, DataFlow::SourceNode plugin) {
|
||||
exists(RouteSetup setup |
|
||||
plugin
|
||||
.flowsTo(setup
|
||||
.getServer()
|
||||
.flow()
|
||||
.(DataFlow::SourceNode)
|
||||
.getAMethodCall("register")
|
||||
.getArgument(0)) and // only matches the plugins that apply to all routes
|
||||
rh = setup.getARouteHandler()
|
||||
)
|
||||
}
|
||||
|
||||
/**
|
||||
* Holds if `rh` uses `plugin`.
|
||||
*/
|
||||
private predicate usesMiddleware(RouteHandler rh, DataFlow::SourceNode middleware) {
|
||||
exists(RouteSetup setup |
|
||||
middleware
|
||||
.flowsTo(setup
|
||||
.getServer()
|
||||
.flow()
|
||||
.(DataFlow::SourceNode)
|
||||
.getAMethodCall("use")
|
||||
.getArgument(0)) and // only matches the middlewares that apply to all routes
|
||||
rh = setup.getARouteHandler()
|
||||
)
|
||||
}
|
||||
|
||||
/**
|
||||
* An access to a header on a Fastify request.
|
||||
*/
|
||||
private class RequestHeaderAccess extends HTTP::RequestHeaderAccess {
|
||||
RouteHandler rh;
|
||||
|
||||
RequestHeaderAccess() {
|
||||
this = rh.getARequestSource().ref().getAPropertyRead("headers").getAPropertyRead()
|
||||
}
|
||||
|
||||
override string getAHeaderName() {
|
||||
result = this.(DataFlow::PropRead).getPropertyName().toLowerCase()
|
||||
}
|
||||
|
||||
override RouteHandler getRouteHandler() { result = rh }
|
||||
|
||||
override string getKind() { result = "header" }
|
||||
}
|
||||
|
||||
/**
|
||||
* An argument passed to the `send` or `end` method of an HTTP response object.
|
||||
*/
|
||||
private class ResponseSendArgument extends HTTP::ResponseSendArgument {
|
||||
RouteHandler rh;
|
||||
|
||||
ResponseSendArgument() {
|
||||
this = rh.getAResponseSource().ref().getAMethodCall("send").getArgument(0).asExpr()
|
||||
or
|
||||
this = rh.(DataFlow::FunctionNode).getAReturn().asExpr()
|
||||
}
|
||||
|
||||
override RouteHandler getRouteHandler() { result = rh }
|
||||
}
|
||||
|
||||
/**
|
||||
* An invocation of the `redirect` method of an HTTP response object.
|
||||
*/
|
||||
private class RedirectInvocation extends HTTP::RedirectInvocation, MethodCallExpr {
|
||||
RouteHandler rh;
|
||||
|
||||
RedirectInvocation() {
|
||||
this = rh.getAResponseSource().ref().getAMethodCall("redirect").asExpr()
|
||||
}
|
||||
|
||||
override Expr getUrlArgument() { result = this.getLastArgument() }
|
||||
|
||||
override RouteHandler getRouteHandler() { result = rh }
|
||||
}
|
||||
|
||||
/**
|
||||
* An invocation that sets a single header of the HTTP response.
|
||||
*/
|
||||
private class SetOneHeader extends HTTP::Servers::StandardHeaderDefinition,
|
||||
DataFlow::MethodCallNode {
|
||||
RouteHandler rh;
|
||||
|
||||
SetOneHeader() {
|
||||
this = rh.getAResponseSource().ref().getAMethodCall("header") and
|
||||
this.getNumArgument() = 2
|
||||
}
|
||||
|
||||
override RouteHandler getRouteHandler() { result = rh }
|
||||
}
|
||||
|
||||
/**
|
||||
* An invocation that sets any number of headers of the HTTP response.
|
||||
*/
|
||||
class SetMultipleHeaders extends HTTP::ExplicitHeaderDefinition, DataFlow::MethodCallNode {
|
||||
RouteHandler rh;
|
||||
|
||||
SetMultipleHeaders() {
|
||||
this = rh.getAResponseSource().ref().getAMethodCall("headers") and
|
||||
this.getNumArgument() = 1
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets a reference to the multiple headers object that is to be set.
|
||||
*/
|
||||
private DataFlow::SourceNode getAHeaderSource() { result.flowsTo(this.getArgument(0)) }
|
||||
|
||||
override predicate definesExplicitly(string headerName, Expr headerValue) {
|
||||
exists(string header |
|
||||
getAHeaderSource().hasPropertyWrite(header, headerValue.flow()) and
|
||||
headerName = header.toLowerCase()
|
||||
)
|
||||
}
|
||||
|
||||
override RouteHandler getRouteHandler() { result = rh }
|
||||
|
||||
override Expr getNameExpr() {
|
||||
exists(DataFlow::PropWrite write |
|
||||
this.getAHeaderSource().flowsTo(write.getBase()) and
|
||||
result = write.getPropertyNameExpr()
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
|
@ -4,3 +4,4 @@ import semmle.javascript.frameworks.Koa
|
|||
import semmle.javascript.frameworks.NodeJSLib
|
||||
import semmle.javascript.frameworks.Restify
|
||||
import semmle.javascript.frameworks.Connect
|
||||
import semmle.javascript.frameworks.Fastify
|
||||
|
|
|
@ -0,0 +1,10 @@
|
|||
| arguments.js:11:5:11:14 | f(1, 2, 3) | arguments.js:11:7:11:7 | 1 | arguments.js:2:5:10:5 | functio ... ;\\n } | arguments.js:2:16:2:16 | x |
|
||||
| arguments.js:11:5:11:14 | f(1, 2, 3) | arguments.js:11:7:11:7 | 1 | arguments.js:2:5:10:5 | functio ... ;\\n } | arguments.js:4:28:4:39 | arguments[0] |
|
||||
| arguments.js:11:5:11:14 | f(1, 2, 3) | arguments.js:11:10:11:10 | 2 | arguments.js:2:5:10:5 | functio ... ;\\n } | arguments.js:5:25:5:36 | arguments[1] |
|
||||
| arguments.js:11:5:11:14 | f(1, 2, 3) | arguments.js:11:13:11:13 | 3 | arguments.js:2:5:10:5 | functio ... ;\\n } | arguments.js:7:24:7:30 | args[2] |
|
||||
| sources.js:3:1:5:6 | (functi ... \\n})(23) | sources.js:5:4:5:5 | 23 | sources.js:3:2:5:1 | functio ... x+19;\\n} | sources.js:3:11:3:11 | x |
|
||||
| tst.js:16:1:20:9 | (functi ... ("arg") | tst.js:20:4:20:8 | "arg" | tst.js:16:2:20:1 | functio ... n "";\\n} | tst.js:16:13:16:13 | a |
|
||||
| tst.js:35:1:35:7 | g(true) | tst.js:35:3:35:6 | true | tst.js:32:1:34:1 | functio ... ables\\n} | tst.js:32:12:32:12 | b |
|
||||
| tst.js:44:1:44:5 | o.m() | tst.js:44:1:44:1 | o | tst.js:39:4:41:3 | () {\\n this;\\n } | tst.js:39:4:39:3 | this |
|
||||
| tst.js:87:1:96:2 | (functi ... r: 0\\n}) | tst.js:92:4:96:1 | {\\n p: ... r: 0\\n} | tst.js:87:2:92:1 | functio ... + z;\\n} | tst.js:87:11:87:24 | { p: x, ...o } |
|
||||
| tst.js:98:1:103:17 | (functi ... 3, 0 ]) | tst.js:103:4:103:16 | [ 19, 23, 0 ] | tst.js:98:2:103:1 | functio ... + z;\\n} | tst.js:98:11:98:24 | [ x, ...rest ] |
|
|
@ -0,0 +1,6 @@
|
|||
import javascript
|
||||
import semmle.javascript.dataflow.internal.FlowSteps as FlowSteps
|
||||
|
||||
from DataFlow::Node invk, DataFlow::Node arg, Function f, DataFlow::SourceNode parm
|
||||
where FlowSteps::argumentPassing(invk, arg, f, parm)
|
||||
select invk, arg, f, parm
|
|
@ -0,0 +1,12 @@
|
|||
(function() {
|
||||
function f(x) {
|
||||
let firstArg = x;
|
||||
let alsoFirstArg = arguments[0];
|
||||
let secondArg = arguments[1];
|
||||
let args = arguments;
|
||||
let thirdArg = args[2];
|
||||
arguments = {};
|
||||
let notFirstArg = arguments[0];
|
||||
}
|
||||
f(1, 2, 3);
|
||||
})();
|
|
@ -1,3 +1,42 @@
|
|||
| arguments.js:1:1:12:2 | (functi ... 3);\\n}) | arguments.js:1:1:12:2 | (functi ... 3);\\n}) |
|
||||
| arguments.js:1:1:12:4 | (functi ... );\\n})() | arguments.js:1:1:12:4 | (functi ... );\\n})() |
|
||||
| arguments.js:1:2:12:1 | functio ... , 3);\\n} | arguments.js:1:2:12:1 | functio ... , 3);\\n} |
|
||||
| arguments.js:2:14:2:14 | f | arguments.js:2:14:2:14 | f |
|
||||
| arguments.js:2:16:2:16 | x | arguments.js:2:16:2:16 | x |
|
||||
| arguments.js:3:13:3:20 | firstArg | arguments.js:3:13:3:20 | firstArg |
|
||||
| arguments.js:3:13:3:24 | firstArg = x | arguments.js:3:13:3:24 | firstArg = x |
|
||||
| arguments.js:3:24:3:24 | x | arguments.js:3:24:3:24 | x |
|
||||
| arguments.js:4:13:4:24 | alsoFirstArg | arguments.js:4:13:4:24 | alsoFirstArg |
|
||||
| arguments.js:4:13:4:39 | alsoFir ... ents[0] | arguments.js:4:13:4:39 | alsoFir ... ents[0] |
|
||||
| arguments.js:4:28:4:36 | arguments | arguments.js:4:28:4:36 | arguments |
|
||||
| arguments.js:4:28:4:39 | arguments[0] | arguments.js:4:28:4:39 | arguments[0] |
|
||||
| arguments.js:4:38:4:38 | 0 | arguments.js:4:38:4:38 | 0 |
|
||||
| arguments.js:5:13:5:21 | secondArg | arguments.js:5:13:5:21 | secondArg |
|
||||
| arguments.js:5:13:5:36 | secondA ... ents[1] | arguments.js:5:13:5:36 | secondA ... ents[1] |
|
||||
| arguments.js:5:25:5:33 | arguments | arguments.js:5:25:5:33 | arguments |
|
||||
| arguments.js:5:25:5:36 | arguments[1] | arguments.js:5:25:5:36 | arguments[1] |
|
||||
| arguments.js:5:35:5:35 | 1 | arguments.js:5:35:5:35 | 1 |
|
||||
| arguments.js:6:13:6:16 | args | arguments.js:6:13:6:16 | args |
|
||||
| arguments.js:6:13:6:28 | args = arguments | arguments.js:6:13:6:28 | args = arguments |
|
||||
| arguments.js:6:20:6:28 | arguments | arguments.js:6:20:6:28 | arguments |
|
||||
| arguments.js:7:13:7:20 | thirdArg | arguments.js:7:13:7:20 | thirdArg |
|
||||
| arguments.js:7:13:7:30 | thirdArg = args[2] | arguments.js:7:13:7:30 | thirdArg = args[2] |
|
||||
| arguments.js:7:24:7:27 | args | arguments.js:7:24:7:27 | args |
|
||||
| arguments.js:7:24:7:30 | args[2] | arguments.js:7:24:7:30 | args[2] |
|
||||
| arguments.js:7:29:7:29 | 2 | arguments.js:7:29:7:29 | 2 |
|
||||
| arguments.js:8:9:8:17 | arguments | arguments.js:8:9:8:17 | arguments |
|
||||
| arguments.js:8:9:8:22 | arguments = {} | arguments.js:8:9:8:22 | arguments = {} |
|
||||
| arguments.js:8:21:8:22 | {} | arguments.js:8:21:8:22 | {} |
|
||||
| arguments.js:9:13:9:23 | notFirstArg | arguments.js:9:13:9:23 | notFirstArg |
|
||||
| arguments.js:9:13:9:38 | notFirs ... ents[0] | arguments.js:9:13:9:38 | notFirs ... ents[0] |
|
||||
| arguments.js:9:27:9:35 | arguments | arguments.js:9:27:9:35 | arguments |
|
||||
| arguments.js:9:27:9:38 | arguments[0] | arguments.js:9:27:9:38 | arguments[0] |
|
||||
| arguments.js:9:37:9:37 | 0 | arguments.js:9:37:9:37 | 0 |
|
||||
| arguments.js:11:5:11:5 | f | arguments.js:11:5:11:5 | f |
|
||||
| arguments.js:11:5:11:14 | f(1, 2, 3) | arguments.js:11:5:11:14 | f(1, 2, 3) |
|
||||
| arguments.js:11:7:11:7 | 1 | arguments.js:11:7:11:7 | 1 |
|
||||
| arguments.js:11:10:11:10 | 2 | arguments.js:11:10:11:10 | 2 |
|
||||
| arguments.js:11:13:11:13 | 3 | arguments.js:11:13:11:13 | 3 |
|
||||
| eval.js:1:10:1:10 | k | eval.js:1:10:1:10 | k |
|
||||
| eval.js:2:7:2:7 | x | eval.js:2:7:2:7 | x |
|
||||
| eval.js:2:7:2:12 | x = 42 | eval.js:2:7:2:12 | x = 42 |
|
||||
|
|
|
@ -1,3 +1,16 @@
|
|||
| arguments.js:1:2:12:1 | functio ... , 3);\\n} | arguments.js:1:1:12:2 | (functi ... 3);\\n}) |
|
||||
| arguments.js:2:5:2:5 | arguments | arguments.js:4:28:4:36 | arguments |
|
||||
| arguments.js:2:5:2:5 | arguments | arguments.js:5:25:5:33 | arguments |
|
||||
| arguments.js:2:5:2:5 | arguments | arguments.js:6:20:6:28 | arguments |
|
||||
| arguments.js:2:5:10:5 | functio ... ;\\n } | arguments.js:2:14:2:14 | f |
|
||||
| arguments.js:2:14:2:14 | f | arguments.js:11:5:11:5 | f |
|
||||
| arguments.js:2:16:2:16 | x | arguments.js:2:16:2:16 | x |
|
||||
| arguments.js:2:16:2:16 | x | arguments.js:3:24:3:24 | x |
|
||||
| arguments.js:6:13:6:28 | args | arguments.js:7:24:7:27 | args |
|
||||
| arguments.js:6:20:6:28 | arguments | arguments.js:6:13:6:28 | args |
|
||||
| arguments.js:8:9:8:22 | arguments | arguments.js:9:27:9:35 | arguments |
|
||||
| arguments.js:8:21:8:22 | {} | arguments.js:8:9:8:22 | arguments |
|
||||
| arguments.js:8:21:8:22 | {} | arguments.js:8:9:8:22 | arguments = {} |
|
||||
| eval.js:2:7:2:12 | x | eval.js:4:3:4:3 | x |
|
||||
| eval.js:2:11:2:12 | 42 | eval.js:2:7:2:12 | x |
|
||||
| sources.js:1:6:1:6 | x | sources.js:1:6:1:6 | x |
|
||||
|
|
|
@ -1,3 +1,10 @@
|
|||
| arguments.js:4:38:4:38 | 0 | 0 |
|
||||
| arguments.js:5:35:5:35 | 1 | 1 |
|
||||
| arguments.js:7:29:7:29 | 2 | 2 |
|
||||
| arguments.js:9:37:9:37 | 0 | 0 |
|
||||
| arguments.js:11:7:11:7 | 1 | 1 |
|
||||
| arguments.js:11:10:11:10 | 2 | 2 |
|
||||
| arguments.js:11:13:11:13 | 3 | 3 |
|
||||
| eval.js:2:11:2:12 | 42 | 42 |
|
||||
| sources.js:4:12:4:13 | 19 | 19 |
|
||||
| sources.js:5:4:5:5 | 23 | 23 |
|
||||
|
|
|
@ -1,3 +1,13 @@
|
|||
| arguments.js:1:1:12:4 | exceptional return of (functi ... );\\n})() | call |
|
||||
| arguments.js:1:2:12:1 | exceptional return of anonymous function | call |
|
||||
| arguments.js:2:5:10:5 | exceptional return of function f | call |
|
||||
| arguments.js:2:16:2:16 | x | call |
|
||||
| arguments.js:4:28:4:39 | arguments[0] | heap |
|
||||
| arguments.js:5:25:5:36 | arguments[1] | heap |
|
||||
| arguments.js:7:24:7:30 | args[2] | heap |
|
||||
| arguments.js:9:27:9:38 | arguments[0] | heap |
|
||||
| arguments.js:11:5:11:14 | exceptional return of f(1, 2, 3) | call |
|
||||
| arguments.js:11:5:11:14 | f(1, 2, 3) | call |
|
||||
| eval.js:1:1:5:1 | exceptional return of function k | call |
|
||||
| eval.js:2:7:2:12 | x | eval |
|
||||
| eval.js:3:3:3:6 | eval | global |
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
| arguments.js:2:16:2:16 | x |
|
||||
| sources.js:1:6:1:6 | x |
|
||||
| sources.js:3:11:3:11 | x |
|
||||
| sources.js:9:14:9:18 | array |
|
||||
|
|
|
@ -1,3 +1,16 @@
|
|||
| arguments.js:1:1:1:0 | this |
|
||||
| arguments.js:1:1:12:4 | (functi ... );\\n})() |
|
||||
| arguments.js:1:2:1:1 | this |
|
||||
| arguments.js:1:2:12:1 | functio ... , 3);\\n} |
|
||||
| arguments.js:2:5:2:4 | this |
|
||||
| arguments.js:2:5:10:5 | functio ... ;\\n } |
|
||||
| arguments.js:2:16:2:16 | x |
|
||||
| arguments.js:4:28:4:39 | arguments[0] |
|
||||
| arguments.js:5:25:5:36 | arguments[1] |
|
||||
| arguments.js:7:24:7:30 | args[2] |
|
||||
| arguments.js:8:21:8:22 | {} |
|
||||
| arguments.js:9:27:9:38 | arguments[0] |
|
||||
| arguments.js:11:5:11:14 | f(1, 2, 3) |
|
||||
| eval.js:1:1:1:0 | this |
|
||||
| eval.js:1:1:1:0 | this |
|
||||
| eval.js:1:1:5:1 | functio ... eval`\\n} |
|
||||
|
|
|
@ -11,6 +11,8 @@
|
|||
| d.js:7:1:7:14 | require('foo') |
|
||||
| e.js:5:1:5:18 | require("process") |
|
||||
| f.js:2:1:2:7 | r("fs") |
|
||||
| g.js:1:1:1:96 | (proces ... https") |
|
||||
| g.js:1:43:1:61 | require("electron") |
|
||||
| index.js:1:12:1:26 | require('path') |
|
||||
| index.js:2:1:2:41 | require ... b.js")) |
|
||||
| mjs-files/require-from-js.js:1:12:1:36 | require ... on-me') |
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
(process && "renderer" === process.type ? require("electron").remote.require : require)("https");
|
|
@ -31,6 +31,7 @@ typeInferenceMismatch
|
|||
| callbacks.js:44:17:44:24 | source() | callbacks.js:41:10:41:10 | x |
|
||||
| callbacks.js:50:18:50:25 | source() | callbacks.js:30:29:30:29 | y |
|
||||
| callbacks.js:51:18:51:25 | source() | callbacks.js:30:29:30:29 | y |
|
||||
| capture-flow.js:9:11:9:18 | source() | capture-flow.js:14:10:14:16 | outer() |
|
||||
| captured-sanitizer.js:25:3:25:10 | source() | captured-sanitizer.js:15:10:15:10 | x |
|
||||
| closure.js:6:15:6:22 | source() | closure.js:8:8:8:31 | string. ... (taint) |
|
||||
| closure.js:6:15:6:22 | source() | closure.js:9:8:9:25 | string.trim(taint) |
|
||||
|
|
|
@ -22,6 +22,7 @@
|
|||
| callbacks.js:44:17:44:24 | source() | callbacks.js:41:10:41:10 | x |
|
||||
| callbacks.js:50:18:50:25 | source() | callbacks.js:30:29:30:29 | y |
|
||||
| callbacks.js:51:18:51:25 | source() | callbacks.js:30:29:30:29 | y |
|
||||
| capture-flow.js:9:11:9:18 | source() | capture-flow.js:14:10:14:16 | outer() |
|
||||
| captured-sanitizer.js:25:3:25:10 | source() | captured-sanitizer.js:15:10:15:10 | x |
|
||||
| constructor-calls.js:4:18:4:25 | source() | constructor-calls.js:18:8:18:14 | c.taint |
|
||||
| constructor-calls.js:4:18:4:25 | source() | constructor-calls.js:22:8:22:19 | c_safe.taint |
|
||||
|
|
|
@ -0,0 +1,19 @@
|
|||
import 'dummy';
|
||||
|
||||
function outerMost() {
|
||||
function outer() {
|
||||
var captured;
|
||||
function f(x) {
|
||||
captured = x;
|
||||
}
|
||||
f(source());
|
||||
|
||||
return captured;
|
||||
}
|
||||
|
||||
sink(outer()); // NOT OK
|
||||
|
||||
return outer();
|
||||
}
|
||||
|
||||
sink(outerMost()); // NOT OK - but missed
|
|
@ -0,0 +1,5 @@
|
|||
import javascript
|
||||
|
||||
query predicate test_HeaderAccess(HTTP::RequestHeaderAccess access, string res) {
|
||||
res = access.getAHeaderName()
|
||||
}
|
|
@ -0,0 +1,5 @@
|
|||
import javascript
|
||||
|
||||
query predicate test_HeaderDefinition(HTTP::HeaderDefinition hd, Fastify::RouteHandler rh) {
|
||||
rh = hd.getRouteHandler()
|
||||
}
|
|
@ -0,0 +1,5 @@
|
|||
import javascript
|
||||
|
||||
query predicate test_HeaderDefinition_defines(HTTP::HeaderDefinition hd, string name, string value) {
|
||||
hd.defines(name, value) and hd.getRouteHandler() instanceof Fastify::RouteHandler
|
||||
}
|
|
@ -0,0 +1,5 @@
|
|||
import javascript
|
||||
|
||||
query predicate test_HeaderDefinition_getAHeaderName(HTTP::HeaderDefinition hd, string res) {
|
||||
hd.getRouteHandler() instanceof Fastify::RouteHandler and res = hd.getAHeaderName()
|
||||
}
|
|
@ -0,0 +1,5 @@
|
|||
import javascript
|
||||
|
||||
query predicate test_RedirectInvocation(HTTP::RedirectInvocation invk, Fastify::RouteHandler rh) {
|
||||
invk.getRouteHandler() = rh
|
||||
}
|
|
@ -0,0 +1,11 @@
|
|||
import javascript
|
||||
|
||||
query predicate test_RequestInputAccess(
|
||||
HTTP::RequestInputAccess ria, string res, Fastify::RouteHandler rh, boolean isUserControlledObject
|
||||
) {
|
||||
ria.getRouteHandler() = rh and
|
||||
res = ria.getKind() and
|
||||
if ria.isUserControlledObject()
|
||||
then isUserControlledObject = true
|
||||
else isUserControlledObject = false
|
||||
}
|
|
@ -0,0 +1,5 @@
|
|||
import javascript
|
||||
|
||||
query predicate test_ResponseSendArgument(HTTP::ResponseSendArgument arg, Fastify::RouteHandler rh) {
|
||||
arg.getRouteHandler() = rh
|
||||
}
|
|
@ -0,0 +1,3 @@
|
|||
import javascript
|
||||
|
||||
query predicate test_RouteHandler(Fastify::RouteHandler rh, Expr res) { res = rh.getServer() }
|
|
@ -0,0 +1,5 @@
|
|||
import semmle.javascript.frameworks.Express
|
||||
|
||||
query predicate test_RouteHandler_getARequestExpr(Fastify::RouteHandler rh, HTTP::RequestExpr res) {
|
||||
res = rh.getARequestExpr()
|
||||
}
|
|
@ -0,0 +1,7 @@
|
|||
import semmle.javascript.frameworks.Express
|
||||
|
||||
query predicate test_RouteHandler_getAResponseHeader(
|
||||
Fastify::RouteHandler rh, string name, HTTP::HeaderDefinition res
|
||||
) {
|
||||
res = rh.getAResponseHeader(name)
|
||||
}
|
|
@ -0,0 +1,3 @@
|
|||
import javascript
|
||||
|
||||
query predicate test_RouteSetup(Fastify::RouteSetup rs) { any() }
|
|
@ -0,0 +1,5 @@
|
|||
import javascript
|
||||
|
||||
query predicate test_RouteSetup_getARouteHandler(Fastify::RouteSetup r, DataFlow::SourceNode res) {
|
||||
res = r.getARouteHandler()
|
||||
}
|
|
@ -0,0 +1,3 @@
|
|||
import javascript
|
||||
|
||||
query predicate test_RouteSetup_getServer(Fastify::RouteSetup rs, Expr res) { res = rs.getServer() }
|
|
@ -0,0 +1,3 @@
|
|||
import javascript
|
||||
|
||||
query predicate test_ServerDefinition(Fastify::ServerDefinition s) { any() }
|
|
@ -0,0 +1,92 @@
|
|||
var fastify = require("fastify")();
|
||||
|
||||
fastify.get(
|
||||
"/",
|
||||
/* handler */ async (request, reply) => {
|
||||
return { hello: "world" }; // response
|
||||
}
|
||||
);
|
||||
|
||||
fastify.route({
|
||||
method: "GET",
|
||||
url: "/",
|
||||
onRequest: /* handler */ (request, reply, done) => {},
|
||||
preParsing: /* handler */ (request, reply, done) => {},
|
||||
preValidation: /* handler */ (request, reply, done) => {},
|
||||
preHandler: /* handler */ (request, reply, done) => {},
|
||||
preSerialization: /* handler */ (request, reply, payload, done) => {},
|
||||
onSend: /* handler */ (request, reply, payload, done) => {},
|
||||
onResponse: /* handler */ (request, reply, done) => {},
|
||||
handler: /* handler */ (request, reply) => {}
|
||||
});
|
||||
|
||||
fastify.get(
|
||||
"/",
|
||||
opts,
|
||||
/* handler */ (request, reply) => {
|
||||
reply.send({ hello: "world" }); // response
|
||||
}
|
||||
);
|
||||
|
||||
fastify.post(
|
||||
"/:params",
|
||||
options,
|
||||
/* handler */ function(request, reply) {
|
||||
// request properties
|
||||
request.query.name; // the parsed querystring
|
||||
request.body; // the body
|
||||
request.params.name; // the params matching the URL
|
||||
request.headers.name; // the headers
|
||||
|
||||
// reply properties
|
||||
reply.header("name", "value"); // Sets a response header.
|
||||
reply.headers({ name: "value" }); // Sets all the keys of the object as a response headers.
|
||||
reply.redirect(code, url); // Redirect to the specified url, the status code is optional (default to 302).
|
||||
reply.send(payload); // Sends the payload to the user, could be a plain text, a buffer, JSON, stream
|
||||
}
|
||||
);
|
||||
fastify.listen(3000);
|
||||
|
||||
var fastifyWithObjects1 = require("fastify")();
|
||||
fastifyWithObjects1.register(require("fastify-xml-body-parser"));
|
||||
fastifyWithObjects1.post(
|
||||
"/:params",
|
||||
/* handler */ function(request, reply) {
|
||||
request.query;
|
||||
request.body;
|
||||
request.params;
|
||||
}
|
||||
);
|
||||
|
||||
var fastifyWithObjects2 = require("fastify")();
|
||||
fastifyWithObjects2.register(require("fastify-formbody"));
|
||||
fastifyWithObjects2.post(
|
||||
"/:params",
|
||||
/* handler */ function(request, reply) {
|
||||
request.query;
|
||||
request.body;
|
||||
request.params;
|
||||
}
|
||||
);
|
||||
|
||||
var fastifyWithObjects3 = require("fastify")();
|
||||
fastifyWithObjects3.register(require("fastify-qs"));
|
||||
fastifyWithObjects3.post(
|
||||
"/:params",
|
||||
/* handler */ function(request, reply) {
|
||||
request.query;
|
||||
request.body;
|
||||
request.params;
|
||||
}
|
||||
);
|
||||
|
||||
var fastifyWithObjects4 = require("fastify")();
|
||||
fastifyWithObjects4.use(require("body-parser").urlencoded({ extended: true }));
|
||||
fastifyWithObjects4.post(
|
||||
"/:params",
|
||||
/* handler */ function(request, reply) {
|
||||
request.query;
|
||||
request.body;
|
||||
request.params;
|
||||
}
|
||||
);
|
|
@ -0,0 +1,125 @@
|
|||
test_RouteSetup
|
||||
| src/fastify.js:3:1:8:1 | fastify ... e\\n }\\n) |
|
||||
| src/fastify.js:10:1:21:2 | fastify ... > {}\\n}) |
|
||||
| src/fastify.js:23:1:29:1 | fastify ... e\\n }\\n) |
|
||||
| src/fastify.js:31:1:47:1 | fastify ... m\\n }\\n) |
|
||||
| src/fastify.js:52:1:59:1 | fastify ... ;\\n }\\n) |
|
||||
| src/fastify.js:63:1:70:1 | fastify ... ;\\n }\\n) |
|
||||
| src/fastify.js:74:1:81:1 | fastify ... ;\\n }\\n) |
|
||||
| src/fastify.js:85:1:92:1 | fastify ... ;\\n }\\n) |
|
||||
test_RequestInputAccess
|
||||
| src/fastify.js:36:5:36:17 | request.query | parameter | src/fastify.js:34:17:46:3 | functio ... eam\\n } | false |
|
||||
| src/fastify.js:37:5:37:16 | request.body | body | src/fastify.js:34:17:46:3 | functio ... eam\\n } | false |
|
||||
| src/fastify.js:38:5:38:18 | request.params | parameter | src/fastify.js:34:17:46:3 | functio ... eam\\n } | false |
|
||||
| src/fastify.js:39:5:39:24 | request.headers.name | header | src/fastify.js:34:17:46:3 | functio ... eam\\n } | false |
|
||||
| src/fastify.js:55:5:55:17 | request.query | parameter | src/fastify.js:54:17:58:3 | functio ... ms;\\n } | false |
|
||||
| src/fastify.js:56:5:56:16 | request.body | body | src/fastify.js:54:17:58:3 | functio ... ms;\\n } | true |
|
||||
| src/fastify.js:57:5:57:18 | request.params | parameter | src/fastify.js:54:17:58:3 | functio ... ms;\\n } | false |
|
||||
| src/fastify.js:66:5:66:17 | request.query | parameter | src/fastify.js:65:17:69:3 | functio ... ms;\\n } | false |
|
||||
| src/fastify.js:67:5:67:16 | request.body | body | src/fastify.js:65:17:69:3 | functio ... ms;\\n } | true |
|
||||
| src/fastify.js:68:5:68:18 | request.params | parameter | src/fastify.js:65:17:69:3 | functio ... ms;\\n } | false |
|
||||
| src/fastify.js:77:5:77:17 | request.query | parameter | src/fastify.js:76:17:80:3 | functio ... ms;\\n } | true |
|
||||
| src/fastify.js:78:5:78:16 | request.body | body | src/fastify.js:76:17:80:3 | functio ... ms;\\n } | false |
|
||||
| src/fastify.js:79:5:79:18 | request.params | parameter | src/fastify.js:76:17:80:3 | functio ... ms;\\n } | true |
|
||||
| src/fastify.js:88:5:88:17 | request.query | parameter | src/fastify.js:87:17:91:3 | functio ... ms;\\n } | false |
|
||||
| src/fastify.js:89:5:89:16 | request.body | body | src/fastify.js:87:17:91:3 | functio ... ms;\\n } | true |
|
||||
| src/fastify.js:90:5:90:18 | request.params | parameter | src/fastify.js:87:17:91:3 | functio ... ms;\\n } | false |
|
||||
test_RouteHandler_getAResponseHeader
|
||||
| src/fastify.js:34:17:46:3 | functio ... eam\\n } | name | src/fastify.js:42:5:42:33 | reply.h ... value") |
|
||||
| src/fastify.js:34:17:46:3 | functio ... eam\\n } | name | src/fastify.js:43:5:43:36 | reply.h ... lue" }) |
|
||||
test_HeaderDefinition_defines
|
||||
| src/fastify.js:42:5:42:33 | reply.h ... value") | name | value |
|
||||
| src/fastify.js:43:5:43:36 | reply.h ... lue" }) | name | value |
|
||||
test_HeaderDefinition
|
||||
| src/fastify.js:42:5:42:33 | reply.h ... value") | src/fastify.js:34:17:46:3 | functio ... eam\\n } |
|
||||
| src/fastify.js:43:5:43:36 | reply.h ... lue" }) | src/fastify.js:34:17:46:3 | functio ... eam\\n } |
|
||||
test_RouteSetup_getServer
|
||||
| src/fastify.js:3:1:8:1 | fastify ... e\\n }\\n) | src/fastify.js:1:15:1:34 | require("fastify")() |
|
||||
| src/fastify.js:10:1:21:2 | fastify ... > {}\\n}) | src/fastify.js:1:15:1:34 | require("fastify")() |
|
||||
| src/fastify.js:23:1:29:1 | fastify ... e\\n }\\n) | src/fastify.js:1:15:1:34 | require("fastify")() |
|
||||
| src/fastify.js:31:1:47:1 | fastify ... m\\n }\\n) | src/fastify.js:1:15:1:34 | require("fastify")() |
|
||||
| src/fastify.js:52:1:59:1 | fastify ... ;\\n }\\n) | src/fastify.js:50:27:50:46 | require("fastify")() |
|
||||
| src/fastify.js:63:1:70:1 | fastify ... ;\\n }\\n) | src/fastify.js:61:27:61:46 | require("fastify")() |
|
||||
| src/fastify.js:74:1:81:1 | fastify ... ;\\n }\\n) | src/fastify.js:72:27:72:46 | require("fastify")() |
|
||||
| src/fastify.js:85:1:92:1 | fastify ... ;\\n }\\n) | src/fastify.js:83:27:83:46 | require("fastify")() |
|
||||
test_HeaderDefinition_getAHeaderName
|
||||
| src/fastify.js:42:5:42:33 | reply.h ... value") | name |
|
||||
| src/fastify.js:43:5:43:36 | reply.h ... lue" }) | name |
|
||||
test_ServerDefinition
|
||||
| src/fastify.js:1:15:1:34 | require("fastify")() |
|
||||
| src/fastify.js:50:27:50:46 | require("fastify")() |
|
||||
| src/fastify.js:61:27:61:46 | require("fastify")() |
|
||||
| src/fastify.js:72:27:72:46 | require("fastify")() |
|
||||
| src/fastify.js:83:27:83:46 | require("fastify")() |
|
||||
test_HeaderAccess
|
||||
| src/fastify.js:39:5:39:24 | request.headers.name | name |
|
||||
test_RouteSetup_getARouteHandler
|
||||
| src/fastify.js:3:1:8:1 | fastify ... e\\n }\\n) | src/fastify.js:5:17:7:3 | async ( ... nse\\n } |
|
||||
| src/fastify.js:10:1:21:2 | fastify ... > {}\\n}) | src/fastify.js:13:28:13:55 | (reques ... ) => {} |
|
||||
| src/fastify.js:10:1:21:2 | fastify ... > {}\\n}) | src/fastify.js:14:29:14:56 | (reques ... ) => {} |
|
||||
| src/fastify.js:10:1:21:2 | fastify ... > {}\\n}) | src/fastify.js:15:32:15:59 | (reques ... ) => {} |
|
||||
| src/fastify.js:10:1:21:2 | fastify ... > {}\\n}) | src/fastify.js:16:29:16:56 | (reques ... ) => {} |
|
||||
| src/fastify.js:10:1:21:2 | fastify ... > {}\\n}) | src/fastify.js:17:35:17:71 | (reques ... ) => {} |
|
||||
| src/fastify.js:10:1:21:2 | fastify ... > {}\\n}) | src/fastify.js:18:25:18:61 | (reques ... ) => {} |
|
||||
| src/fastify.js:10:1:21:2 | fastify ... > {}\\n}) | src/fastify.js:19:29:19:56 | (reques ... ) => {} |
|
||||
| src/fastify.js:10:1:21:2 | fastify ... > {}\\n}) | src/fastify.js:20:26:20:47 | (reques ... ) => {} |
|
||||
| src/fastify.js:23:1:29:1 | fastify ... e\\n }\\n) | src/fastify.js:26:17:28:3 | (reques ... nse\\n } |
|
||||
| src/fastify.js:31:1:47:1 | fastify ... m\\n }\\n) | src/fastify.js:34:17:46:3 | functio ... eam\\n } |
|
||||
| src/fastify.js:52:1:59:1 | fastify ... ;\\n }\\n) | src/fastify.js:54:17:58:3 | functio ... ms;\\n } |
|
||||
| src/fastify.js:63:1:70:1 | fastify ... ;\\n }\\n) | src/fastify.js:65:17:69:3 | functio ... ms;\\n } |
|
||||
| src/fastify.js:74:1:81:1 | fastify ... ;\\n }\\n) | src/fastify.js:76:17:80:3 | functio ... ms;\\n } |
|
||||
| src/fastify.js:85:1:92:1 | fastify ... ;\\n }\\n) | src/fastify.js:87:17:91:3 | functio ... ms;\\n } |
|
||||
test_RouteHandler
|
||||
| src/fastify.js:5:17:7:3 | async ( ... nse\\n } | src/fastify.js:1:15:1:34 | require("fastify")() |
|
||||
| src/fastify.js:13:28:13:55 | (reques ... ) => {} | src/fastify.js:1:15:1:34 | require("fastify")() |
|
||||
| src/fastify.js:14:29:14:56 | (reques ... ) => {} | src/fastify.js:1:15:1:34 | require("fastify")() |
|
||||
| src/fastify.js:15:32:15:59 | (reques ... ) => {} | src/fastify.js:1:15:1:34 | require("fastify")() |
|
||||
| src/fastify.js:16:29:16:56 | (reques ... ) => {} | src/fastify.js:1:15:1:34 | require("fastify")() |
|
||||
| src/fastify.js:17:35:17:71 | (reques ... ) => {} | src/fastify.js:1:15:1:34 | require("fastify")() |
|
||||
| src/fastify.js:18:25:18:61 | (reques ... ) => {} | src/fastify.js:1:15:1:34 | require("fastify")() |
|
||||
| src/fastify.js:19:29:19:56 | (reques ... ) => {} | src/fastify.js:1:15:1:34 | require("fastify")() |
|
||||
| src/fastify.js:20:26:20:47 | (reques ... ) => {} | src/fastify.js:1:15:1:34 | require("fastify")() |
|
||||
| src/fastify.js:26:17:28:3 | (reques ... nse\\n } | src/fastify.js:1:15:1:34 | require("fastify")() |
|
||||
| src/fastify.js:34:17:46:3 | functio ... eam\\n } | src/fastify.js:1:15:1:34 | require("fastify")() |
|
||||
| src/fastify.js:54:17:58:3 | functio ... ms;\\n } | src/fastify.js:50:27:50:46 | require("fastify")() |
|
||||
| src/fastify.js:65:17:69:3 | functio ... ms;\\n } | src/fastify.js:61:27:61:46 | require("fastify")() |
|
||||
| src/fastify.js:76:17:80:3 | functio ... ms;\\n } | src/fastify.js:72:27:72:46 | require("fastify")() |
|
||||
| src/fastify.js:87:17:91:3 | functio ... ms;\\n } | src/fastify.js:83:27:83:46 | require("fastify")() |
|
||||
test_RouteHandler_getARequestExpr
|
||||
| src/fastify.js:5:17:7:3 | async ( ... nse\\n } | src/fastify.js:5:24:5:30 | request |
|
||||
| src/fastify.js:13:28:13:55 | (reques ... ) => {} | src/fastify.js:13:29:13:35 | request |
|
||||
| src/fastify.js:14:29:14:56 | (reques ... ) => {} | src/fastify.js:14:30:14:36 | request |
|
||||
| src/fastify.js:15:32:15:59 | (reques ... ) => {} | src/fastify.js:15:33:15:39 | request |
|
||||
| src/fastify.js:16:29:16:56 | (reques ... ) => {} | src/fastify.js:16:30:16:36 | request |
|
||||
| src/fastify.js:17:35:17:71 | (reques ... ) => {} | src/fastify.js:17:36:17:42 | request |
|
||||
| src/fastify.js:18:25:18:61 | (reques ... ) => {} | src/fastify.js:18:26:18:32 | request |
|
||||
| src/fastify.js:19:29:19:56 | (reques ... ) => {} | src/fastify.js:19:30:19:36 | request |
|
||||
| src/fastify.js:20:26:20:47 | (reques ... ) => {} | src/fastify.js:20:27:20:33 | request |
|
||||
| src/fastify.js:26:17:28:3 | (reques ... nse\\n } | src/fastify.js:26:18:26:24 | request |
|
||||
| src/fastify.js:34:17:46:3 | functio ... eam\\n } | src/fastify.js:34:26:34:32 | request |
|
||||
| src/fastify.js:34:17:46:3 | functio ... eam\\n } | src/fastify.js:36:5:36:11 | request |
|
||||
| src/fastify.js:34:17:46:3 | functio ... eam\\n } | src/fastify.js:37:5:37:11 | request |
|
||||
| src/fastify.js:34:17:46:3 | functio ... eam\\n } | src/fastify.js:38:5:38:11 | request |
|
||||
| src/fastify.js:34:17:46:3 | functio ... eam\\n } | src/fastify.js:39:5:39:11 | request |
|
||||
| src/fastify.js:54:17:58:3 | functio ... ms;\\n } | src/fastify.js:54:26:54:32 | request |
|
||||
| src/fastify.js:54:17:58:3 | functio ... ms;\\n } | src/fastify.js:55:5:55:11 | request |
|
||||
| src/fastify.js:54:17:58:3 | functio ... ms;\\n } | src/fastify.js:56:5:56:11 | request |
|
||||
| src/fastify.js:54:17:58:3 | functio ... ms;\\n } | src/fastify.js:57:5:57:11 | request |
|
||||
| src/fastify.js:65:17:69:3 | functio ... ms;\\n } | src/fastify.js:65:26:65:32 | request |
|
||||
| src/fastify.js:65:17:69:3 | functio ... ms;\\n } | src/fastify.js:66:5:66:11 | request |
|
||||
| src/fastify.js:65:17:69:3 | functio ... ms;\\n } | src/fastify.js:67:5:67:11 | request |
|
||||
| src/fastify.js:65:17:69:3 | functio ... ms;\\n } | src/fastify.js:68:5:68:11 | request |
|
||||
| src/fastify.js:76:17:80:3 | functio ... ms;\\n } | src/fastify.js:76:26:76:32 | request |
|
||||
| src/fastify.js:76:17:80:3 | functio ... ms;\\n } | src/fastify.js:77:5:77:11 | request |
|
||||
| src/fastify.js:76:17:80:3 | functio ... ms;\\n } | src/fastify.js:78:5:78:11 | request |
|
||||
| src/fastify.js:76:17:80:3 | functio ... ms;\\n } | src/fastify.js:79:5:79:11 | request |
|
||||
| src/fastify.js:87:17:91:3 | functio ... ms;\\n } | src/fastify.js:87:26:87:32 | request |
|
||||
| src/fastify.js:87:17:91:3 | functio ... ms;\\n } | src/fastify.js:88:5:88:11 | request |
|
||||
| src/fastify.js:87:17:91:3 | functio ... ms;\\n } | src/fastify.js:89:5:89:11 | request |
|
||||
| src/fastify.js:87:17:91:3 | functio ... ms;\\n } | src/fastify.js:90:5:90:11 | request |
|
||||
test_ResponseSendArgument
|
||||
| src/fastify.js:6:12:6:29 | { hello: "world" } | src/fastify.js:5:17:7:3 | async ( ... nse\\n } |
|
||||
| src/fastify.js:27:16:27:33 | { hello: "world" } | src/fastify.js:26:17:28:3 | (reques ... nse\\n } |
|
||||
| src/fastify.js:45:16:45:22 | payload | src/fastify.js:34:17:46:3 | functio ... eam\\n } |
|
||||
test_RedirectInvocation
|
||||
| src/fastify.js:44:5:44:29 | reply.r ... e, url) | src/fastify.js:34:17:46:3 | functio ... eam\\n } |
|
|
@ -0,0 +1,14 @@
|
|||
import RouteSetup
|
||||
import RequestInputAccess
|
||||
import RouteHandler_getAResponseHeader
|
||||
import HeaderDefinition_defines
|
||||
import HeaderDefinition
|
||||
import RouteSetup_getServer
|
||||
import HeaderDefinition_getAHeaderName
|
||||
import ServerDefinition
|
||||
import HeaderAccess
|
||||
import RouteSetup_getARouteHandler
|
||||
import RouteHandler
|
||||
import RouteHandler_getARequestExpr
|
||||
import ResponseSendArgument
|
||||
import RedirectInvocation
|
|
@ -116,7 +116,7 @@ class XMLFile extends XMLParent, File {
|
|||
XMLFile() { xmlEncoding(this, _) }
|
||||
|
||||
/** Gets a printable representation of this XML file. */
|
||||
override string toString() { result = XMLParent.super.toString() }
|
||||
override string toString() { result = getName() }
|
||||
|
||||
/** Gets the name of this XML file. */
|
||||
override string getName() { result = File.super.getAbsolutePath() }
|
||||
|
@ -236,7 +236,7 @@ class XMLElement extends @xmlelement, XMLParent, XMLLocatable {
|
|||
string getAttributeValue(string name) { result = this.getAttribute(name).getValue() }
|
||||
|
||||
/** Gets a printable representation of this XML element. */
|
||||
override string toString() { result = XMLParent.super.toString() }
|
||||
override string toString() { result = getName() }
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Загрузка…
Ссылка в новой задаче