mirror of
https://github.com/github/codeql.git
synced 2025-12-16 16:53:25 +01:00
Merge branch 'main' into ruby-framework-grape
This commit is contained in:
@@ -16,9 +16,9 @@ For example, to declare a module ``M`` as private, you could use:
|
||||
}
|
||||
|
||||
Note that some annotations act on an entity itself, whilst others act on a particular *name* for the entity:
|
||||
- Act on an **entity**: ``abstract``, ``cached``, ``external``, ``transient``, ``override``, ``pragma``, ``language``,
|
||||
and ``bindingset``
|
||||
- Act on a **name**: ``deprecated``, ``library``, ``private``, ``final``, and ``query``
|
||||
- Act on an **entity**: ``abstract``, ``bindingset``, ``cached``, ``extensible``, ``external``, ``language``,
|
||||
``override``, ``pragma``, and ``transient``
|
||||
- Act on a **name**: ``additional``, ``deprecated``, ``final``, ``library``, ``private``, and ``query``
|
||||
|
||||
For example, if you annotate an entity with ``private``, then only that particular name is
|
||||
private. You could still access that entity under a different name (using an :ref:`alias <aliases>`).
|
||||
|
||||
@@ -761,17 +761,17 @@ Various kinds of syntax can have *annotations* applied to them. Annotations are
|
||||
annotation ::= simpleAnnotation | argsAnnotation
|
||||
|
||||
simpleAnnotation ::= "abstract"
|
||||
| "cached"
|
||||
| "external"
|
||||
| "extensible"
|
||||
| "final"
|
||||
| "transient"
|
||||
| "library"
|
||||
| "private"
|
||||
| "deprecated"
|
||||
| "override"
|
||||
| "additional"
|
||||
| "cached"
|
||||
| "deprecated"
|
||||
| "extensible"
|
||||
| "external"
|
||||
| "final"
|
||||
| "library"
|
||||
| "override"
|
||||
| "private"
|
||||
| "query"
|
||||
| "transient"
|
||||
|
||||
argsAnnotation ::= "pragma" "[" ("inline" | "inline_late" | "noinline" | "nomagic" | "noopt" | "assume_small_delta") "]"
|
||||
| "language" "[" "monotonicAggregates" "]"
|
||||
@@ -791,28 +791,28 @@ The following table summarizes the syntactic constructs which can be marked with
|
||||
+================+=========+============+===================+=======================+=========+========+=========+=========+============+
|
||||
| ``abstract`` | yes | | yes | | | | | | |
|
||||
+----------------+---------+------------+-------------------+-----------------------+---------+--------+---------+---------+------------+
|
||||
| ``additional`` | yes | | | yes | | | yes | yes | yes |
|
||||
+----------------+---------+------------+-------------------+-----------------------+---------+--------+---------+---------+------------+
|
||||
| ``cached`` | yes | yes | yes | yes | | | yes | | |
|
||||
+----------------+---------+------------+-------------------+-----------------------+---------+--------+---------+---------+------------+
|
||||
| ``external`` | | | | yes | | | | | |
|
||||
+----------------+---------+------------+-------------------+-----------------------+---------+--------+---------+---------+------------+
|
||||
| ``extensible`` | | | | yes | | | | | |
|
||||
+----------------+---------+------------+-------------------+-----------------------+---------+--------+---------+---------+------------+
|
||||
| ``final`` | yes | | yes | | | yes | | (yes) | |
|
||||
+----------------+---------+------------+-------------------+-----------------------+---------+--------+---------+---------+------------+
|
||||
| ``transient`` | | | | yes | | | | | |
|
||||
+----------------+---------+------------+-------------------+-----------------------+---------+--------+---------+---------+------------+
|
||||
| ``library`` | (yes) | | | | | | | | |
|
||||
+----------------+---------+------------+-------------------+-----------------------+---------+--------+---------+---------+------------+
|
||||
| ``private`` | yes | | yes | yes | yes | yes | yes | yes | yes |
|
||||
+----------------+---------+------------+-------------------+-----------------------+---------+--------+---------+---------+------------+
|
||||
| ``deprecated`` | yes | | yes | yes | yes | yes | yes | yes | yes |
|
||||
+----------------+---------+------------+-------------------+-----------------------+---------+--------+---------+---------+------------+
|
||||
| ``extensible`` | | | | yes | | | | | |
|
||||
+----------------+---------+------------+-------------------+-----------------------+---------+--------+---------+---------+------------+
|
||||
| ``external`` | | | | yes | | | | | |
|
||||
+----------------+---------+------------+-------------------+-----------------------+---------+--------+---------+---------+------------+
|
||||
| ``final`` | yes | | yes | | | yes | | (yes) | |
|
||||
+----------------+---------+------------+-------------------+-----------------------+---------+--------+---------+---------+------------+
|
||||
| ``library`` | (yes) | | | | | | | | |
|
||||
+----------------+---------+------------+-------------------+-----------------------+---------+--------+---------+---------+------------+
|
||||
| ``override`` | | | yes | | | yes | | | |
|
||||
+----------------+---------+------------+-------------------+-----------------------+---------+--------+---------+---------+------------+
|
||||
| ``additional`` | yes | | | yes | | | yes | yes | yes |
|
||||
| ``private`` | yes | | yes | yes | yes | yes | yes | yes | yes |
|
||||
+----------------+---------+------------+-------------------+-----------------------+---------+--------+---------+---------+------------+
|
||||
| ``query`` | | | | yes | | | | yes | |
|
||||
+----------------+---------+------------+-------------------+-----------------------+---------+--------+---------+---------+------------+
|
||||
| ``transient`` | | | | yes | | | | | |
|
||||
+----------------+---------+------------+-------------------+-----------------------+---------+--------+---------+---------+------------+
|
||||
|
||||
The ``library`` annotation is only usable within a QLL file, not a QL file.
|
||||
The ``final`` annotation is usable on type aliases, but not on module aliases and predicate aliases.
|
||||
@@ -933,7 +933,8 @@ A predicate definition adds a mapping from the predicate name and arity to the p
|
||||
|
||||
When a predicate is a top-level clause in a module, it is called a non-member predicate. See below for "`Member predicates <#member-predicates>`__."
|
||||
|
||||
A valid non-member predicate can be annotated with ``cached``, ``deprecated``, ``external``, ``transient``, ``private``, and ``query``. Note, the ``transient`` annotation can only be applied if the non-member predicate is also annotated with ``external``.
|
||||
A valid non-member predicate can be annotated with ``additional``, ``cached``, ``deprecated``, ``extensible``, ``external``, ``transient``, ``private``, and ``query``.
|
||||
Note, the ``transient`` annotation can only be applied if the non-member predicate is also annotated with ``external``.
|
||||
|
||||
The head of the predicate gives a name, an optional *result type*, and a sequence of variables declarations that are *arguments*:
|
||||
|
||||
@@ -979,7 +980,7 @@ A class type is said to *final inherit* from base types that are final or refere
|
||||
|
||||
A class adds a mapping from the class name to the class declaration to the current module's declared type environment.
|
||||
|
||||
A valid class can be annotated with ``abstract``, ``final``, ``library``, and ``private``. Any other annotation renders the class invalid.
|
||||
A valid class can be annotated with ``abstract``, ``additional``, ``final``, ``library``, and ``private``. Any other annotation renders the class invalid.
|
||||
|
||||
A valid class may not inherit from itself, or from more than one primitive type. The set of types that a valid class inherits from must be disjoint from the set of types that it final inherits from.
|
||||
|
||||
@@ -2292,17 +2293,17 @@ The complete grammar for QL is as follows:
|
||||
annotation ::= simpleAnnotation | argsAnnotation
|
||||
|
||||
simpleAnnotation ::= "abstract"
|
||||
| "cached"
|
||||
| "external"
|
||||
| "extensible"
|
||||
| "final"
|
||||
| "transient"
|
||||
| "library"
|
||||
| "private"
|
||||
| "deprecated"
|
||||
| "override"
|
||||
| "additional"
|
||||
| "cached"
|
||||
| "deprecated"
|
||||
| "extensible"
|
||||
| "external"
|
||||
| "final"
|
||||
| "library"
|
||||
| "override"
|
||||
| "private"
|
||||
| "query"
|
||||
| "transient"
|
||||
|
||||
argsAnnotation ::= "pragma" "[" ("inline" | "inline_late" | "noinline" | "nomagic" | "noopt" | "assume_small_delta") "]"
|
||||
| "language" "[" "monotonicAggregates" "]"
|
||||
|
||||
@@ -18,7 +18,7 @@ predicate isOverlay() { databaseMetadata("isOverlay", "true") }
|
||||
overlay[local]
|
||||
string getRawFile(@locatable el) {
|
||||
exists(@location loc, @file file |
|
||||
hasLocation(el, loc) and
|
||||
(hasLocation(el, loc) or xmllocations(el, loc)) and
|
||||
locations_default(loc, file, _, _, _, _) and
|
||||
files(file, result)
|
||||
)
|
||||
@@ -73,40 +73,22 @@ private predicate discardReferableLocatable(@locatable el) {
|
||||
)
|
||||
}
|
||||
|
||||
/** Gets the raw file for a configLocatable. */
|
||||
overlay[local]
|
||||
private predicate baseConfigLocatable(@configLocatable l) { not isOverlay() and exists(l) }
|
||||
private string getRawFileForConfig(@configLocatable el) {
|
||||
exists(@location loc, @file file |
|
||||
configLocations(el, loc) and
|
||||
locations_default(loc, file, _, _, _, _) and
|
||||
files(file, result)
|
||||
)
|
||||
}
|
||||
|
||||
overlay[local]
|
||||
private predicate overlayHasConfigLocatables() {
|
||||
isOverlay() and
|
||||
exists(@configLocatable el)
|
||||
private string baseConfigLocatable(@configLocatable el) {
|
||||
not isOverlay() and result = getRawFileForConfig(el)
|
||||
}
|
||||
|
||||
overlay[discard_entity]
|
||||
private predicate discardBaseConfigLocatable(@configLocatable el) {
|
||||
// The properties extractor is currently not incremental, so if
|
||||
// the overlay contains any config locatables, the overlay should
|
||||
// contain a full extraction and all config locatables from base
|
||||
// should be discarded.
|
||||
baseConfigLocatable(el) and overlayHasConfigLocatables()
|
||||
}
|
||||
|
||||
overlay[local]
|
||||
private predicate baseXmlLocatable(@xmllocatable l) {
|
||||
not isOverlay() and not files(l, _) and not xmlNs(l, _, _, _)
|
||||
}
|
||||
|
||||
overlay[local]
|
||||
private predicate overlayHasXmlLocatable() {
|
||||
isOverlay() and
|
||||
exists(@xmllocatable l | not files(l, _) and not xmlNs(l, _, _, _))
|
||||
}
|
||||
|
||||
overlay[discard_entity]
|
||||
private predicate discardBaseXmlLocatable(@xmllocatable el) {
|
||||
// The XML extractor is currently not incremental, so if
|
||||
// the overlay contains any XML locatables, the overlay should
|
||||
// contain a full extraction and all XML locatables from base
|
||||
// should be discarded.
|
||||
baseXmlLocatable(el) and overlayHasXmlLocatable()
|
||||
overlayChangedFiles(baseConfigLocatable(el))
|
||||
}
|
||||
|
||||
@@ -83,6 +83,7 @@ overlay[caller?]
|
||||
pragma[inline]
|
||||
predicate localFlow(Node node1, Node node2) { node1 = node2 or localFlowStepPlus(node1, node2) }
|
||||
|
||||
overlay[caller?]
|
||||
private predicate localFlowStepPlus(Node node1, Node node2) = fastTC(localFlowStep/2)(node1, node2)
|
||||
|
||||
/**
|
||||
|
||||
@@ -163,6 +163,12 @@ private module RegexFlowConfig implements DataFlow::ConfigSig {
|
||||
|
||||
private module RegexFlow = DataFlow::Global<RegexFlowConfig>;
|
||||
|
||||
private predicate usedAsRegexImpl(StringLiteral regex, string mode, boolean match_full_string) {
|
||||
RegexFlow::flow(DataFlow::exprNode(regex), _) and
|
||||
mode = "None" and // TODO: proper mode detection
|
||||
(if matchesFullString(regex) then match_full_string = true else match_full_string = false)
|
||||
}
|
||||
|
||||
/**
|
||||
* Holds if `regex` is used as a regex, with the mode `mode` (if known).
|
||||
* If regex mode is not known, `mode` will be `"None"`.
|
||||
@@ -170,11 +176,9 @@ private module RegexFlow = DataFlow::Global<RegexFlowConfig>;
|
||||
* As an optimisation, only regexes containing an infinite repitition quatifier (`+`, `*`, or `{x,}`)
|
||||
* and therefore may be relevant for ReDoS queries are considered.
|
||||
*/
|
||||
predicate usedAsRegex(StringLiteral regex, string mode, boolean match_full_string) {
|
||||
RegexFlow::flow(DataFlow::exprNode(regex), _) and
|
||||
mode = "None" and // TODO: proper mode detection
|
||||
(if matchesFullString(regex) then match_full_string = true else match_full_string = false)
|
||||
}
|
||||
overlay[local]
|
||||
predicate usedAsRegex(StringLiteral regex, string mode, boolean match_full_string) =
|
||||
forceLocal(usedAsRegexImpl/3)(regex, mode, match_full_string)
|
||||
|
||||
/**
|
||||
* Holds if `regex` is used as a regular expression that is matched against a full string,
|
||||
|
||||
@@ -6,6 +6,7 @@ module;
|
||||
|
||||
import semmle.files.FileSystem
|
||||
private import codeql.xml.Xml
|
||||
private import semmle.code.java.Overlay
|
||||
|
||||
private module Input implements InputSig<File, Location> {
|
||||
class XmlLocatableBase = @xmllocatable or @xmlnamespaceable;
|
||||
@@ -69,3 +70,13 @@ private module Input implements InputSig<File, Location> {
|
||||
}
|
||||
|
||||
import Make<File, Location, Input>
|
||||
|
||||
private class DiscardableXmlAttribute extends DiscardableLocatable, @xmlattribute { }
|
||||
|
||||
private class DiscardableXmlElement extends DiscardableLocatable, @xmlelement { }
|
||||
|
||||
private class DiscardableXmlComment extends DiscardableLocatable, @xmlcomment { }
|
||||
|
||||
private class DiscardableXmlCharacters extends DiscardableLocatable, @xmlcharacters { }
|
||||
|
||||
private class DiscardableXmlDtd extends DiscardableLocatable, @xmldtd { }
|
||||
|
||||
@@ -0,0 +1,4 @@
|
||||
---
|
||||
category: minorAnalysis
|
||||
---
|
||||
* Added modeling of `GraphQLObjectType` resolver function parameters as remote sources.
|
||||
@@ -4,3 +4,8 @@ extensions:
|
||||
extensible: summaryModel
|
||||
data:
|
||||
- ["graphql", "Member[graphql]", "Argument[0].Member[source,variableValues]", "Argument[0].Member[rootValue].AnyMember.Parameter[0]", "taint"]
|
||||
- addsTo:
|
||||
pack: codeql/javascript-all
|
||||
extensible: sourceModel
|
||||
data:
|
||||
- ["graphql", "Member[GraphQLObjectType].Argument[0].Member[fields].AnyMember.Member[resolve].Parameter[1]", "remote"]
|
||||
|
||||
@@ -63,6 +63,7 @@
|
||||
| fastify.js:108:28:108:50 | reply.l ... tedCode | fastify.js:94:29:94:51 | request ... plyCode | fastify.js:108:28:108:50 | reply.l ... tedCode | This code execution depends on a $@. | fastify.js:94:29:94:51 | request ... plyCode | user-provided value |
|
||||
| graph-ql.js:20:19:20:22 | expr | graph-ql.js:28:32:28:39 | req.body | graph-ql.js:20:19:20:22 | expr | This code execution depends on a $@. | graph-ql.js:28:32:28:39 | req.body | user-provided value |
|
||||
| graph-ql.js:39:19:39:30 | name + title | graph-ql.js:28:32:28:39 | req.body | graph-ql.js:39:19:39:30 | name + title | This code execution depends on a $@. | graph-ql.js:28:32:28:39 | req.body | user-provided value |
|
||||
| graph-ql.js:66:23:66:27 | value | graph-ql.js:65:22:65:30 | { value } | graph-ql.js:66:23:66:27 | value | This code execution depends on a $@. | graph-ql.js:65:22:65:30 | { value } | user-provided value |
|
||||
| module.js:9:16:9:29 | req.query.code | module.js:9:16:9:29 | req.query.code | module.js:9:16:9:29 | req.query.code | This code execution depends on a $@. | module.js:9:16:9:29 | req.query.code | user-provided value |
|
||||
| module.js:11:17:11:30 | req.query.code | module.js:11:17:11:30 | req.query.code | module.js:11:17:11:30 | req.query.code | This code execution depends on a $@. | module.js:11:17:11:30 | req.query.code | user-provided value |
|
||||
| react-native.js:8:32:8:38 | tainted | react-native.js:7:17:7:33 | req.param("code") | react-native.js:8:32:8:38 | tainted | This code execution depends on a $@. | react-native.js:7:17:7:33 | req.param("code") | user-provided value |
|
||||
@@ -173,6 +174,8 @@ edges
|
||||
| graph-ql.js:39:19:39:22 | name | graph-ql.js:39:19:39:30 | name + title | provenance | |
|
||||
| graph-ql.js:39:26:39:30 | title | graph-ql.js:39:19:39:30 | name + title | provenance | |
|
||||
| graph-ql.js:54:21:54:29 | variables | graph-ql.js:38:13:38:27 | { name, title } | provenance | |
|
||||
| graph-ql.js:65:22:65:30 | { value } | graph-ql.js:65:24:65:28 | value | provenance | |
|
||||
| graph-ql.js:65:24:65:28 | value | graph-ql.js:66:23:66:27 | value | provenance | |
|
||||
| react-native.js:7:7:7:13 | tainted | react-native.js:8:32:8:38 | tainted | provenance | |
|
||||
| react-native.js:7:7:7:13 | tainted | react-native.js:10:23:10:29 | tainted | provenance | |
|
||||
| react-native.js:7:17:7:33 | req.param("code") | react-native.js:7:7:7:13 | tainted | provenance | |
|
||||
@@ -323,6 +326,9 @@ nodes
|
||||
| graph-ql.js:39:19:39:30 | name + title | semmle.label | name + title |
|
||||
| graph-ql.js:39:26:39:30 | title | semmle.label | title |
|
||||
| graph-ql.js:54:21:54:29 | variables | semmle.label | variables |
|
||||
| graph-ql.js:65:22:65:30 | { value } | semmle.label | { value } |
|
||||
| graph-ql.js:65:24:65:28 | value | semmle.label | value |
|
||||
| graph-ql.js:66:23:66:27 | value | semmle.label | value |
|
||||
| module.js:9:16:9:29 | req.query.code | semmle.label | req.query.code |
|
||||
| module.js:11:17:11:30 | req.query.code | semmle.label | req.query.code |
|
||||
| react-native.js:7:7:7:13 | tainted | semmle.label | tainted |
|
||||
|
||||
@@ -72,6 +72,8 @@ edges
|
||||
| graph-ql.js:39:19:39:22 | name | graph-ql.js:39:19:39:30 | name + title | provenance | |
|
||||
| graph-ql.js:39:26:39:30 | title | graph-ql.js:39:19:39:30 | name + title | provenance | |
|
||||
| graph-ql.js:54:21:54:29 | variables | graph-ql.js:38:13:38:27 | { name, title } | provenance | |
|
||||
| graph-ql.js:65:22:65:30 | { value } | graph-ql.js:65:24:65:28 | value | provenance | |
|
||||
| graph-ql.js:65:24:65:28 | value | graph-ql.js:66:23:66:27 | value | provenance | |
|
||||
| react-native.js:7:7:7:13 | tainted | react-native.js:8:32:8:38 | tainted | provenance | |
|
||||
| react-native.js:7:7:7:13 | tainted | react-native.js:10:23:10:29 | tainted | provenance | |
|
||||
| react-native.js:7:17:7:33 | req.param("code") | react-native.js:7:7:7:13 | tainted | provenance | |
|
||||
@@ -224,6 +226,9 @@ nodes
|
||||
| graph-ql.js:39:19:39:30 | name + title | semmle.label | name + title |
|
||||
| graph-ql.js:39:26:39:30 | title | semmle.label | title |
|
||||
| graph-ql.js:54:21:54:29 | variables | semmle.label | variables |
|
||||
| graph-ql.js:65:22:65:30 | { value } | semmle.label | { value } |
|
||||
| graph-ql.js:65:24:65:28 | value | semmle.label | value |
|
||||
| graph-ql.js:66:23:66:27 | value | semmle.label | value |
|
||||
| module.js:9:16:9:29 | req.query.code | semmle.label | req.query.code |
|
||||
| module.js:11:17:11:30 | req.query.code | semmle.label | req.query.code |
|
||||
| react-native.js:7:7:7:13 | tainted | semmle.label | tainted |
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
const express = require('express');
|
||||
const { graphql, buildSchema } = require('graphql');
|
||||
const { graphql, buildSchema, GraphQLObjectType, GraphQLString } = require('graphql');
|
||||
|
||||
const app = express();
|
||||
app.use(express.json());
|
||||
@@ -53,4 +53,30 @@ app.post('/graphql', async (req, res) => {
|
||||
rootValue: root1,
|
||||
variableValues: variables
|
||||
});
|
||||
|
||||
const MutationType = new GraphQLObjectType({
|
||||
name: 'Mutation',
|
||||
fields: {
|
||||
runEval: {
|
||||
type: GraphQLString,
|
||||
args: {
|
||||
value: { type: GraphQLString }
|
||||
},
|
||||
resolve: (_, { value }, context) => { // $ Source[js/code-injection]
|
||||
return eval(value); // $ Alert[js/code-injection]
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
const schema = new GraphQLSchema({
|
||||
query: QueryType,
|
||||
mutation: MutationType
|
||||
});
|
||||
|
||||
await graphql({
|
||||
schema,
|
||||
source: query,
|
||||
variableValues: variables
|
||||
});
|
||||
});
|
||||
|
||||
738
python/ql/lib/semmle/python/frameworks/builtins.model.yml
Normal file
738
python/ql/lib/semmle/python/frameworks/builtins.model.yml
Normal file
@@ -0,0 +1,738 @@
|
||||
# process-builtin-exceptions 0.0.1; Python 3.11.0rc2
|
||||
extensions:
|
||||
- addsTo:
|
||||
extensible: typeModel
|
||||
pack: codeql/python-all
|
||||
data:
|
||||
- - builtins.PendingDeprecationWarning~Subclass
|
||||
- builtins.PendingDeprecationWarning
|
||||
- ''
|
||||
- - builtins.Warning~Subclass
|
||||
- builtins.PendingDeprecationWarning
|
||||
- ''
|
||||
- - builtins.Exception~Subclass
|
||||
- builtins.PendingDeprecationWarning
|
||||
- ''
|
||||
- - builtins.BaseException~Subclass
|
||||
- builtins.PendingDeprecationWarning
|
||||
- ''
|
||||
- - builtins.UnicodeWarning~Subclass
|
||||
- builtins.UnicodeWarning
|
||||
- ''
|
||||
- - builtins.Warning~Subclass
|
||||
- builtins.UnicodeWarning
|
||||
- ''
|
||||
- - builtins.Exception~Subclass
|
||||
- builtins.UnicodeWarning
|
||||
- ''
|
||||
- - builtins.BaseException~Subclass
|
||||
- builtins.UnicodeWarning
|
||||
- ''
|
||||
- - builtins.StopAsyncIteration~Subclass
|
||||
- builtins.StopAsyncIteration
|
||||
- ''
|
||||
- - builtins.Exception~Subclass
|
||||
- builtins.StopAsyncIteration
|
||||
- ''
|
||||
- - builtins.BaseException~Subclass
|
||||
- builtins.StopAsyncIteration
|
||||
- ''
|
||||
- - builtins.KeyboardInterrupt~Subclass
|
||||
- builtins.KeyboardInterrupt
|
||||
- ''
|
||||
- - builtins.BaseException~Subclass
|
||||
- builtins.KeyboardInterrupt
|
||||
- ''
|
||||
- - builtins.ConnectionError~Subclass
|
||||
- builtins.ConnectionError
|
||||
- ''
|
||||
- - builtins.OSError~Subclass
|
||||
- builtins.ConnectionError
|
||||
- ''
|
||||
- - builtins.Exception~Subclass
|
||||
- builtins.ConnectionError
|
||||
- ''
|
||||
- - builtins.BaseException~Subclass
|
||||
- builtins.ConnectionError
|
||||
- ''
|
||||
- - builtins.ConnectionResetError~Subclass
|
||||
- builtins.ConnectionResetError
|
||||
- ''
|
||||
- - builtins.ConnectionError~Subclass
|
||||
- builtins.ConnectionResetError
|
||||
- ''
|
||||
- - builtins.OSError~Subclass
|
||||
- builtins.ConnectionResetError
|
||||
- ''
|
||||
- - builtins.Exception~Subclass
|
||||
- builtins.ConnectionResetError
|
||||
- ''
|
||||
- - builtins.BaseException~Subclass
|
||||
- builtins.ConnectionResetError
|
||||
- ''
|
||||
- - builtins.InterruptedError~Subclass
|
||||
- builtins.InterruptedError
|
||||
- ''
|
||||
- - builtins.OSError~Subclass
|
||||
- builtins.InterruptedError
|
||||
- ''
|
||||
- - builtins.Exception~Subclass
|
||||
- builtins.InterruptedError
|
||||
- ''
|
||||
- - builtins.BaseException~Subclass
|
||||
- builtins.InterruptedError
|
||||
- ''
|
||||
- - builtins.RuntimeError~Subclass
|
||||
- builtins.RuntimeError
|
||||
- ''
|
||||
- - builtins.Exception~Subclass
|
||||
- builtins.RuntimeError
|
||||
- ''
|
||||
- - builtins.BaseException~Subclass
|
||||
- builtins.RuntimeError
|
||||
- ''
|
||||
- - builtins.AttributeError~Subclass
|
||||
- builtins.AttributeError
|
||||
- ''
|
||||
- - builtins.Exception~Subclass
|
||||
- builtins.AttributeError
|
||||
- ''
|
||||
- - builtins.BaseException~Subclass
|
||||
- builtins.AttributeError
|
||||
- ''
|
||||
- - builtins.IndexError~Subclass
|
||||
- builtins.IndexError
|
||||
- ''
|
||||
- - builtins.LookupError~Subclass
|
||||
- builtins.IndexError
|
||||
- ''
|
||||
- - builtins.Exception~Subclass
|
||||
- builtins.IndexError
|
||||
- ''
|
||||
- - builtins.BaseException~Subclass
|
||||
- builtins.IndexError
|
||||
- ''
|
||||
- - builtins.UnicodeDecodeError~Subclass
|
||||
- builtins.UnicodeDecodeError
|
||||
- ''
|
||||
- - builtins.UnicodeError~Subclass
|
||||
- builtins.UnicodeDecodeError
|
||||
- ''
|
||||
- - builtins.ValueError~Subclass
|
||||
- builtins.UnicodeDecodeError
|
||||
- ''
|
||||
- - builtins.Exception~Subclass
|
||||
- builtins.UnicodeDecodeError
|
||||
- ''
|
||||
- - builtins.BaseException~Subclass
|
||||
- builtins.UnicodeDecodeError
|
||||
- ''
|
||||
- - builtins.ExceptionGroup~Subclass
|
||||
- builtins.ExceptionGroup
|
||||
- ''
|
||||
- - builtins.BaseExceptionGroup~Subclass
|
||||
- builtins.ExceptionGroup
|
||||
- ''
|
||||
- - builtins.Exception~Subclass
|
||||
- builtins.ExceptionGroup
|
||||
- ''
|
||||
- - builtins.BaseException~Subclass
|
||||
- builtins.ExceptionGroup
|
||||
- ''
|
||||
- - builtins.OverflowError~Subclass
|
||||
- builtins.OverflowError
|
||||
- ''
|
||||
- - builtins.ArithmeticError~Subclass
|
||||
- builtins.OverflowError
|
||||
- ''
|
||||
- - builtins.Exception~Subclass
|
||||
- builtins.OverflowError
|
||||
- ''
|
||||
- - builtins.BaseException~Subclass
|
||||
- builtins.OverflowError
|
||||
- ''
|
||||
- - builtins.BufferError~Subclass
|
||||
- builtins.BufferError
|
||||
- ''
|
||||
- - builtins.Exception~Subclass
|
||||
- builtins.BufferError
|
||||
- ''
|
||||
- - builtins.BaseException~Subclass
|
||||
- builtins.BufferError
|
||||
- ''
|
||||
- - builtins.SyntaxWarning~Subclass
|
||||
- builtins.SyntaxWarning
|
||||
- ''
|
||||
- - builtins.Warning~Subclass
|
||||
- builtins.SyntaxWarning
|
||||
- ''
|
||||
- - builtins.Exception~Subclass
|
||||
- builtins.SyntaxWarning
|
||||
- ''
|
||||
- - builtins.BaseException~Subclass
|
||||
- builtins.SyntaxWarning
|
||||
- ''
|
||||
- - builtins.BytesWarning~Subclass
|
||||
- builtins.BytesWarning
|
||||
- ''
|
||||
- - builtins.Warning~Subclass
|
||||
- builtins.BytesWarning
|
||||
- ''
|
||||
- - builtins.Exception~Subclass
|
||||
- builtins.BytesWarning
|
||||
- ''
|
||||
- - builtins.BaseException~Subclass
|
||||
- builtins.BytesWarning
|
||||
- ''
|
||||
- - builtins.StopIteration~Subclass
|
||||
- builtins.StopIteration
|
||||
- ''
|
||||
- - builtins.Exception~Subclass
|
||||
- builtins.StopIteration
|
||||
- ''
|
||||
- - builtins.BaseException~Subclass
|
||||
- builtins.StopIteration
|
||||
- ''
|
||||
- - builtins.ImportError~Subclass
|
||||
- builtins.ImportError
|
||||
- ''
|
||||
- - builtins.Exception~Subclass
|
||||
- builtins.ImportError
|
||||
- ''
|
||||
- - builtins.BaseException~Subclass
|
||||
- builtins.ImportError
|
||||
- ''
|
||||
- - builtins.ChildProcessError~Subclass
|
||||
- builtins.ChildProcessError
|
||||
- ''
|
||||
- - builtins.OSError~Subclass
|
||||
- builtins.ChildProcessError
|
||||
- ''
|
||||
- - builtins.Exception~Subclass
|
||||
- builtins.ChildProcessError
|
||||
- ''
|
||||
- - builtins.BaseException~Subclass
|
||||
- builtins.ChildProcessError
|
||||
- ''
|
||||
- - builtins.FileExistsError~Subclass
|
||||
- builtins.FileExistsError
|
||||
- ''
|
||||
- - builtins.OSError~Subclass
|
||||
- builtins.FileExistsError
|
||||
- ''
|
||||
- - builtins.Exception~Subclass
|
||||
- builtins.FileExistsError
|
||||
- ''
|
||||
- - builtins.BaseException~Subclass
|
||||
- builtins.FileExistsError
|
||||
- ''
|
||||
- - builtins.PermissionError~Subclass
|
||||
- builtins.PermissionError
|
||||
- ''
|
||||
- - builtins.OSError~Subclass
|
||||
- builtins.PermissionError
|
||||
- ''
|
||||
- - builtins.Exception~Subclass
|
||||
- builtins.PermissionError
|
||||
- ''
|
||||
- - builtins.BaseException~Subclass
|
||||
- builtins.PermissionError
|
||||
- ''
|
||||
- - builtins.RecursionError~Subclass
|
||||
- builtins.RecursionError
|
||||
- ''
|
||||
- - builtins.RuntimeError~Subclass
|
||||
- builtins.RecursionError
|
||||
- ''
|
||||
- - builtins.Exception~Subclass
|
||||
- builtins.RecursionError
|
||||
- ''
|
||||
- - builtins.BaseException~Subclass
|
||||
- builtins.RecursionError
|
||||
- ''
|
||||
- - builtins.SyntaxError~Subclass
|
||||
- builtins.SyntaxError
|
||||
- ''
|
||||
- - builtins.Exception~Subclass
|
||||
- builtins.SyntaxError
|
||||
- ''
|
||||
- - builtins.BaseException~Subclass
|
||||
- builtins.SyntaxError
|
||||
- ''
|
||||
- - builtins.KeyError~Subclass
|
||||
- builtins.KeyError
|
||||
- ''
|
||||
- - builtins.LookupError~Subclass
|
||||
- builtins.KeyError
|
||||
- ''
|
||||
- - builtins.Exception~Subclass
|
||||
- builtins.KeyError
|
||||
- ''
|
||||
- - builtins.BaseException~Subclass
|
||||
- builtins.KeyError
|
||||
- ''
|
||||
- - builtins.UnicodeTranslateError~Subclass
|
||||
- builtins.UnicodeTranslateError
|
||||
- ''
|
||||
- - builtins.UnicodeError~Subclass
|
||||
- builtins.UnicodeTranslateError
|
||||
- ''
|
||||
- - builtins.ValueError~Subclass
|
||||
- builtins.UnicodeTranslateError
|
||||
- ''
|
||||
- - builtins.Exception~Subclass
|
||||
- builtins.UnicodeTranslateError
|
||||
- ''
|
||||
- - builtins.BaseException~Subclass
|
||||
- builtins.UnicodeTranslateError
|
||||
- ''
|
||||
- - builtins.ZeroDivisionError~Subclass
|
||||
- builtins.ZeroDivisionError
|
||||
- ''
|
||||
- - builtins.ArithmeticError~Subclass
|
||||
- builtins.ZeroDivisionError
|
||||
- ''
|
||||
- - builtins.Exception~Subclass
|
||||
- builtins.ZeroDivisionError
|
||||
- ''
|
||||
- - builtins.BaseException~Subclass
|
||||
- builtins.ZeroDivisionError
|
||||
- ''
|
||||
- - builtins.Warning~Subclass
|
||||
- builtins.Warning
|
||||
- ''
|
||||
- - builtins.Exception~Subclass
|
||||
- builtins.Warning
|
||||
- ''
|
||||
- - builtins.BaseException~Subclass
|
||||
- builtins.Warning
|
||||
- ''
|
||||
- - builtins.RuntimeWarning~Subclass
|
||||
- builtins.RuntimeWarning
|
||||
- ''
|
||||
- - builtins.Warning~Subclass
|
||||
- builtins.RuntimeWarning
|
||||
- ''
|
||||
- - builtins.Exception~Subclass
|
||||
- builtins.RuntimeWarning
|
||||
- ''
|
||||
- - builtins.BaseException~Subclass
|
||||
- builtins.RuntimeWarning
|
||||
- ''
|
||||
- - builtins.EncodingWarning~Subclass
|
||||
- builtins.EncodingWarning
|
||||
- ''
|
||||
- - builtins.Warning~Subclass
|
||||
- builtins.EncodingWarning
|
||||
- ''
|
||||
- - builtins.Exception~Subclass
|
||||
- builtins.EncodingWarning
|
||||
- ''
|
||||
- - builtins.BaseException~Subclass
|
||||
- builtins.EncodingWarning
|
||||
- ''
|
||||
- - builtins.BaseException~Subclass
|
||||
- builtins.BaseException
|
||||
- ''
|
||||
- - builtins.GeneratorExit~Subclass
|
||||
- builtins.GeneratorExit
|
||||
- ''
|
||||
- - builtins.BaseException~Subclass
|
||||
- builtins.GeneratorExit
|
||||
- ''
|
||||
- - builtins.ModuleNotFoundError~Subclass
|
||||
- builtins.ModuleNotFoundError
|
||||
- ''
|
||||
- - builtins.ImportError~Subclass
|
||||
- builtins.ModuleNotFoundError
|
||||
- ''
|
||||
- - builtins.Exception~Subclass
|
||||
- builtins.ModuleNotFoundError
|
||||
- ''
|
||||
- - builtins.BaseException~Subclass
|
||||
- builtins.ModuleNotFoundError
|
||||
- ''
|
||||
- - builtins.BrokenPipeError~Subclass
|
||||
- builtins.BrokenPipeError
|
||||
- ''
|
||||
- - builtins.ConnectionError~Subclass
|
||||
- builtins.BrokenPipeError
|
||||
- ''
|
||||
- - builtins.OSError~Subclass
|
||||
- builtins.BrokenPipeError
|
||||
- ''
|
||||
- - builtins.Exception~Subclass
|
||||
- builtins.BrokenPipeError
|
||||
- ''
|
||||
- - builtins.BaseException~Subclass
|
||||
- builtins.BrokenPipeError
|
||||
- ''
|
||||
- - builtins.FileNotFoundError~Subclass
|
||||
- builtins.FileNotFoundError
|
||||
- ''
|
||||
- - builtins.OSError~Subclass
|
||||
- builtins.FileNotFoundError
|
||||
- ''
|
||||
- - builtins.Exception~Subclass
|
||||
- builtins.FileNotFoundError
|
||||
- ''
|
||||
- - builtins.BaseException~Subclass
|
||||
- builtins.FileNotFoundError
|
||||
- ''
|
||||
- - builtins.ProcessLookupError~Subclass
|
||||
- builtins.ProcessLookupError
|
||||
- ''
|
||||
- - builtins.OSError~Subclass
|
||||
- builtins.ProcessLookupError
|
||||
- ''
|
||||
- - builtins.Exception~Subclass
|
||||
- builtins.ProcessLookupError
|
||||
- ''
|
||||
- - builtins.BaseException~Subclass
|
||||
- builtins.ProcessLookupError
|
||||
- ''
|
||||
- - builtins.NotImplementedError~Subclass
|
||||
- builtins.NotImplementedError
|
||||
- ''
|
||||
- - builtins.RuntimeError~Subclass
|
||||
- builtins.NotImplementedError
|
||||
- ''
|
||||
- - builtins.Exception~Subclass
|
||||
- builtins.NotImplementedError
|
||||
- ''
|
||||
- - builtins.BaseException~Subclass
|
||||
- builtins.NotImplementedError
|
||||
- ''
|
||||
- - builtins.IndentationError~Subclass
|
||||
- builtins.IndentationError
|
||||
- ''
|
||||
- - builtins.SyntaxError~Subclass
|
||||
- builtins.IndentationError
|
||||
- ''
|
||||
- - builtins.Exception~Subclass
|
||||
- builtins.IndentationError
|
||||
- ''
|
||||
- - builtins.BaseException~Subclass
|
||||
- builtins.IndentationError
|
||||
- ''
|
||||
- - builtins.ValueError~Subclass
|
||||
- builtins.ValueError
|
||||
- ''
|
||||
- - builtins.Exception~Subclass
|
||||
- builtins.ValueError
|
||||
- ''
|
||||
- - builtins.BaseException~Subclass
|
||||
- builtins.ValueError
|
||||
- ''
|
||||
- - builtins.AssertionError~Subclass
|
||||
- builtins.AssertionError
|
||||
- ''
|
||||
- - builtins.Exception~Subclass
|
||||
- builtins.AssertionError
|
||||
- ''
|
||||
- - builtins.BaseException~Subclass
|
||||
- builtins.AssertionError
|
||||
- ''
|
||||
- - builtins.SystemError~Subclass
|
||||
- builtins.SystemError
|
||||
- ''
|
||||
- - builtins.Exception~Subclass
|
||||
- builtins.SystemError
|
||||
- ''
|
||||
- - builtins.BaseException~Subclass
|
||||
- builtins.SystemError
|
||||
- ''
|
||||
- - builtins.UserWarning~Subclass
|
||||
- builtins.UserWarning
|
||||
- ''
|
||||
- - builtins.Warning~Subclass
|
||||
- builtins.UserWarning
|
||||
- ''
|
||||
- - builtins.Exception~Subclass
|
||||
- builtins.UserWarning
|
||||
- ''
|
||||
- - builtins.BaseException~Subclass
|
||||
- builtins.UserWarning
|
||||
- ''
|
||||
- - builtins.FutureWarning~Subclass
|
||||
- builtins.FutureWarning
|
||||
- ''
|
||||
- - builtins.Warning~Subclass
|
||||
- builtins.FutureWarning
|
||||
- ''
|
||||
- - builtins.Exception~Subclass
|
||||
- builtins.FutureWarning
|
||||
- ''
|
||||
- - builtins.BaseException~Subclass
|
||||
- builtins.FutureWarning
|
||||
- ''
|
||||
- - builtins.Exception~Subclass
|
||||
- builtins.Exception
|
||||
- ''
|
||||
- - builtins.BaseException~Subclass
|
||||
- builtins.Exception
|
||||
- ''
|
||||
- - builtins.ResourceWarning~Subclass
|
||||
- builtins.ResourceWarning
|
||||
- ''
|
||||
- - builtins.Warning~Subclass
|
||||
- builtins.ResourceWarning
|
||||
- ''
|
||||
- - builtins.Exception~Subclass
|
||||
- builtins.ResourceWarning
|
||||
- ''
|
||||
- - builtins.BaseException~Subclass
|
||||
- builtins.ResourceWarning
|
||||
- ''
|
||||
- - builtins.SystemExit~Subclass
|
||||
- builtins.SystemExit
|
||||
- ''
|
||||
- - builtins.BaseException~Subclass
|
||||
- builtins.SystemExit
|
||||
- ''
|
||||
- - builtins.OSError~Subclass
|
||||
- builtins.OSError
|
||||
- ''
|
||||
- - builtins.Exception~Subclass
|
||||
- builtins.OSError
|
||||
- ''
|
||||
- - builtins.BaseException~Subclass
|
||||
- builtins.OSError
|
||||
- ''
|
||||
- - builtins.ConnectionAbortedError~Subclass
|
||||
- builtins.ConnectionAbortedError
|
||||
- ''
|
||||
- - builtins.ConnectionError~Subclass
|
||||
- builtins.ConnectionAbortedError
|
||||
- ''
|
||||
- - builtins.OSError~Subclass
|
||||
- builtins.ConnectionAbortedError
|
||||
- ''
|
||||
- - builtins.Exception~Subclass
|
||||
- builtins.ConnectionAbortedError
|
||||
- ''
|
||||
- - builtins.BaseException~Subclass
|
||||
- builtins.ConnectionAbortedError
|
||||
- ''
|
||||
- - builtins.IsADirectoryError~Subclass
|
||||
- builtins.IsADirectoryError
|
||||
- ''
|
||||
- - builtins.OSError~Subclass
|
||||
- builtins.IsADirectoryError
|
||||
- ''
|
||||
- - builtins.Exception~Subclass
|
||||
- builtins.IsADirectoryError
|
||||
- ''
|
||||
- - builtins.BaseException~Subclass
|
||||
- builtins.IsADirectoryError
|
||||
- ''
|
||||
- - builtins.TimeoutError~Subclass
|
||||
- builtins.TimeoutError
|
||||
- ''
|
||||
- - builtins.OSError~Subclass
|
||||
- builtins.TimeoutError
|
||||
- ''
|
||||
- - builtins.Exception~Subclass
|
||||
- builtins.TimeoutError
|
||||
- ''
|
||||
- - builtins.BaseException~Subclass
|
||||
- builtins.TimeoutError
|
||||
- ''
|
||||
- - builtins.NameError~Subclass
|
||||
- builtins.NameError
|
||||
- ''
|
||||
- - builtins.Exception~Subclass
|
||||
- builtins.NameError
|
||||
- ''
|
||||
- - builtins.BaseException~Subclass
|
||||
- builtins.NameError
|
||||
- ''
|
||||
- - builtins.TabError~Subclass
|
||||
- builtins.TabError
|
||||
- ''
|
||||
- - builtins.IndentationError~Subclass
|
||||
- builtins.TabError
|
||||
- ''
|
||||
- - builtins.SyntaxError~Subclass
|
||||
- builtins.TabError
|
||||
- ''
|
||||
- - builtins.Exception~Subclass
|
||||
- builtins.TabError
|
||||
- ''
|
||||
- - builtins.BaseException~Subclass
|
||||
- builtins.TabError
|
||||
- ''
|
||||
- - builtins.UnicodeError~Subclass
|
||||
- builtins.UnicodeError
|
||||
- ''
|
||||
- - builtins.ValueError~Subclass
|
||||
- builtins.UnicodeError
|
||||
- ''
|
||||
- - builtins.Exception~Subclass
|
||||
- builtins.UnicodeError
|
||||
- ''
|
||||
- - builtins.BaseException~Subclass
|
||||
- builtins.UnicodeError
|
||||
- ''
|
||||
- - builtins.ArithmeticError~Subclass
|
||||
- builtins.ArithmeticError
|
||||
- ''
|
||||
- - builtins.Exception~Subclass
|
||||
- builtins.ArithmeticError
|
||||
- ''
|
||||
- - builtins.BaseException~Subclass
|
||||
- builtins.ArithmeticError
|
||||
- ''
|
||||
- - builtins.ReferenceError~Subclass
|
||||
- builtins.ReferenceError
|
||||
- ''
|
||||
- - builtins.Exception~Subclass
|
||||
- builtins.ReferenceError
|
||||
- ''
|
||||
- - builtins.BaseException~Subclass
|
||||
- builtins.ReferenceError
|
||||
- ''
|
||||
- - builtins.DeprecationWarning~Subclass
|
||||
- builtins.DeprecationWarning
|
||||
- ''
|
||||
- - builtins.Warning~Subclass
|
||||
- builtins.DeprecationWarning
|
||||
- ''
|
||||
- - builtins.Exception~Subclass
|
||||
- builtins.DeprecationWarning
|
||||
- ''
|
||||
- - builtins.BaseException~Subclass
|
||||
- builtins.DeprecationWarning
|
||||
- ''
|
||||
- - builtins.ImportWarning~Subclass
|
||||
- builtins.ImportWarning
|
||||
- ''
|
||||
- - builtins.Warning~Subclass
|
||||
- builtins.ImportWarning
|
||||
- ''
|
||||
- - builtins.Exception~Subclass
|
||||
- builtins.ImportWarning
|
||||
- ''
|
||||
- - builtins.BaseException~Subclass
|
||||
- builtins.ImportWarning
|
||||
- ''
|
||||
- - builtins.TypeError~Subclass
|
||||
- builtins.TypeError
|
||||
- ''
|
||||
- - builtins.Exception~Subclass
|
||||
- builtins.TypeError
|
||||
- ''
|
||||
- - builtins.BaseException~Subclass
|
||||
- builtins.TypeError
|
||||
- ''
|
||||
- - builtins.BaseExceptionGroup~Subclass
|
||||
- builtins.BaseExceptionGroup
|
||||
- ''
|
||||
- - builtins.BaseException~Subclass
|
||||
- builtins.BaseExceptionGroup
|
||||
- ''
|
||||
- - builtins.BlockingIOError~Subclass
|
||||
- builtins.BlockingIOError
|
||||
- ''
|
||||
- - builtins.OSError~Subclass
|
||||
- builtins.BlockingIOError
|
||||
- ''
|
||||
- - builtins.Exception~Subclass
|
||||
- builtins.BlockingIOError
|
||||
- ''
|
||||
- - builtins.BaseException~Subclass
|
||||
- builtins.BlockingIOError
|
||||
- ''
|
||||
- - builtins.ConnectionRefusedError~Subclass
|
||||
- builtins.ConnectionRefusedError
|
||||
- ''
|
||||
- - builtins.ConnectionError~Subclass
|
||||
- builtins.ConnectionRefusedError
|
||||
- ''
|
||||
- - builtins.OSError~Subclass
|
||||
- builtins.ConnectionRefusedError
|
||||
- ''
|
||||
- - builtins.Exception~Subclass
|
||||
- builtins.ConnectionRefusedError
|
||||
- ''
|
||||
- - builtins.BaseException~Subclass
|
||||
- builtins.ConnectionRefusedError
|
||||
- ''
|
||||
- - builtins.NotADirectoryError~Subclass
|
||||
- builtins.NotADirectoryError
|
||||
- ''
|
||||
- - builtins.OSError~Subclass
|
||||
- builtins.NotADirectoryError
|
||||
- ''
|
||||
- - builtins.Exception~Subclass
|
||||
- builtins.NotADirectoryError
|
||||
- ''
|
||||
- - builtins.BaseException~Subclass
|
||||
- builtins.NotADirectoryError
|
||||
- ''
|
||||
- - builtins.EOFError~Subclass
|
||||
- builtins.EOFError
|
||||
- ''
|
||||
- - builtins.Exception~Subclass
|
||||
- builtins.EOFError
|
||||
- ''
|
||||
- - builtins.BaseException~Subclass
|
||||
- builtins.EOFError
|
||||
- ''
|
||||
- - builtins.UnboundLocalError~Subclass
|
||||
- builtins.UnboundLocalError
|
||||
- ''
|
||||
- - builtins.NameError~Subclass
|
||||
- builtins.UnboundLocalError
|
||||
- ''
|
||||
- - builtins.Exception~Subclass
|
||||
- builtins.UnboundLocalError
|
||||
- ''
|
||||
- - builtins.BaseException~Subclass
|
||||
- builtins.UnboundLocalError
|
||||
- ''
|
||||
- - builtins.LookupError~Subclass
|
||||
- builtins.LookupError
|
||||
- ''
|
||||
- - builtins.Exception~Subclass
|
||||
- builtins.LookupError
|
||||
- ''
|
||||
- - builtins.BaseException~Subclass
|
||||
- builtins.LookupError
|
||||
- ''
|
||||
- - builtins.UnicodeEncodeError~Subclass
|
||||
- builtins.UnicodeEncodeError
|
||||
- ''
|
||||
- - builtins.UnicodeError~Subclass
|
||||
- builtins.UnicodeEncodeError
|
||||
- ''
|
||||
- - builtins.ValueError~Subclass
|
||||
- builtins.UnicodeEncodeError
|
||||
- ''
|
||||
- - builtins.Exception~Subclass
|
||||
- builtins.UnicodeEncodeError
|
||||
- ''
|
||||
- - builtins.BaseException~Subclass
|
||||
- builtins.UnicodeEncodeError
|
||||
- ''
|
||||
- - builtins.FloatingPointError~Subclass
|
||||
- builtins.FloatingPointError
|
||||
- ''
|
||||
- - builtins.ArithmeticError~Subclass
|
||||
- builtins.FloatingPointError
|
||||
- ''
|
||||
- - builtins.Exception~Subclass
|
||||
- builtins.FloatingPointError
|
||||
- ''
|
||||
- - builtins.BaseException~Subclass
|
||||
- builtins.FloatingPointError
|
||||
- ''
|
||||
- - builtins.MemoryError~Subclass
|
||||
- builtins.MemoryError
|
||||
- ''
|
||||
- - builtins.Exception~Subclass
|
||||
- builtins.MemoryError
|
||||
- ''
|
||||
- - builtins.BaseException~Subclass
|
||||
- builtins.MemoryError
|
||||
- ''
|
||||
@@ -25,11 +25,11 @@ is a super class of <code>Error</code>.
|
||||
|
||||
<p>Reorganize the <code>except</code> blocks so that the more specific <code>except</code>
|
||||
is defined first. Alternatively, if the more specific <code>except</code> block is
|
||||
no longer required then it should be deleted.</p>
|
||||
no longer required, then it should be deleted.</p>
|
||||
|
||||
</recommendation>
|
||||
<example>
|
||||
<p>In this example the <code>except Exception:</code> will handle <code>AttributeError</code> preventing the
|
||||
<p>In the following example, the <code>except Exception:</code> will handle <code>AttributeError</code> preventing the
|
||||
subsequent handler from ever executing.</p>
|
||||
<sample src="IncorrectExceptOrder.py" />
|
||||
|
||||
@@ -37,8 +37,8 @@ subsequent handler from ever executing.</p>
|
||||
</example>
|
||||
<references>
|
||||
|
||||
<li>Python Language Reference: <a href="http://docs.python.org/2.7/reference/compound_stmts.html#try">The try statement</a>,
|
||||
<a href="http://docs.python.org/2.7/reference/executionmodel.html#exceptions">Exceptions</a>.</li>
|
||||
<li>Python Language Reference: <a href="http://docs.python.org/3/reference/compound_stmts.html#try">The try statement</a>,
|
||||
<a href="http://docs.python.org/3/reference/executionmodel.html#exceptions">Exceptions</a>.</li>
|
||||
|
||||
|
||||
</references>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/**
|
||||
* @name Unreachable 'except' block
|
||||
* @name Unreachable `except` block
|
||||
* @description Handling general exceptions before specific exceptions means that the specific
|
||||
* handlers are never executed.
|
||||
* @kind problem
|
||||
@@ -14,22 +14,95 @@
|
||||
*/
|
||||
|
||||
import python
|
||||
import semmle.python.dataflow.new.internal.DataFlowDispatch
|
||||
import semmle.python.ApiGraphs
|
||||
import semmle.python.frameworks.data.internal.ApiGraphModels
|
||||
|
||||
predicate incorrect_except_order(ExceptStmt ex1, ClassValue cls1, ExceptStmt ex2, ClassValue cls2) {
|
||||
predicate builtinException(string name) {
|
||||
typeModel("builtins.BaseException~Subclass", "builtins." + name, "")
|
||||
}
|
||||
|
||||
predicate builtinExceptionSubclass(string base, string sub) {
|
||||
typeModel("builtins." + base + "~Subclass", "builtins." + sub, "")
|
||||
}
|
||||
|
||||
newtype TExceptType =
|
||||
TClass(Class c) or
|
||||
TBuiltin(string name) { builtinException(name) }
|
||||
|
||||
class ExceptType extends TExceptType {
|
||||
Class asClass() { this = TClass(result) }
|
||||
|
||||
string asBuiltinName() { this = TBuiltin(result) }
|
||||
|
||||
predicate isBuiltin() { this = TBuiltin(_) }
|
||||
|
||||
string getName() {
|
||||
result = this.asClass().getName()
|
||||
or
|
||||
result = this.asBuiltinName()
|
||||
}
|
||||
|
||||
string toString() { result = this.getName() }
|
||||
|
||||
DataFlow::Node getAUse() {
|
||||
result = classTracker(this.asClass())
|
||||
or
|
||||
API::builtin(this.asBuiltinName()).asSource().flowsTo(result)
|
||||
}
|
||||
|
||||
ExceptType getADirectSuperclass() {
|
||||
result.asClass() = getADirectSuperclass(this.asClass())
|
||||
or
|
||||
result.isBuiltin() and
|
||||
result.getAUse().asExpr() = this.asClass().getABase()
|
||||
or
|
||||
builtinExceptionSubclass(result.asBuiltinName(), this.asBuiltinName()) and
|
||||
this != result
|
||||
}
|
||||
|
||||
/**
|
||||
* Holds if this element is at the specified location.
|
||||
* The location spans column `startColumn` of line `startLine` to
|
||||
* column `endColumn` of line `endLine` in file `filepath`.
|
||||
* For more information, see
|
||||
* [Providing locations in CodeQL queries](https://codeql.github.com/docs/writing-codeql-queries/providing-locations-in-codeql-queries/).
|
||||
*/
|
||||
predicate hasLocationInfo(
|
||||
string filePath, int startLine, int startColumn, int endLine, int endColumn
|
||||
) {
|
||||
this.asClass()
|
||||
.getLocation()
|
||||
.hasLocationInfo(filePath, startLine, startColumn, endLine, endColumn)
|
||||
or
|
||||
this.isBuiltin() and
|
||||
filePath = "" and
|
||||
startLine = 0 and
|
||||
startColumn = 0 and
|
||||
endLine = 0 and
|
||||
endColumn = 0
|
||||
}
|
||||
}
|
||||
|
||||
predicate incorrectExceptOrder(ExceptStmt ex1, ExceptType cls1, ExceptStmt ex2, ExceptType cls2) {
|
||||
exists(int i, int j, Try t |
|
||||
ex1 = t.getHandler(i) and
|
||||
ex2 = t.getHandler(j) and
|
||||
i < j and
|
||||
cls1 = except_class(ex1) and
|
||||
cls2 = except_class(ex2) and
|
||||
cls1 = cls2.getASuperType()
|
||||
cls1 = exceptClass(ex1) and
|
||||
cls2 = exceptClass(ex2) and
|
||||
cls1 = cls2.getADirectSuperclass*()
|
||||
)
|
||||
}
|
||||
|
||||
ClassValue except_class(ExceptStmt ex) { ex.getType().pointsTo(result) }
|
||||
ExceptType exceptClass(ExceptStmt ex) { ex.getType() = result.getAUse().asExpr() }
|
||||
|
||||
from ExceptStmt ex1, ClassValue cls1, ExceptStmt ex2, ClassValue cls2
|
||||
where incorrect_except_order(ex1, cls1, ex2, cls2)
|
||||
select ex2,
|
||||
"Except block for $@ is unreachable; the more general $@ for $@ will always be executed in preference.",
|
||||
cls2, cls2.getName(), ex1, "except block", cls1, cls1.getName()
|
||||
from ExceptStmt ex1, ExceptType cls1, ExceptStmt ex2, ExceptType cls2, string msg
|
||||
where
|
||||
incorrectExceptOrder(ex1, cls1, ex2, cls2) and
|
||||
if cls1 = cls2
|
||||
then msg = "This except block handling $@ is unreachable; as $@ also handles $@."
|
||||
else
|
||||
msg =
|
||||
"This except block handling $@ is unreachable; as $@ for the more general $@ always subsumes it."
|
||||
select ex2, msg, cls2, cls2.getName(), ex1, "this except block", cls1, cls1.getName()
|
||||
|
||||
@@ -15,12 +15,14 @@
|
||||
|
||||
import python
|
||||
import FileNotAlwaysClosedQuery
|
||||
import codeql.util.Option
|
||||
|
||||
from FileOpen fo, string msg
|
||||
from FileOpen fo, string msg, LocatableOption<Location, DataFlow::Node>::Option exec
|
||||
where
|
||||
fileNotClosed(fo) and
|
||||
msg = "File is opened but is not closed."
|
||||
msg = "File is opened but is not closed." and
|
||||
exec.isNone()
|
||||
or
|
||||
fileMayNotBeClosedOnException(fo, _) and
|
||||
msg = "File may not be closed if an exception is raised."
|
||||
select fo, msg
|
||||
fileMayNotBeClosedOnException(fo, exec.asSome()) and
|
||||
msg = "File may not be closed if $@ raises an exception."
|
||||
select fo, msg, exec, "this operation"
|
||||
|
||||
@@ -34,6 +34,8 @@ class FileWrapperCall extends DataFlow::CallCfgNode {
|
||||
DataFlow::Node wrapped;
|
||||
|
||||
FileWrapperCall() {
|
||||
// Approximation: Treat any passing of a file object to a class constructor as potentially a wrapper
|
||||
// This could be made more precise by checking that the constructor writes the file to a field.
|
||||
wrapped = this.getArg(_).getALocalSource() and
|
||||
this.getFunction() = classTracker(_)
|
||||
or
|
||||
@@ -50,22 +52,15 @@ class FileWrapperCall extends DataFlow::CallCfgNode {
|
||||
|
||||
/** A node where a file is closed. */
|
||||
abstract class FileClose extends DataFlow::CfgNode {
|
||||
/** Holds if this file close will occur if an exception is raised at `raises`. */
|
||||
predicate guardsExceptions(DataFlow::CfgNode raises) {
|
||||
/** Holds if this file close will occur if an exception is raised at `fileRaises`. */
|
||||
predicate guardsExceptions(DataFlow::CfgNode fileRaises) {
|
||||
// The close call occurs after an exception edge in the cfg (a catch or finally)
|
||||
bbReachableRefl(raises.asCfgNode().getBasicBlock().getAnExceptionalSuccessor(),
|
||||
bbReachableRefl(fileRaises.asCfgNode().getBasicBlock().getAnExceptionalSuccessor(),
|
||||
this.asCfgNode().getBasicBlock())
|
||||
or
|
||||
// The exception is after the close call.
|
||||
// A full cfg reachability check is not in general feasible for performance, so we approximate it with:
|
||||
// - A basic block reachability check (here) that works if the expression and close call are in different basic blocks
|
||||
// - A check (in the `WithStatement` override of `guardsExceptions`) for the case where the exception call
|
||||
// is lexically contained in the body of a `with` statement that closes the file.
|
||||
// This may cause FPs in a case such as:
|
||||
// f.close()
|
||||
// f.write("...")
|
||||
// We presume this to not be very common.
|
||||
bbReachableStrict(this.asCfgNode().getBasicBlock(), raises.asCfgNode().getBasicBlock())
|
||||
// A full cfg reachability check is not feasible for performance, instead we use local dataflow
|
||||
fileLocalFlow(this, fileRaises)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -94,11 +89,10 @@ class WithStatement extends FileClose {
|
||||
|
||||
WithStatement() { this.asExpr() = w.getContextExpr() }
|
||||
|
||||
override predicate guardsExceptions(DataFlow::CfgNode raises) {
|
||||
super.guardsExceptions(raises)
|
||||
override predicate guardsExceptions(DataFlow::CfgNode fileRaises) {
|
||||
super.guardsExceptions(fileRaises)
|
||||
or
|
||||
// Check whether the exception is raised in the body of the with statement.
|
||||
raises.asExpr().getParent*() = w.getBody().getAnItem()
|
||||
w.getBody().contains(fileRaises.asExpr())
|
||||
}
|
||||
}
|
||||
|
||||
@@ -131,7 +125,7 @@ private predicate fileLocalFlowHelper1(
|
||||
|
||||
/** Holds if data flows from `source` to `sink`, including file wrapper classes. */
|
||||
pragma[inline]
|
||||
private predicate fileLocalFlow(FileOpen source, DataFlow::Node sink) {
|
||||
private predicate fileLocalFlow(DataFlow::Node source, DataFlow::Node sink) {
|
||||
exists(DataFlow::LocalSourceNode mid | fileLocalFlowHelper1(source, mid) and mid.flowsTo(sink))
|
||||
}
|
||||
|
||||
@@ -171,7 +165,7 @@ predicate fileMayNotBeClosedOnException(FileOpen fo, DataFlow::Node raises) {
|
||||
fileLocalFlow(fo, fileRaised) and
|
||||
not exists(FileClose fc |
|
||||
fileLocalFlow(fo, fc) and
|
||||
fc.guardsExceptions(raises)
|
||||
fc.guardsExceptions(fileRaised)
|
||||
)
|
||||
)
|
||||
}
|
||||
|
||||
@@ -0,0 +1,31 @@
|
||||
from shared_subclass_functions import wrap_in_template
|
||||
import sys
|
||||
import yaml
|
||||
from pathlib import Path
|
||||
|
||||
py_version = sys.version.split()[0]
|
||||
VERSION = f"process-builtin-exceptions 0.0.1; Python {py_version}"
|
||||
|
||||
builtins_model_path = Path(__file__).parent.parent.parent.parent / "lib/semmle/python/frameworks/builtins.model.yml"
|
||||
|
||||
def write_data(data, path: Path):
|
||||
f = path.open("w+")
|
||||
f.write(f"# {VERSION}\n")
|
||||
yaml.dump(data, indent=2, stream=f, Dumper=yaml.CDumper)
|
||||
|
||||
builtin_names = dir(__builtins__)
|
||||
builtin_dict = {x: getattr(__builtins__,x) for x in builtin_names}
|
||||
|
||||
|
||||
builtin_exceptions = {v for v in builtin_dict.values() if type(v) is type and issubclass(v, BaseException)}
|
||||
|
||||
data = []
|
||||
for sub in builtin_exceptions:
|
||||
for base in sub.__mro__:
|
||||
if issubclass(base, BaseException):
|
||||
basename = base.__name__
|
||||
subname = sub.__name__
|
||||
row = [f"builtins.{basename}~Subclass", f"builtins.{subname}", ""]
|
||||
data.append(row)
|
||||
|
||||
write_data(wrap_in_template(data), builtins_model_path)
|
||||
@@ -1,2 +1,2 @@
|
||||
| exceptions_test.py:7:5:7:11 | ExceptStmt | Except block directly handles BaseException. |
|
||||
| exceptions_test.py:71:5:71:25 | ExceptStmt | Except block directly handles BaseException. |
|
||||
| exceptions_test.py:97:5:97:25 | ExceptStmt | Except block directly handles BaseException. |
|
||||
|
||||
@@ -1,2 +1,5 @@
|
||||
| exceptions_test.py:7:5:7:11 | ExceptStmt | 'except' clause does nothing but pass and there is no explanatory comment. |
|
||||
| exceptions_test.py:13:5:13:21 | ExceptStmt | 'except' clause does nothing but pass and there is no explanatory comment. |
|
||||
| exceptions_test.py:72:1:72:18 | ExceptStmt | 'except' clause does nothing but pass and there is no explanatory comment. |
|
||||
| exceptions_test.py:85:1:85:17 | ExceptStmt | 'except' clause does nothing but pass and there is no explanatory comment. |
|
||||
| exceptions_test.py:89:1:89:17 | ExceptStmt | 'except' clause does nothing but pass and there is no explanatory comment. |
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
| exceptions_test.py:51:5:51:25 | ExceptStmt | Non-exception $@ in exception handler which will never match raised exception. | exceptions_test.py:33:1:33:28 | ControlFlowNode for ClassExpr | class 'NotException1' |
|
||||
| exceptions_test.py:54:5:54:25 | ExceptStmt | Non-exception $@ in exception handler which will never match raised exception. | exceptions_test.py:36:1:36:28 | ControlFlowNode for ClassExpr | class 'NotException2' |
|
||||
| exceptions_test.py:112:5:112:22 | ExceptStmt | Non-exception $@ in exception handler which will never match raised exception. | exceptions_test.py:107:12:107:14 | ControlFlowNode for FloatLiteral | instance of 'float' |
|
||||
| exceptions_test.py:138:5:138:22 | ExceptStmt | Non-exception $@ in exception handler which will never match raised exception. | exceptions_test.py:133:12:133:14 | ControlFlowNode for FloatLiteral | instance of 'float' |
|
||||
| pypy_test.py:14:5:14:14 | ExceptStmt | Non-exception $@ in exception handler which will never match raised exception. | pypy_test.py:14:12:14:13 | ControlFlowNode for IntegerLiteral | instance of 'int' |
|
||||
|
||||
@@ -1 +1 @@
|
||||
| exceptions_test.py:64:1:64:22 | ExceptStmt | Except block for $@ is unreachable; the more general $@ for $@ will always be executed in preference. | file://:0:0:0:0 | builtin-class AttributeError | AttributeError | exceptions_test.py:62:1:62:17 | ExceptStmt | except block | file://:0:0:0:0 | builtin-class Exception | Exception |
|
||||
| exceptions_test.py:64:1:64:22 | ExceptStmt | This except block handling $@ is unreachable; as $@ for the more general $@ always subsumes it. | file://:0:0:0:0 | AttributeError | AttributeError | exceptions_test.py:62:1:62:17 | ExceptStmt | this except block | file://:0:0:0:0 | Exception | Exception |
|
||||
|
||||
@@ -1 +1,2 @@
|
||||
Exceptions/IncorrectExceptOrder.ql
|
||||
query: Exceptions/IncorrectExceptOrder.ql
|
||||
postprocess: utils/test/InlineExpectationsTestQuery.ql
|
||||
@@ -1,2 +1,2 @@
|
||||
| exceptions_test.py:170:11:170:24 | NotImplemented | NotImplemented is not an Exception. Did you mean NotImplementedError? |
|
||||
| exceptions_test.py:173:11:173:26 | NotImplemented() | NotImplemented is not an Exception. Did you mean NotImplementedError? |
|
||||
| exceptions_test.py:196:11:196:24 | NotImplemented | NotImplemented is not an Exception. Did you mean NotImplementedError? |
|
||||
| exceptions_test.py:199:11:199:26 | NotImplemented() | NotImplemented is not an Exception. Did you mean NotImplementedError? |
|
||||
|
||||
@@ -61,9 +61,35 @@ try:
|
||||
val.attr
|
||||
except Exception:
|
||||
print (2)
|
||||
except AttributeError:
|
||||
except AttributeError: # $Alert[py/unreachable-except]
|
||||
print (3)
|
||||
|
||||
class MyExc(ValueError):
|
||||
pass
|
||||
|
||||
try:
|
||||
pass
|
||||
except ValueError:
|
||||
pass
|
||||
except MyExc: # $MISSING:Alert[py/unreachable-except] # Missing due to dataflow limitiation preventing MyExc from being tracked here.
|
||||
pass
|
||||
|
||||
class MyBaseExc(Exception):
|
||||
pass
|
||||
|
||||
class MySubExc(MyBaseExc):
|
||||
pass
|
||||
|
||||
try:
|
||||
pass
|
||||
except MyBaseExc:
|
||||
pass
|
||||
except MySubExc: # $MISSING:Alert[py/unreachable-except] # Missing due to dataflow limitation preventing MyExc from being tracked here.
|
||||
pass
|
||||
except Exception:
|
||||
pass
|
||||
|
||||
|
||||
#Catch BaseException
|
||||
def catch_base_exception():
|
||||
try:
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
| resources_test.py:4:10:4:25 | ControlFlowNode for open() | File may not be closed if $@ raises an exception. | resources_test.py:5:5:5:33 | ControlFlowNode for Attribute() | this operation |
|
||||
| resources_test.py:9:10:9:25 | ControlFlowNode for open() | File is opened but is not closed. | file://:0:0:0:0 | (none) | this operation |
|
||||
| resources_test.py:108:11:108:20 | ControlFlowNode for open() | File is opened but is not closed. | file://:0:0:0:0 | (none) | this operation |
|
||||
| resources_test.py:112:11:112:28 | ControlFlowNode for opener_func2() | File may not be closed if $@ raises an exception. | resources_test.py:113:5:113:22 | ControlFlowNode for Attribute() | this operation |
|
||||
| resources_test.py:123:11:123:24 | ControlFlowNode for opener_func2() | File is opened but is not closed. | file://:0:0:0:0 | (none) | this operation |
|
||||
| resources_test.py:129:15:129:24 | ControlFlowNode for open() | File may not be closed if $@ raises an exception. | resources_test.py:130:9:130:26 | ControlFlowNode for Attribute() | this operation |
|
||||
| resources_test.py:248:11:248:25 | ControlFlowNode for open() | File is opened but is not closed. | file://:0:0:0:0 | (none) | this operation |
|
||||
| resources_test.py:269:10:269:27 | ControlFlowNode for Attribute() | File may not be closed if $@ raises an exception. | resources_test.py:271:5:271:19 | ControlFlowNode for Attribute() | this operation |
|
||||
| resources_test.py:285:11:285:20 | ControlFlowNode for open() | File may not be closed if $@ raises an exception. | resources_test.py:287:5:287:31 | ControlFlowNode for Attribute() | this operation |
|
||||
@@ -0,0 +1,2 @@
|
||||
query: Resources/FileNotAlwaysClosed.ql
|
||||
postprocess: utils/test/InlineExpectationsTestQuery.ql
|
||||
@@ -1,12 +1,12 @@
|
||||
#File not always closed
|
||||
|
||||
def not_close1():
|
||||
f1 = open("filename") # $ notClosedOnException
|
||||
f1 = open("filename") # $ Alert # not closed on exception
|
||||
f1.write("Error could occur")
|
||||
f1.close()
|
||||
|
||||
def not_close2():
|
||||
f2 = open("filename") # $ notClosed
|
||||
f2 = open("filename") # $ Alert
|
||||
|
||||
def closed3():
|
||||
f3 = open("filename")
|
||||
@@ -46,7 +46,7 @@ def closed7():
|
||||
def not_closed8():
|
||||
f8 = None
|
||||
try:
|
||||
f8 = open("filename") # $ MISSING:notClosedOnException
|
||||
f8 = open("filename") # $ MISSING:Alert # not closed on exception
|
||||
f8.write("Error could occur")
|
||||
finally:
|
||||
if f8 is None: # We don't precisely consider this condition, so this result is MISSING. However, this seems uncommon.
|
||||
@@ -105,11 +105,11 @@ def opener_func2(name):
|
||||
return t1
|
||||
|
||||
def not_closed13(name):
|
||||
f13 = open(name) # $ notClosed
|
||||
f13 = open(name) # $ Alert
|
||||
f13.write("Hello")
|
||||
|
||||
def may_not_be_closed14(name):
|
||||
f14 = opener_func2(name) # $ notClosedOnException
|
||||
f14 = opener_func2(name) # $ Alert # not closed on exception
|
||||
f14.write("Hello")
|
||||
f14.close()
|
||||
|
||||
@@ -120,13 +120,13 @@ def closer2(t3):
|
||||
closer1(t3)
|
||||
|
||||
def closed15():
|
||||
f15 = opener_func2() # $ SPURIOUS:notClosed
|
||||
f15 = opener_func2() # $ SPURIOUS:Alert
|
||||
closer2(f15) # We don't detect that this call closes the file, so this result is SPURIOUS.
|
||||
|
||||
|
||||
def may_not_be_closed16(name):
|
||||
try:
|
||||
f16 = open(name) # $ notClosedOnException
|
||||
f16 = open(name) # $ Alert # not closed on exception
|
||||
f16.write("Hello")
|
||||
f16.close()
|
||||
except IOError:
|
||||
@@ -138,7 +138,7 @@ def may_raise():
|
||||
|
||||
#Not handling all exceptions, but we'll tolerate the false negative
|
||||
def not_closed17():
|
||||
f17 = open("filename") # $ MISSING:notClosedOnException
|
||||
f17 = open("filename") # $ MISSING:Alert # not closed on exception
|
||||
try:
|
||||
f17.write("IOError could occur")
|
||||
f17.write("IOError could occur")
|
||||
@@ -234,7 +234,7 @@ def closed21(path):
|
||||
|
||||
|
||||
def not_closed22(path):
|
||||
f22 = open(path, "wb") # $ MISSING:notClosedOnException
|
||||
f22 = open(path, "wb") # $ MISSING:Alert # not closed on exception
|
||||
try:
|
||||
f22.write(b"foo")
|
||||
may_raise()
|
||||
@@ -245,7 +245,7 @@ def not_closed22(path):
|
||||
f22.close()
|
||||
|
||||
def not_closed23(path):
|
||||
f23 = open(path, "w") # $ notClosed
|
||||
f23 = open(path, "w") # $ Alert
|
||||
wr = FileWrapper(f23)
|
||||
|
||||
def closed24(path):
|
||||
@@ -266,7 +266,7 @@ def closed26(path):
|
||||
os.close(fd)
|
||||
|
||||
def not_closed27(path):
|
||||
fd = os.open(path, "w") # $notClosedOnException
|
||||
fd = os.open(path, "w") # $Alert # not closed on exception
|
||||
f27 = os.fdopen(fd, "w")
|
||||
f27.write("hi")
|
||||
f27.close()
|
||||
@@ -282,6 +282,53 @@ def closed28(path):
|
||||
def closed29(path):
|
||||
# Due to an approximation in CFG reachability for performance, it is not detected that the `write` call that may raise occurs after the file has already been closed.
|
||||
# We presume this case to be uncommon.
|
||||
f28 = open(path) # $SPURIOUS:notClosedOnException
|
||||
f28 = open(path) # $SPURIOUS:Alert # not closed on exception
|
||||
f28.close()
|
||||
f28.write("already closed")
|
||||
|
||||
# False positive in a previous implementation:
|
||||
|
||||
class NotWrapper:
|
||||
def __init__(self, fp):
|
||||
self.data = fp.read()
|
||||
fp.close()
|
||||
|
||||
def do_something(self):
|
||||
pass
|
||||
|
||||
def closed30(path):
|
||||
# Combination of approximations resulted in this FP:
|
||||
# - NotWrapper is treated as a wrapper class as a file handle is passed to it
|
||||
# - thing.do_something() is treated as a call that can raise an exception while a file is open
|
||||
# - this call is treated as occurring after the open but not as being guarded by the with statement, as it is in the same basic block
|
||||
# - - this behavior has been changed fixing the FP
|
||||
|
||||
with open(path) as fp: # No longer spurious alert here.
|
||||
thing = NotWrapper(fp)
|
||||
|
||||
thing.do_something()
|
||||
|
||||
|
||||
def closed31(path):
|
||||
with open(path) as fp:
|
||||
data = fp.readline()
|
||||
data2 = fp.readline()
|
||||
|
||||
|
||||
class Wrapper():
|
||||
def __init__(self, f):
|
||||
self.f = f
|
||||
def read(self):
|
||||
return self.f.read()
|
||||
def __enter__(self):
|
||||
pass
|
||||
def __exit__(self,exc_type, exc_value,traceback):
|
||||
self.f.close()
|
||||
|
||||
def closed32(path):
|
||||
with open(path, "rb") as f: # No longer spurious alert here.
|
||||
wrap = Wrapper(f)
|
||||
# This resulted in an FP in a previous implementation,
|
||||
# due to a check that an operation is lexically contained within a `with` block (with `expr.getParent*()`)
|
||||
# not detecting this case.
|
||||
return list(wrap.read())
|
||||
@@ -1,25 +0,0 @@
|
||||
import python
|
||||
import Resources.FileNotAlwaysClosedQuery
|
||||
import utils.test.InlineExpectationsTest
|
||||
|
||||
module MethodArgTest implements TestSig {
|
||||
string getARelevantTag() { result = ["notClosed", "notClosedOnException"] }
|
||||
|
||||
predicate hasActualResult(Location location, string element, string tag, string value) {
|
||||
exists(DataFlow::CfgNode el, FileOpen fo |
|
||||
el = fo and
|
||||
element = el.toString() and
|
||||
location = el.getLocation() and
|
||||
value = "" and
|
||||
(
|
||||
fileNotClosed(fo) and
|
||||
tag = "notClosed"
|
||||
or
|
||||
fileMayNotBeClosedOnException(fo, _) and
|
||||
tag = "notClosedOnException"
|
||||
)
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
import MakeTest<MethodArgTest>
|
||||
@@ -6252,7 +6252,8 @@ joinBlockPredecessor
|
||||
| break_ensure.rb:20:7:22:9 | [ensure: exception] if ... | break_ensure.rb:21:9:21:20 | [ensure: exception] self | 1 |
|
||||
| break_ensure.rb:20:7:22:9 | if ... | break_ensure.rb:16:7:18:9 | if ... | 0 |
|
||||
| break_ensure.rb:20:7:22:9 | if ... | break_ensure.rb:21:9:21:20 | self | 1 |
|
||||
| break_ensure.rb:27:1:42:3 | exit m3 | break_ensure.rb:33:5:39:7 | [ensure: exception] while ... | 0 |
|
||||
| break_ensure.rb:27:1:42:3 | exit m3 | break_ensure.rb:27:1:42:3 | exit m3 (normal) | 0 |
|
||||
| break_ensure.rb:27:1:42:3 | exit m3 | break_ensure.rb:33:5:39:7 | [ensure: exception] while ... | 1 |
|
||||
| break_ensure.rb:27:1:42:3 | exit m3 (normal) | break_ensure.rb:33:5:39:7 | [ensure: return] while ... | 1 |
|
||||
| break_ensure.rb:27:1:42:3 | exit m3 (normal) | break_ensure.rb:33:5:39:7 | while ... | 0 |
|
||||
| break_ensure.rb:33:5:39:7 | [ensure: exception] while ... | break_ensure.rb:33:11:33:11 | [ensure: exception] y | 0 |
|
||||
@@ -6286,20 +6287,25 @@ joinBlockPredecessor
|
||||
| case.rb:9:3:17:5 | case ... | case.rb:14:25:14:25 | 6 | 3 |
|
||||
| case.rb:9:3:17:5 | case ... | case.rb:15:28:15:28 | 7 | 4 |
|
||||
| case.rb:9:3:17:5 | case ... | case.rb:16:10:16:10 | 8 | 5 |
|
||||
| case.rb:20:1:24:3 | exit case_match_no_match | case.rb:21:3:23:5 | case ... | 0 |
|
||||
| case.rb:26:1:30:3 | exit case_match_raise | case.rb:27:3:29:5 | case ... | 0 |
|
||||
| case.rb:32:1:39:3 | exit case_match_array | case.rb:33:3:38:5 | case ... | 0 |
|
||||
| case.rb:20:1:24:3 | exit case_match_no_match | case.rb:20:1:24:3 | exit case_match_no_match (abnormal) | 0 |
|
||||
| case.rb:20:1:24:3 | exit case_match_no_match | case.rb:21:3:23:5 | case ... | 1 |
|
||||
| case.rb:26:1:30:3 | exit case_match_raise | case.rb:26:1:30:3 | exit case_match_raise (abnormal) | 0 |
|
||||
| case.rb:26:1:30:3 | exit case_match_raise | case.rb:27:3:29:5 | case ... | 1 |
|
||||
| case.rb:32:1:39:3 | exit case_match_array | case.rb:32:1:39:3 | exit case_match_array (abnormal) | 0 |
|
||||
| case.rb:32:1:39:3 | exit case_match_array | case.rb:33:3:38:5 | case ... | 1 |
|
||||
| case.rb:32:1:39:3 | exit case_match_array (abnormal) | case.rb:37:5:37:27 | in ... then ... | 0 |
|
||||
| case.rb:32:1:39:3 | exit case_match_array (abnormal) | case.rb:37:8:37:26 | [ ..., * ] | 1 |
|
||||
| case.rb:33:3:38:5 | case ... | case.rb:32:1:39:3 | enter case_match_array | 0 |
|
||||
| case.rb:33:3:38:5 | case ... | case.rb:35:9:35:9 | x | 1 |
|
||||
| case.rb:33:3:38:5 | case ... | case.rb:36:9:36:9 | x | 2 |
|
||||
| case.rb:33:3:38:5 | case ... | case.rb:37:25:37:25 | e | 3 |
|
||||
| case.rb:41:1:45:3 | exit case_match_find | case.rb:43:20:43:20 | y | 0 |
|
||||
| case.rb:41:1:45:3 | exit case_match_find | case.rb:41:1:45:3 | exit case_match_find (abnormal) | 0 |
|
||||
| case.rb:41:1:45:3 | exit case_match_find | case.rb:43:20:43:20 | y | 1 |
|
||||
| case.rb:41:1:45:3 | exit case_match_find (abnormal) | case.rb:41:1:45:3 | enter case_match_find | 0 |
|
||||
| case.rb:41:1:45:3 | exit case_match_find (abnormal) | case.rb:43:10:43:10 | x | 1 |
|
||||
| case.rb:41:1:45:3 | exit case_match_find (abnormal) | case.rb:43:16:43:16 | 2 | 2 |
|
||||
| case.rb:47:1:53:3 | exit case_match_hash | case.rb:48:3:52:5 | case ... | 0 |
|
||||
| case.rb:47:1:53:3 | exit case_match_hash | case.rb:47:1:53:3 | exit case_match_hash (abnormal) | 0 |
|
||||
| case.rb:47:1:53:3 | exit case_match_hash | case.rb:48:3:52:5 | case ... | 1 |
|
||||
| case.rb:47:1:53:3 | exit case_match_hash (abnormal) | case.rb:51:5:51:17 | in ... then ... | 0 |
|
||||
| case.rb:47:1:53:3 | exit case_match_hash (abnormal) | case.rb:51:8:51:16 | { ..., ** } | 1 |
|
||||
| case.rb:48:3:52:5 | case ... | case.rb:49:29:49:32 | rest | 0 |
|
||||
@@ -6315,7 +6321,8 @@ joinBlockPredecessor
|
||||
| case.rb:56:3:60:5 | case ... | case.rb:58:5:58:10 | in ... then ... | 1 |
|
||||
| case.rb:64:3:66:5 | case ... | case.rb:63:1:67:3 | enter case_match_underscore | 0 |
|
||||
| case.rb:64:3:66:5 | case ... | case.rb:65:12:65:12 | _ | 1 |
|
||||
| case.rb:69:1:93:3 | exit case_match_various | case.rb:72:3:92:5 | case ... | 0 |
|
||||
| case.rb:69:1:93:3 | exit case_match_various | case.rb:69:1:93:3 | exit case_match_various (abnormal) | 0 |
|
||||
| case.rb:69:1:93:3 | exit case_match_various | case.rb:72:3:92:5 | case ... | 1 |
|
||||
| case.rb:72:3:92:5 | case ... | case.rb:69:1:93:3 | enter case_match_various | 0 |
|
||||
| case.rb:72:3:92:5 | case ... | case.rb:74:5:74:11 | in ... then ... | 1 |
|
||||
| case.rb:72:3:92:5 | case ... | case.rb:75:5:75:15 | in ... then ... | 2 |
|
||||
@@ -6347,7 +6354,8 @@ joinBlockPredecessor
|
||||
| case.rb:72:3:92:5 | case ... | case.rb:91:13:91:14 | "" | 28 |
|
||||
| case.rb:72:3:92:5 | case ... | case.rb:91:18:91:19 | [ ..., * ] | 29 |
|
||||
| case.rb:72:3:92:5 | case ... | case.rb:91:23:91:24 | { ..., ** } | 30 |
|
||||
| case.rb:95:1:99:3 | exit case_match_guard_no_else | case.rb:97:25:97:25 | 6 | 0 |
|
||||
| case.rb:95:1:99:3 | exit case_match_guard_no_else | case.rb:95:1:99:3 | exit case_match_guard_no_else (abnormal) | 0 |
|
||||
| case.rb:95:1:99:3 | exit case_match_guard_no_else | case.rb:97:25:97:25 | 6 | 1 |
|
||||
| cfg.html.erb:18:14:22:16 | if ... | cfg.html.erb:19:19:19:32 | self | 0 |
|
||||
| cfg.html.erb:18:14:22:16 | if ... | cfg.html.erb:21:19:21:32 | self | 1 |
|
||||
| cfg.rb:41:1:45:3 | case ... | cfg.rb:42:15:42:24 | self | 0 |
|
||||
@@ -6454,7 +6462,8 @@ joinBlockPredecessor
|
||||
| loops.rb:31:9:31:9 | x | loops.rb:31:15:32:5 | do ... | 1 |
|
||||
| raise.rb:7:1:12:3 | exit m1 | raise.rb:8:3:10:5 | if ... | 0 |
|
||||
| raise.rb:7:1:12:3 | exit m1 | raise.rb:9:5:9:17 | self | 1 |
|
||||
| raise.rb:14:1:23:3 | exit m2 | raise.rb:22:3:22:15 | self | 0 |
|
||||
| raise.rb:14:1:23:3 | exit m2 | raise.rb:14:1:23:3 | exit m2 (abnormal) | 0 |
|
||||
| raise.rb:14:1:23:3 | exit m2 | raise.rb:22:3:22:15 | self | 1 |
|
||||
| raise.rb:22:3:22:15 | self | raise.rb:16:5:18:7 | if ... | 0 |
|
||||
| raise.rb:22:3:22:15 | self | raise.rb:20:5:20:18 | self | 1 |
|
||||
| raise.rb:33:3:33:15 | self | raise.rb:27:5:29:7 | if ... | 0 |
|
||||
@@ -6463,25 +6472,30 @@ joinBlockPredecessor
|
||||
| raise.rb:44:3:44:15 | self | raise.rb:39:7:39:22 | self | 1 |
|
||||
| raise.rb:54:3:54:15 | self | raise.rb:49:5:51:7 | if ... | 0 |
|
||||
| raise.rb:54:3:54:15 | self | raise.rb:50:7:50:22 | self | 1 |
|
||||
| raise.rb:57:1:66:3 | exit m6 | raise.rb:65:3:65:15 | self | 0 |
|
||||
| raise.rb:57:1:66:3 | exit m6 | raise.rb:57:1:66:3 | exit m6 (abnormal) | 0 |
|
||||
| raise.rb:57:1:66:3 | exit m6 | raise.rb:65:3:65:15 | self | 1 |
|
||||
| raise.rb:62:36:62:36 | e | raise.rb:60:7:60:22 | self | 0 |
|
||||
| raise.rb:62:36:62:36 | e | raise.rb:62:22:62:31 | ExceptionB | 1 |
|
||||
| raise.rb:65:3:65:15 | self | raise.rb:59:5:61:7 | if ... | 0 |
|
||||
| raise.rb:65:3:65:15 | self | raise.rb:62:36:62:36 | e | 1 |
|
||||
| raise.rb:68:1:77:3 | exit m7 | raise.rb:76:3:76:15 | [ensure: exception] self | 0 |
|
||||
| raise.rb:68:1:77:3 | exit m7 | raise.rb:68:1:77:3 | exit m7 (normal) | 0 |
|
||||
| raise.rb:68:1:77:3 | exit m7 | raise.rb:76:3:76:15 | [ensure: exception] self | 1 |
|
||||
| raise.rb:68:1:77:3 | exit m7 (normal) | raise.rb:72:13:72:17 | x < 0 | 0 |
|
||||
| raise.rb:68:1:77:3 | exit m7 (normal) | raise.rb:76:3:76:15 | self | 1 |
|
||||
| raise.rb:76:3:76:15 | [ensure: exception] self | raise.rb:68:1:77:3 | enter m7 | 0 |
|
||||
| raise.rb:76:3:76:15 | [ensure: exception] self | raise.rb:70:5:70:17 | self | 1 |
|
||||
| raise.rb:76:3:76:15 | [ensure: exception] self | raise.rb:71:3:72:18 | elsif ... | 2 |
|
||||
| raise.rb:76:3:76:15 | [ensure: exception] self | raise.rb:71:9:71:9 | x | 3 |
|
||||
| raise.rb:79:1:92:3 | exit m8 | raise.rb:89:5:89:17 | [ensure: exception] self | 0 |
|
||||
| raise.rb:79:1:92:3 | exit m8 | raise.rb:79:1:92:3 | exit m8 (normal) | 0 |
|
||||
| raise.rb:79:1:92:3 | exit m8 | raise.rb:89:5:89:17 | [ensure: exception] self | 1 |
|
||||
| raise.rb:79:1:92:3 | exit m8 (normal) | raise.rb:85:15:85:19 | x < 0 | 0 |
|
||||
| raise.rb:79:1:92:3 | exit m8 (normal) | raise.rb:89:5:89:17 | self | 1 |
|
||||
| raise.rb:89:5:89:17 | [ensure: exception] self | raise.rb:79:1:92:3 | enter m8 | 0 |
|
||||
| raise.rb:89:5:89:17 | [ensure: exception] self | raise.rb:83:7:83:19 | self | 1 |
|
||||
| raise.rb:89:5:89:17 | [ensure: exception] self | raise.rb:84:5:85:20 | elsif ... | 2 |
|
||||
| raise.rb:89:5:89:17 | [ensure: exception] self | raise.rb:84:11:84:11 | x | 3 |
|
||||
| raise.rb:94:1:119:3 | exit m9 | raise.rb:94:1:119:3 | exit m9 (abnormal) | 1 |
|
||||
| raise.rb:94:1:119:3 | exit m9 | raise.rb:94:1:119:3 | exit m9 (normal) | 0 |
|
||||
| raise.rb:94:1:119:3 | exit m9 (abnormal) | raise.rb:116:3:118:5 | [ensure: exception] if ... | 0 |
|
||||
| raise.rb:94:1:119:3 | exit m9 (abnormal) | raise.rb:117:5:117:22 | [ensure: exception] self | 2 |
|
||||
| raise.rb:94:1:119:3 | exit m9 (abnormal) | raise.rb:117:5:117:22 | [ensure: return] self | 3 |
|
||||
@@ -6520,6 +6534,8 @@ joinBlockPredecessor
|
||||
| raise.rb:155:16:155:50 | exit { ... } | raise.rb:155:25:155:48 | ... if ... | 0 |
|
||||
| raise.rb:160:9:162:7 | exit -> { ... } | raise.rb:161:7:161:14 | self | 1 |
|
||||
| raise.rb:160:9:162:7 | exit -> { ... } | raise.rb:161:7:161:23 | ... unless ... | 0 |
|
||||
| raise.rb:172:1:182:3 | exit m16 | raise.rb:172:1:182:3 | exit m16 (abnormal) | 1 |
|
||||
| raise.rb:172:1:182:3 | exit m16 | raise.rb:172:1:182:3 | exit m16 (normal) | 0 |
|
||||
| raise.rb:172:1:182:3 | exit m16 (normal) | raise.rb:175:14:175:14 | 1 | 0 |
|
||||
| raise.rb:172:1:182:3 | exit m16 (normal) | raise.rb:177:14:177:14 | 2 | 1 |
|
||||
| raise.rb:172:1:182:3 | exit m16 (normal) | raise.rb:180:12:180:12 | 3 | 2 |
|
||||
|
||||
@@ -14,6 +14,7 @@ ql/rust/ql/src/queries/security/CWE-089/SqlInjection.ql
|
||||
ql/rust/ql/src/queries/security/CWE-311/CleartextTransmission.ql
|
||||
ql/rust/ql/src/queries/security/CWE-312/CleartextLogging.ql
|
||||
ql/rust/ql/src/queries/security/CWE-312/CleartextStorageDatabase.ql
|
||||
ql/rust/ql/src/queries/security/CWE-319/UseOfHttp.ql
|
||||
ql/rust/ql/src/queries/security/CWE-327/BrokenCryptoAlgorithm.ql
|
||||
ql/rust/ql/src/queries/security/CWE-328/WeakSensitiveDataHashing.ql
|
||||
ql/rust/ql/src/queries/security/CWE-770/UncontrolledAllocationSize.ql
|
||||
|
||||
@@ -15,6 +15,7 @@ ql/rust/ql/src/queries/security/CWE-117/LogInjection.ql
|
||||
ql/rust/ql/src/queries/security/CWE-311/CleartextTransmission.ql
|
||||
ql/rust/ql/src/queries/security/CWE-312/CleartextLogging.ql
|
||||
ql/rust/ql/src/queries/security/CWE-312/CleartextStorageDatabase.ql
|
||||
ql/rust/ql/src/queries/security/CWE-319/UseOfHttp.ql
|
||||
ql/rust/ql/src/queries/security/CWE-327/BrokenCryptoAlgorithm.ql
|
||||
ql/rust/ql/src/queries/security/CWE-328/WeakSensitiveDataHashing.ql
|
||||
ql/rust/ql/src/queries/security/CWE-696/BadCtorInitialization.ql
|
||||
|
||||
@@ -15,6 +15,7 @@ ql/rust/ql/src/queries/security/CWE-117/LogInjection.ql
|
||||
ql/rust/ql/src/queries/security/CWE-311/CleartextTransmission.ql
|
||||
ql/rust/ql/src/queries/security/CWE-312/CleartextLogging.ql
|
||||
ql/rust/ql/src/queries/security/CWE-312/CleartextStorageDatabase.ql
|
||||
ql/rust/ql/src/queries/security/CWE-319/UseOfHttp.ql
|
||||
ql/rust/ql/src/queries/security/CWE-327/BrokenCryptoAlgorithm.ql
|
||||
ql/rust/ql/src/queries/security/CWE-328/WeakSensitiveDataHashing.ql
|
||||
ql/rust/ql/src/queries/security/CWE-770/UncontrolledAllocationSize.ql
|
||||
|
||||
@@ -4,3 +4,9 @@ extensions:
|
||||
extensible: sourceModel
|
||||
data:
|
||||
- ["<async_std::net::tcp::stream::TcpStream>::connect", "ReturnValue.Future.Field[core::result::Result::Ok(0)]", "remote", "manual"]
|
||||
- addsTo:
|
||||
pack: codeql/rust-all
|
||||
extensible: summaryModel
|
||||
data:
|
||||
- ["<_ as async_std::io::read::ReadExt>::read", "Argument[self]", "Argument[0].Reference", "taint", "manual"]
|
||||
- ["<_ as async_std::io::read::ReadExt>::read", "Argument[self].Reference", "Argument[0].Reference", "taint", "manual"]
|
||||
@@ -72,9 +72,27 @@ private ItemNode getAChildSuccessor(ItemNode item, string name, SuccessorKind ki
|
||||
if item instanceof ImplOrTraitItemNode and result instanceof AssocItem
|
||||
then kind.isExternal()
|
||||
else
|
||||
if result instanceof Use
|
||||
then kind.isInternal()
|
||||
else kind.isBoth()
|
||||
if result.isPublic()
|
||||
then kind.isBoth()
|
||||
else kind.isInternal()
|
||||
)
|
||||
}
|
||||
|
||||
/**
|
||||
* Holds if `n` is superseded by an attribute macro expansion. That is, `n` is
|
||||
* an item or a transitive child of an item with an attribute macro expansion.
|
||||
*/
|
||||
predicate supersededByAttributeMacroExpansion(AstNode n) {
|
||||
n.(Item).hasAttributeMacroExpansion()
|
||||
or
|
||||
exists(AstNode parent |
|
||||
n.getParentNode() = parent and
|
||||
supersededByAttributeMacroExpansion(parent) and
|
||||
// Don't exclude expansions themselves as they supercede other nodes.
|
||||
not n = parent.(Item).getAttributeMacroExpansion() and
|
||||
// Don't consider attributes themselves to be superseded. E.g., in `#[a] fn
|
||||
// f() {}` the macro expansion supercedes `fn f() {}` but not `#[a]`.
|
||||
not n instanceof Attr
|
||||
)
|
||||
}
|
||||
|
||||
@@ -156,6 +174,11 @@ private ItemNode getAChildSuccessor(ItemNode item, string name, SuccessorKind ki
|
||||
* - https://doc.rust-lang.org/reference/names/namespaces.html
|
||||
*/
|
||||
abstract class ItemNode extends Locatable {
|
||||
ItemNode() {
|
||||
// Exclude items that are superseded by the expansion of an attribute macro.
|
||||
not supersededByAttributeMacroExpansion(this)
|
||||
}
|
||||
|
||||
/** Gets the (original) name of this item. */
|
||||
abstract string getName();
|
||||
|
||||
@@ -165,6 +188,20 @@ abstract class ItemNode extends Locatable {
|
||||
/** Gets the visibility of this item, if any. */
|
||||
abstract Visibility getVisibility();
|
||||
|
||||
/**
|
||||
* Holds if this item is public.
|
||||
*
|
||||
* This is the case when this item either has `pub` visibility (but is not
|
||||
* a `use`; a `use` itself is not visible from the outside), or when this
|
||||
* item is a variant.
|
||||
*/
|
||||
predicate isPublic() {
|
||||
exists(this.getVisibility()) and
|
||||
not this instanceof Use
|
||||
or
|
||||
this instanceof Variant
|
||||
}
|
||||
|
||||
/** Gets the `i`th type parameter of this item, if any. */
|
||||
abstract TypeParam getTypeParam(int i);
|
||||
|
||||
@@ -380,9 +417,7 @@ abstract private class ModuleLikeNode extends ItemNode {
|
||||
|
||||
private class SourceFileItemNode extends ModuleLikeNode, SourceFile {
|
||||
pragma[nomagic]
|
||||
ModuleLikeNode getSuper() {
|
||||
result = any(ModuleItemNode mod | fileImport(mod, this)).getASuccessor("super")
|
||||
}
|
||||
ModuleLikeNode getSuper() { fileImport(result.getAnItemInScope(), this) }
|
||||
|
||||
override string getName() { result = "(source file)" }
|
||||
|
||||
@@ -648,11 +683,7 @@ final class ImplItemNode extends ImplOrTraitItemNode instanceof Impl {
|
||||
|
||||
override Visibility getVisibility() { result = Impl.super.getVisibility() }
|
||||
|
||||
TypeParamItemNode getBlanketImplementationTypeParam() {
|
||||
result = this.resolveSelfTy() and
|
||||
// This impl block is not superseded by the expansion of an attribute macro.
|
||||
not exists(super.getAttributeMacroExpansion())
|
||||
}
|
||||
TypeParamItemNode getBlanketImplementationTypeParam() { result = this.resolveSelfTy() }
|
||||
|
||||
/**
|
||||
* Holds if this impl block is a blanket implementation. That is, the
|
||||
@@ -1300,7 +1331,8 @@ private predicate useTreeDeclares(UseTree tree, string name) {
|
||||
*/
|
||||
pragma[nomagic]
|
||||
private predicate declaresDirectly(ItemNode item, Namespace ns, string name) {
|
||||
exists(ItemNode child, SuccessorKind kind | child = getAChildSuccessor(item, name, kind) |
|
||||
exists(ItemNode child, SuccessorKind kind |
|
||||
child = getAChildSuccessor(item, name, kind) and
|
||||
child.getNamespace() = ns and
|
||||
kind.isInternalOrBoth()
|
||||
)
|
||||
@@ -1491,6 +1523,13 @@ private ItemNode resolvePathCandQualifier(RelevantPath qualifier, RelevantPath p
|
||||
name = path.getText()
|
||||
}
|
||||
|
||||
pragma[nomagic]
|
||||
private Crate getCrate0(Locatable l) { result.getASourceFile().getFile() = l.getFile() }
|
||||
|
||||
bindingset[l]
|
||||
pragma[inline_late]
|
||||
private Crate getCrate(Locatable l) { result = getCrate0(l) }
|
||||
|
||||
/**
|
||||
* Gets the item that `path` resolves to in `ns` when `qualifier` is the
|
||||
* qualifier of `path` and `qualifier` resolves to `q`, if any.
|
||||
@@ -1501,8 +1540,17 @@ private ItemNode resolvePathCandQualified(
|
||||
) {
|
||||
exists(string name, SuccessorKind kind |
|
||||
q = resolvePathCandQualifier(qualifier, path, name) and
|
||||
result = getASuccessor(q, name, ns, kind) and
|
||||
result = getASuccessor(q, name, ns, kind)
|
||||
|
|
||||
kind.isExternalOrBoth()
|
||||
or
|
||||
// Non-public items are visible to paths in descendant modules of the declaring
|
||||
// module; the declaration may happen via a `use` statement, where the item
|
||||
// being used is _not_ itself in an ancestor module, and we currently don't track
|
||||
// that information in `getASuccessor`. So, for simplicity, we allow for non-public
|
||||
// items when the path and the item are in the same crate.
|
||||
getCrate(path) = getCrate(result) and
|
||||
not result instanceof TypeParam
|
||||
)
|
||||
}
|
||||
|
||||
@@ -1646,10 +1694,12 @@ private ItemNode resolveUseTreeListItemQualifier(
|
||||
|
||||
pragma[nomagic]
|
||||
private ItemNode resolveUseTreeListItem(Use use, UseTree tree) {
|
||||
tree = use.getUseTree() and
|
||||
result = resolvePathCand(tree.getPath())
|
||||
or
|
||||
result = resolveUseTreeListItem(use, tree, tree.getPath(), _)
|
||||
exists(Path path | path = tree.getPath() |
|
||||
tree = use.getUseTree() and
|
||||
result = resolvePathCand(path)
|
||||
or
|
||||
result = resolveUseTreeListItem(use, tree, path, _)
|
||||
)
|
||||
}
|
||||
|
||||
/** Holds if `use` imports `item` as `name`. */
|
||||
@@ -1673,7 +1723,10 @@ private predicate useImportEdge(Use use, string name, ItemNode item, SuccessorKi
|
||||
item = used and
|
||||
(
|
||||
not tree.hasRename() and
|
||||
name = item.getName()
|
||||
exists(string pathName |
|
||||
pathName = tree.getPath().getText() and
|
||||
if pathName = "self" then name = item.getName() else name = pathName
|
||||
)
|
||||
or
|
||||
exists(Rename rename | rename = tree.getRename() |
|
||||
name = rename.getName().getText()
|
||||
@@ -1772,6 +1825,8 @@ private module Debug {
|
||||
path = p.toStringDebug()
|
||||
}
|
||||
|
||||
predicate debugItemNode(ItemNode item) { item = getRelevantLocatable() }
|
||||
|
||||
ItemNode debugResolvePath(RelevantPath path) {
|
||||
path = getRelevantLocatable() and
|
||||
result = resolvePath(path)
|
||||
|
||||
62
rust/ql/lib/codeql/rust/security/UseOfHttpExtensions.qll
Normal file
62
rust/ql/lib/codeql/rust/security/UseOfHttpExtensions.qll
Normal file
@@ -0,0 +1,62 @@
|
||||
/**
|
||||
* Provides classes and predicates for reasoning about the use of
|
||||
* non-HTTPS URLs in Rust code.
|
||||
*/
|
||||
|
||||
import rust
|
||||
private import codeql.rust.dataflow.DataFlow
|
||||
private import codeql.rust.dataflow.FlowSink
|
||||
private import codeql.rust.Concepts
|
||||
|
||||
/**
|
||||
* Provides default sources, sinks and barriers for detecting use of
|
||||
* non-HTTPS URLs, as well as extension points for adding your own.
|
||||
*/
|
||||
module UseOfHttp {
|
||||
/**
|
||||
* A data flow source for use of non-HTTPS URLs.
|
||||
*/
|
||||
abstract class Source extends DataFlow::Node { }
|
||||
|
||||
/**
|
||||
* A data flow sink for use of non-HTTPS URLs.
|
||||
*/
|
||||
abstract class Sink extends QuerySink::Range {
|
||||
override string getSinkType() { result = "UseOfHttp" }
|
||||
}
|
||||
|
||||
/**
|
||||
* A barrier for use of non-HTTPS URLs.
|
||||
*/
|
||||
abstract class Barrier extends DataFlow::Node { }
|
||||
|
||||
/**
|
||||
* A string containing an HTTP URL.
|
||||
*/
|
||||
class HttpStringLiteral extends StringLiteralExpr {
|
||||
HttpStringLiteral() {
|
||||
exists(string s | this.getTextValue() = s |
|
||||
// match HTTP URLs
|
||||
s.regexpMatch("(?i)\"http://.*\"") and
|
||||
// exclude private/local addresses:
|
||||
// - IPv4: localhost / 127.0.0.1, 192.168.x.x, 10.x.x.x, 172.16.x.x -> 172.31.x.x
|
||||
// - IPv6 (address inside []): ::1 (or 0:0:0:0:0:0:0:1), fc00::/7 (i.e. anything beginning `fcxx:` or `fdxx:`)
|
||||
not s.regexpMatch("(?i)\"http://(localhost|127\\.0\\.0\\.1|192\\.168\\.[0-9]+\\.[0-9]+|10\\.[0-9]+\\.[0-9]+\\.[0-9]+|172\\.(1[6-9]|2[0-9]|3[01])\\.[0-9]+|\\[::1\\]|\\[0:0:0:0:0:0:0:1\\]|\\[f[cd][0-9a-f]{2}:.*\\]).*\"")
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* An HTTP string literal as a source.
|
||||
*/
|
||||
private class HttpStringLiteralAsSource extends Source {
|
||||
HttpStringLiteralAsSource() { this.asExpr().getExpr() instanceof HttpStringLiteral }
|
||||
}
|
||||
|
||||
/**
|
||||
* A sink for use of HTTP URLs from model data.
|
||||
*/
|
||||
private class ModelsAsDataSink extends Sink {
|
||||
ModelsAsDataSink() { sinkNode(this, "request-url") }
|
||||
}
|
||||
}
|
||||
@@ -25,9 +25,9 @@ private module ResolveTest implements TestSig {
|
||||
|
||||
private predicate item(ItemNode i, string value) {
|
||||
exists(string filepath, int line, boolean inMacro | itemAt(i, filepath, line, inMacro) |
|
||||
commmentAt(value, filepath, line) and inMacro = false
|
||||
commmentAt(value, filepath, line)
|
||||
or
|
||||
not (commmentAt(_, filepath, line) and inMacro = false) and
|
||||
not commmentAt(_, filepath, line) and
|
||||
value = i.getName()
|
||||
)
|
||||
}
|
||||
|
||||
4
rust/ql/src/change-notes/2025-09-15-non-https-url.md
Normal file
4
rust/ql/src/change-notes/2025-09-15-non-https-url.md
Normal file
@@ -0,0 +1,4 @@
|
||||
---
|
||||
category: newQuery
|
||||
---
|
||||
* Added a new query, `rust/non-https-url`, for detecting the use of non-HTTPS URLs that can be intercepted by third parties.
|
||||
49
rust/ql/src/queries/security/CWE-319/UseOfHttp.qhelp
Normal file
49
rust/ql/src/queries/security/CWE-319/UseOfHttp.qhelp
Normal file
@@ -0,0 +1,49 @@
|
||||
<!DOCTYPE qhelp PUBLIC
|
||||
"-//Semmle//qhelp//EN"
|
||||
"qhelp.dtd">
|
||||
<qhelp>
|
||||
<overview>
|
||||
|
||||
<p>Constructing URLs with the HTTP protocol can lead to insecure connections.</p>
|
||||
|
||||
<p>Furthermore, constructing URLs with the HTTP protocol can create problems if other parts of the
|
||||
code expect HTTPS URLs. A typical pattern is to use libraries that expect secure connections,
|
||||
which may fail or fall back to insecure behavior when provided with HTTP URLs instead of HTTPS URLs.</p>
|
||||
|
||||
</overview>
|
||||
<recommendation>
|
||||
|
||||
<p>When you construct a URL for network requests, ensure that you use an HTTPS URL rather than an HTTP URL.
|
||||
Then, any connections that are made using that URL are secure TLS connections.</p>
|
||||
|
||||
</recommendation>
|
||||
<example>
|
||||
|
||||
<p>The following examples show two ways of making a network request using a URL. When the request is
|
||||
made using an HTTP URL rather than an HTTPS URL, the connection is unsecured and can be intercepted
|
||||
by attackers:</p>
|
||||
|
||||
<sample src="UseOfHttpBad.rs" />
|
||||
|
||||
<p>A better approach is to use HTTPS. When the request is made using an HTTPS URL, the connection
|
||||
is a secure TLS connection:</p>
|
||||
|
||||
<sample src="UseOfHttpGood.rs" />
|
||||
|
||||
</example>
|
||||
<references>
|
||||
|
||||
<li>
|
||||
OWASP:
|
||||
<a href="https://cheatsheetseries.owasp.org/cheatsheets/Transport_Layer_Security_Cheat_Sheet.html">Transport Layer Security Cheat Sheet</a>.
|
||||
</li>
|
||||
<li>
|
||||
OWASP Top 10:
|
||||
<a href="https://owasp.org/Top10/A08_2021-Software_and_Data_Integrity_Failures/">A08:2021 - Software and Data Integrity Failures</a>.
|
||||
</li>
|
||||
<li>Rust reqwest documentation:
|
||||
<a href="https://docs.rs/reqwest/">reqwest crate</a>.
|
||||
</li>
|
||||
|
||||
</references>
|
||||
</qhelp>
|
||||
42
rust/ql/src/queries/security/CWE-319/UseOfHttp.ql
Normal file
42
rust/ql/src/queries/security/CWE-319/UseOfHttp.ql
Normal file
@@ -0,0 +1,42 @@
|
||||
/**
|
||||
* @name Failure to use HTTPS URLs
|
||||
* @description Non-HTTPS connections can be intercepted by third parties.
|
||||
* @kind path-problem
|
||||
* @problem.severity warning
|
||||
* @security-severity 8.1
|
||||
* @precision high
|
||||
* @id rust/non-https-url
|
||||
* @tags security
|
||||
* external/cwe/cwe-319
|
||||
* external/cwe/cwe-345
|
||||
*/
|
||||
|
||||
import rust
|
||||
import codeql.rust.dataflow.DataFlow
|
||||
import codeql.rust.dataflow.TaintTracking
|
||||
import codeql.rust.security.UseOfHttpExtensions
|
||||
|
||||
/**
|
||||
* A taint configuration for HTTP URL strings that flow to URL-using sinks.
|
||||
*/
|
||||
module UseOfHttpConfig implements DataFlow::ConfigSig {
|
||||
import UseOfHttp
|
||||
|
||||
predicate isSource(DataFlow::Node node) { node instanceof Source }
|
||||
|
||||
predicate isSink(DataFlow::Node node) { node instanceof Sink }
|
||||
|
||||
predicate isBarrier(DataFlow::Node barrier) { barrier instanceof Barrier }
|
||||
|
||||
predicate observeDiffInformedIncrementalMode() { any() }
|
||||
}
|
||||
|
||||
module UseOfHttpFlow = TaintTracking::Global<UseOfHttpConfig>;
|
||||
|
||||
import UseOfHttpFlow::PathGraph
|
||||
|
||||
from UseOfHttpFlow::PathNode sourceNode, UseOfHttpFlow::PathNode sinkNode
|
||||
where UseOfHttpFlow::flowPath(sourceNode, sinkNode)
|
||||
select sinkNode.getNode(), sourceNode, sinkNode,
|
||||
"This URL may be constructed with the HTTP protocol, from $@.", sourceNode.getNode(),
|
||||
"this HTTP URL"
|
||||
10
rust/ql/src/queries/security/CWE-319/UseOfHttpBad.rs
Normal file
10
rust/ql/src/queries/security/CWE-319/UseOfHttpBad.rs
Normal file
@@ -0,0 +1,10 @@
|
||||
// BAD: Using HTTP URL which can be intercepted
|
||||
use reqwest;
|
||||
|
||||
fn main() {
|
||||
let url = "http://example.com/sensitive-data";
|
||||
|
||||
// This makes an insecure HTTP request that can be intercepted
|
||||
let response = reqwest::blocking::get(url).unwrap();
|
||||
println!("Response: {}", response.text().unwrap());
|
||||
}
|
||||
10
rust/ql/src/queries/security/CWE-319/UseOfHttpGood.rs
Normal file
10
rust/ql/src/queries/security/CWE-319/UseOfHttpGood.rs
Normal file
@@ -0,0 +1,10 @@
|
||||
// GOOD: Using HTTPS URL which provides encryption
|
||||
use reqwest;
|
||||
|
||||
fn main() {
|
||||
let url = "https://example.com/sensitive-data";
|
||||
|
||||
// This makes a secure HTTPS request that is encrypted
|
||||
let response = reqwest::blocking::get(url).unwrap();
|
||||
println!("Response: {}", response.text().unwrap());
|
||||
}
|
||||
@@ -27,6 +27,7 @@ private import codeql.rust.security.LogInjectionExtensions
|
||||
private import codeql.rust.security.SqlInjectionExtensions
|
||||
private import codeql.rust.security.TaintedPathExtensions
|
||||
private import codeql.rust.security.UncontrolledAllocationSizeExtensions
|
||||
private import codeql.rust.security.UseOfHttpExtensions
|
||||
private import codeql.rust.security.WeakSensitiveDataHashingExtensions
|
||||
private import codeql.rust.security.HardcodedCryptographicValueExtensions
|
||||
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
multipleCallTargets
|
||||
| main.rs:471:18:471:24 | n.len() |
|
||||
| main.rs:483:18:483:24 | n.len() |
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -69,6 +69,18 @@ fn assignment() {
|
||||
sink(i);
|
||||
i = source(6);
|
||||
sink(i); // $ hasValueFlow=6
|
||||
i = 2;
|
||||
sink(i);
|
||||
|
||||
let mut j = 3;
|
||||
let k = source(7);
|
||||
j = k;
|
||||
sink(j); // $ hasValueFlow=7
|
||||
sink(k); // $ hasValueFlow=7
|
||||
|
||||
let mut l = source(8);
|
||||
l = l;
|
||||
sink(l); // $ hasValueFlow=8
|
||||
}
|
||||
|
||||
fn block_expression1() -> i64 {
|
||||
|
||||
@@ -11,6 +11,8 @@ multipleCallTargets
|
||||
| test.rs:179:30:179:68 | ...::_print(...) |
|
||||
| test.rs:188:26:188:105 | ...::_print(...) |
|
||||
| test.rs:229:22:229:72 | ... .read_to_string(...) |
|
||||
| test.rs:664:22:664:43 | file.read(...) |
|
||||
| test.rs:673:22:673:41 | f1.read(...) |
|
||||
| test.rs:697:18:697:38 | ...::_print(...) |
|
||||
| test.rs:702:18:702:45 | ...::_print(...) |
|
||||
| test.rs:720:38:720:42 | ...::_print(...) |
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,3 +1,7 @@
|
||||
/**
|
||||
* @kind path-problem
|
||||
*/
|
||||
|
||||
import rust
|
||||
import codeql.rust.dataflow.DataFlow
|
||||
import codeql.rust.Concepts
|
||||
@@ -25,3 +29,8 @@ module MyFlowConfig implements DataFlow::ConfigSig {
|
||||
module MyFlowTest = TaintFlowTest<MyFlowConfig>;
|
||||
|
||||
import MyFlowTest
|
||||
import PathGraph
|
||||
|
||||
from PathNode source, PathNode sink
|
||||
where flowPath(source, sink)
|
||||
select sink, source, sink, "$@", source, source.toString()
|
||||
|
||||
@@ -662,7 +662,7 @@ async fn test_async_std_file() -> std::io::Result<()> {
|
||||
{
|
||||
let mut buffer = [0u8; 100];
|
||||
let _bytes = file.read(&mut buffer).await?;
|
||||
sink(&buffer); // $ MISSING: hasTaintFlow="file.txt"
|
||||
sink(&buffer); // $ hasTaintFlow="file.txt"
|
||||
}
|
||||
|
||||
// --- OpenOptions ---
|
||||
@@ -671,7 +671,7 @@ async fn test_async_std_file() -> std::io::Result<()> {
|
||||
let mut f1 = async_std::fs::OpenOptions::new().open("f1.txt").await?; // $ Alert[rust/summary/taint-sources]
|
||||
let mut buffer = [0u8; 1024];
|
||||
let _bytes = f1.read(&mut buffer).await?;
|
||||
sink(&buffer); // $ MISSING: hasTaintFlow="f1.txt"
|
||||
sink(&buffer); // $ hasTaintFlow="f1.txt"
|
||||
}
|
||||
|
||||
Ok(())
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
multipleCallTargets
|
||||
| main.rs:118:9:118:11 | f(...) |
|
||||
| main.rs:124:9:124:11 | f(...) |
|
||||
| proc_macro.rs:9:5:9:10 | ...::new(...) |
|
||||
|
||||
@@ -8,7 +8,13 @@ mod my2; // I14
|
||||
|
||||
use my2::*; // $ item=I14
|
||||
|
||||
use my2::nested2::nested3::nested4::{f, g}; // $ item=I11 item=I12 item=I13
|
||||
#[rustfmt::skip]
|
||||
use my2::nested2::nested3::nested4::{ // $ item=I11
|
||||
f, // $ item=I12
|
||||
g, // $ item=I13
|
||||
};
|
||||
|
||||
use my2::nested8_f; // $ item=I119
|
||||
|
||||
mod m1 {
|
||||
fn f() {
|
||||
@@ -761,6 +767,27 @@ use std::{self as ztd}; // $ item=std
|
||||
|
||||
fn use_ztd(x: ztd::string::String) {} // $ item=String
|
||||
|
||||
#[rustfmt::skip]
|
||||
mod impl_with_attribute_macro {
|
||||
struct Foo; // IFoo
|
||||
|
||||
trait ATrait {
|
||||
type Foo;
|
||||
} // IATrait
|
||||
|
||||
#[proc_macro::identity] // $ item=identity
|
||||
impl ATrait for i64 { // $ item=IATrait item=i64
|
||||
type Foo =
|
||||
i64 // $ item=i64
|
||||
; // IATrait_i64_Foo
|
||||
}
|
||||
|
||||
pub fn test() {
|
||||
// This should resolve to the struct, not the associated type.
|
||||
let _x: Foo; // $ item=IFoo
|
||||
} // impl_with_attribute_macro::test
|
||||
}
|
||||
|
||||
fn main() {
|
||||
my::nested::nested1::nested2::f(); // $ item=I4
|
||||
my::f(); // $ item=I38
|
||||
@@ -792,8 +819,8 @@ fn main() {
|
||||
m23::f(); // $ item=I108
|
||||
m24::f(); // $ item=I121
|
||||
zelf::h(); // $ item=I25
|
||||
z_changed(); // $ MISSING: item=I122
|
||||
AStruct::z_on_type(); // $ MISSING: item=I124
|
||||
AStruct {} // $ item=I123
|
||||
.z_on_instance(); // MISSING: item=I125
|
||||
z_changed(); // $ item=I122
|
||||
AStruct::z_on_type(); // $ item=I124
|
||||
AStruct {}.z_on_instance(); // $ item=I123 item=I125
|
||||
impl_with_attribute_macro::test(); // $ item=impl_with_attribute_macro::test
|
||||
}
|
||||
|
||||
@@ -7,11 +7,17 @@ fn g() {
|
||||
|
||||
pub use nested2::nested5::*; // $ item=I114
|
||||
|
||||
pub use nested2::nested7::nested8::{self}; // $ item=I118
|
||||
#[rustfmt::skip]
|
||||
pub use nested2::nested7::nested8::{ // $ item=I118
|
||||
self, // $ item=I118
|
||||
f as nested8_f // $ item=I119
|
||||
};
|
||||
|
||||
use nested2::nested5::nested6::f as nested6_f; // $ item=I116
|
||||
|
||||
pub mod my3;
|
||||
|
||||
#[path = "renamed.rs"]
|
||||
mod mymod;
|
||||
|
||||
use mymod::f; // $ item=I1001
|
||||
pub use mymod::f; // $ item=I1001
|
||||
|
||||
@@ -6,3 +6,5 @@ pub fn f() {
|
||||
|
||||
use super::super::h; // $ item=I25
|
||||
use super::g; // $ item=I9
|
||||
|
||||
use super::nested6_f; // $ item=I116
|
||||
|
||||
@@ -2,38 +2,39 @@ mod
|
||||
| lib.rs:1:1:1:11 | mod my |
|
||||
| main.rs:1:1:1:7 | mod my |
|
||||
| main.rs:7:1:7:8 | mod my2 |
|
||||
| main.rs:13:1:37:1 | mod m1 |
|
||||
| main.rs:18:5:36:5 | mod m2 |
|
||||
| main.rs:29:9:35:9 | mod m3 |
|
||||
| main.rs:39:1:46:1 | mod m4 |
|
||||
| main.rs:103:1:107:1 | mod m5 |
|
||||
| main.rs:109:1:120:1 | mod m6 |
|
||||
| main.rs:122:1:141:1 | mod m7 |
|
||||
| main.rs:143:1:197:1 | mod m8 |
|
||||
| main.rs:199:1:207:1 | mod m9 |
|
||||
| main.rs:209:1:228:1 | mod m10 |
|
||||
| main.rs:230:1:267:1 | mod m11 |
|
||||
| main.rs:240:5:240:12 | mod f |
|
||||
| main.rs:269:1:281:1 | mod m12 |
|
||||
| main.rs:283:1:296:1 | mod m13 |
|
||||
| main.rs:287:5:295:5 | mod m14 |
|
||||
| main.rs:298:1:367:1 | mod m15 |
|
||||
| main.rs:369:1:461:1 | mod m16 |
|
||||
| main.rs:463:1:513:1 | mod trait_visibility |
|
||||
| main.rs:464:5:486:5 | mod m |
|
||||
| main.rs:515:1:545:1 | mod m17 |
|
||||
| main.rs:547:1:565:1 | mod m18 |
|
||||
| main.rs:552:5:564:5 | mod m19 |
|
||||
| main.rs:557:9:563:9 | mod m20 |
|
||||
| main.rs:567:1:592:1 | mod m21 |
|
||||
| main.rs:568:5:574:5 | mod m22 |
|
||||
| main.rs:576:5:591:5 | mod m33 |
|
||||
| main.rs:594:1:619:1 | mod m23 |
|
||||
| main.rs:621:1:689:1 | mod m24 |
|
||||
| main.rs:706:1:758:1 | mod associated_types |
|
||||
| main.rs:19:1:43:1 | mod m1 |
|
||||
| main.rs:24:5:42:5 | mod m2 |
|
||||
| main.rs:35:9:41:9 | mod m3 |
|
||||
| main.rs:45:1:52:1 | mod m4 |
|
||||
| main.rs:109:1:113:1 | mod m5 |
|
||||
| main.rs:115:1:126:1 | mod m6 |
|
||||
| main.rs:128:1:147:1 | mod m7 |
|
||||
| main.rs:149:1:203:1 | mod m8 |
|
||||
| main.rs:205:1:213:1 | mod m9 |
|
||||
| main.rs:215:1:234:1 | mod m10 |
|
||||
| main.rs:236:1:273:1 | mod m11 |
|
||||
| main.rs:246:5:246:12 | mod f |
|
||||
| main.rs:275:1:287:1 | mod m12 |
|
||||
| main.rs:289:1:302:1 | mod m13 |
|
||||
| main.rs:293:5:301:5 | mod m14 |
|
||||
| main.rs:304:1:373:1 | mod m15 |
|
||||
| main.rs:375:1:467:1 | mod m16 |
|
||||
| main.rs:469:1:519:1 | mod trait_visibility |
|
||||
| main.rs:470:5:492:5 | mod m |
|
||||
| main.rs:521:1:551:1 | mod m17 |
|
||||
| main.rs:553:1:571:1 | mod m18 |
|
||||
| main.rs:558:5:570:5 | mod m19 |
|
||||
| main.rs:563:9:569:9 | mod m20 |
|
||||
| main.rs:573:1:598:1 | mod m21 |
|
||||
| main.rs:574:5:580:5 | mod m22 |
|
||||
| main.rs:582:5:597:5 | mod m33 |
|
||||
| main.rs:600:1:625:1 | mod m23 |
|
||||
| main.rs:627:1:695:1 | mod m24 |
|
||||
| main.rs:712:1:764:1 | mod associated_types |
|
||||
| main.rs:770:1:789:1 | mod impl_with_attribute_macro |
|
||||
| my2/mod.rs:1:1:1:16 | mod nested2 |
|
||||
| my2/mod.rs:12:1:12:12 | mod my3 |
|
||||
| my2/mod.rs:14:1:15:10 | mod mymod |
|
||||
| my2/mod.rs:18:1:18:12 | mod my3 |
|
||||
| my2/mod.rs:20:1:21:10 | mod mymod |
|
||||
| my2/nested2.rs:1:1:11:1 | mod nested3 |
|
||||
| my2/nested2.rs:2:5:10:5 | mod nested4 |
|
||||
| my2/nested2.rs:13:1:19:1 | mod nested5 |
|
||||
@@ -52,385 +53,404 @@ resolvePath
|
||||
| main.rs:5:5:5:23 | ...::nested1 | my/nested.rs:1:1:17:1 | mod nested1 |
|
||||
| main.rs:5:5:5:32 | ...::nested2 | my/nested.rs:2:5:11:5 | mod nested2 |
|
||||
| main.rs:9:5:9:7 | my2 | main.rs:7:1:7:8 | mod my2 |
|
||||
| main.rs:11:5:11:7 | my2 | main.rs:7:1:7:8 | mod my2 |
|
||||
| main.rs:11:5:11:16 | ...::nested2 | my2/mod.rs:1:1:1:16 | mod nested2 |
|
||||
| main.rs:11:5:11:25 | ...::nested3 | my2/nested2.rs:1:1:11:1 | mod nested3 |
|
||||
| main.rs:11:5:11:34 | ...::nested4 | my2/nested2.rs:2:5:10:5 | mod nested4 |
|
||||
| main.rs:11:38:11:38 | f | my2/nested2.rs:3:9:5:9 | fn f |
|
||||
| main.rs:11:41:11:41 | g | my2/nested2.rs:7:9:9:9 | fn g |
|
||||
| main.rs:25:13:25:13 | f | main.rs:19:9:21:9 | fn f |
|
||||
| main.rs:26:13:26:17 | super | main.rs:13:1:37:1 | mod m1 |
|
||||
| main.rs:26:13:26:20 | ...::f | main.rs:14:5:16:5 | fn f |
|
||||
| main.rs:30:17:30:21 | super | main.rs:18:5:36:5 | mod m2 |
|
||||
| main.rs:30:17:30:24 | ...::f | main.rs:19:9:21:9 | fn f |
|
||||
| main.rs:33:17:33:17 | f | main.rs:19:9:21:9 | fn f |
|
||||
| main.rs:40:9:40:13 | super | main.rs:1:1:799:2 | SourceFile |
|
||||
| main.rs:40:9:40:17 | ...::m1 | main.rs:13:1:37:1 | mod m1 |
|
||||
| main.rs:40:9:40:21 | ...::m2 | main.rs:18:5:36:5 | mod m2 |
|
||||
| main.rs:40:9:40:24 | ...::g | main.rs:23:9:27:9 | fn g |
|
||||
| main.rs:44:9:44:9 | g | main.rs:23:9:27:9 | fn g |
|
||||
| main.rs:56:13:56:14 | m1 | main.rs:13:1:37:1 | mod m1 |
|
||||
| main.rs:56:13:56:18 | ...::m2 | main.rs:18:5:36:5 | mod m2 |
|
||||
| main.rs:56:13:56:21 | ...::g | main.rs:23:9:27:9 | fn g |
|
||||
| main.rs:57:9:57:9 | g | main.rs:23:9:27:9 | fn g |
|
||||
| main.rs:61:17:61:19 | Foo | main.rs:59:9:59:21 | struct Foo |
|
||||
| main.rs:64:13:64:15 | Foo | main.rs:53:5:53:17 | struct Foo |
|
||||
| main.rs:66:5:66:5 | f | main.rs:55:5:62:5 | fn f |
|
||||
| main.rs:68:5:68:8 | self | main.rs:1:1:799:2 | SourceFile |
|
||||
| main.rs:68:5:68:11 | ...::i | main.rs:71:1:83:1 | fn i |
|
||||
| main.rs:74:13:74:15 | Foo | main.rs:48:1:48:13 | struct Foo |
|
||||
| main.rs:78:16:78:18 | i32 | {EXTERNAL LOCATION} | struct i32 |
|
||||
| main.rs:81:17:81:19 | Foo | main.rs:77:9:79:9 | struct Foo |
|
||||
| main.rs:85:5:85:7 | my2 | main.rs:7:1:7:8 | mod my2 |
|
||||
| main.rs:85:5:85:16 | ...::nested2 | my2/mod.rs:1:1:1:16 | mod nested2 |
|
||||
| main.rs:87:5:87:21 | my2_nested2_alias | my2/mod.rs:1:1:1:16 | mod nested2 |
|
||||
| main.rs:87:5:87:30 | ...::nested3 | my2/nested2.rs:1:1:11:1 | mod nested3 |
|
||||
| main.rs:87:34:87:40 | nested4 | my2/nested2.rs:2:5:10:5 | mod nested4 |
|
||||
| main.rs:87:34:87:43 | ...::f | my2/nested2.rs:3:9:5:9 | fn f |
|
||||
| main.rs:87:57:87:63 | nested4 | my2/nested2.rs:2:5:10:5 | mod nested4 |
|
||||
| main.rs:87:57:87:66 | ...::g | my2/nested2.rs:7:9:9:9 | fn g |
|
||||
| main.rs:87:80:87:86 | nested4 | my2/nested2.rs:2:5:10:5 | mod nested4 |
|
||||
| main.rs:100:5:100:22 | f_defined_in_macro | main.rs:99:18:99:42 | fn f_defined_in_macro |
|
||||
| main.rs:117:13:117:17 | super | main.rs:1:1:799:2 | SourceFile |
|
||||
| main.rs:117:13:117:21 | ...::m5 | main.rs:103:1:107:1 | mod m5 |
|
||||
| main.rs:118:9:118:9 | f | main.rs:104:5:106:5 | fn f |
|
||||
| main.rs:118:9:118:9 | f | main.rs:110:5:112:5 | fn f |
|
||||
| main.rs:125:13:125:15 | i32 | {EXTERNAL LOCATION} | struct i32 |
|
||||
| main.rs:128:16:128:18 | i32 | {EXTERNAL LOCATION} | struct i32 |
|
||||
| main.rs:134:19:134:24 | MyEnum | main.rs:123:5:131:5 | enum MyEnum |
|
||||
| main.rs:137:17:137:22 | MyEnum | main.rs:123:5:131:5 | enum MyEnum |
|
||||
| main.rs:137:17:137:25 | ...::A | main.rs:124:9:126:9 | A |
|
||||
| main.rs:138:17:138:22 | MyEnum | main.rs:123:5:131:5 | enum MyEnum |
|
||||
| main.rs:138:17:138:25 | ...::B | main.rs:126:12:129:9 | B |
|
||||
| main.rs:139:9:139:14 | MyEnum | main.rs:123:5:131:5 | enum MyEnum |
|
||||
| main.rs:139:9:139:17 | ...::C | main.rs:129:12:130:9 | C |
|
||||
| main.rs:149:13:149:13 | f | main.rs:156:5:158:5 | fn f |
|
||||
| main.rs:150:13:150:16 | Self | main.rs:144:5:152:5 | trait MyTrait |
|
||||
| main.rs:150:13:150:19 | ...::f | main.rs:145:9:145:20 | fn f |
|
||||
| main.rs:161:10:161:16 | MyTrait | main.rs:144:5:152:5 | trait MyTrait |
|
||||
| main.rs:161:22:161:29 | MyStruct | main.rs:154:5:154:22 | struct MyStruct |
|
||||
| main.rs:164:13:164:13 | f | main.rs:156:5:158:5 | fn f |
|
||||
| main.rs:165:13:165:16 | Self | main.rs:160:5:171:5 | impl MyTrait for MyStruct { ... } |
|
||||
| main.rs:165:13:165:19 | ...::g | main.rs:168:9:170:9 | fn g |
|
||||
| main.rs:174:10:174:17 | MyStruct | main.rs:154:5:154:22 | struct MyStruct |
|
||||
| main.rs:177:13:177:13 | f | main.rs:156:5:158:5 | fn f |
|
||||
| main.rs:183:17:183:24 | MyStruct | main.rs:154:5:154:22 | struct MyStruct |
|
||||
| main.rs:184:9:184:15 | MyTrait | main.rs:144:5:152:5 | trait MyTrait |
|
||||
| main.rs:184:9:184:18 | ...::f | main.rs:145:9:145:20 | fn f |
|
||||
| main.rs:185:9:185:16 | MyStruct | main.rs:154:5:154:22 | struct MyStruct |
|
||||
| main.rs:185:9:185:19 | ...::f | main.rs:161:33:166:9 | fn f |
|
||||
| main.rs:186:10:186:17 | MyStruct | main.rs:154:5:154:22 | struct MyStruct |
|
||||
| main.rs:187:10:187:16 | MyTrait | main.rs:144:5:152:5 | trait MyTrait |
|
||||
| main.rs:190:17:190:24 | MyStruct | main.rs:154:5:154:22 | struct MyStruct |
|
||||
| main.rs:192:17:192:24 | MyStruct | main.rs:154:5:154:22 | struct MyStruct |
|
||||
| main.rs:194:9:194:16 | MyStruct | main.rs:154:5:154:22 | struct MyStruct |
|
||||
| main.rs:194:9:194:19 | ...::h | main.rs:174:21:178:9 | fn h |
|
||||
| main.rs:203:19:203:22 | self | main.rs:199:1:207:1 | mod m9 |
|
||||
| main.rs:203:19:203:32 | ...::MyStruct | main.rs:200:5:200:26 | struct MyStruct |
|
||||
| main.rs:205:9:205:12 | self | main.rs:199:1:207:1 | mod m9 |
|
||||
| main.rs:205:9:205:22 | ...::MyStruct | main.rs:200:5:200:26 | struct MyStruct |
|
||||
| main.rs:215:12:215:12 | T | main.rs:212:7:212:7 | T |
|
||||
| main.rs:220:12:220:12 | T | main.rs:219:14:219:14 | T |
|
||||
| main.rs:222:7:224:7 | MyStruct::<...> | main.rs:210:5:216:5 | struct MyStruct |
|
||||
| main.rs:223:9:223:9 | T | main.rs:219:14:219:14 | T |
|
||||
| main.rs:226:9:226:16 | MyStruct | main.rs:210:5:216:5 | struct MyStruct |
|
||||
| main.rs:236:17:236:19 | Foo | main.rs:231:5:231:21 | struct Foo |
|
||||
| main.rs:237:9:237:11 | Foo | main.rs:233:5:233:15 | fn Foo |
|
||||
| main.rs:246:9:246:11 | Bar | main.rs:242:5:244:5 | enum Bar |
|
||||
| main.rs:246:9:246:19 | ...::FooBar | main.rs:243:9:243:17 | FooBar |
|
||||
| main.rs:251:13:251:15 | Foo | main.rs:231:5:231:21 | struct Foo |
|
||||
| main.rs:252:17:252:22 | FooBar | main.rs:243:9:243:17 | FooBar |
|
||||
| main.rs:253:17:253:22 | FooBar | main.rs:248:5:248:18 | fn FooBar |
|
||||
| main.rs:261:9:261:9 | E | main.rs:256:15:259:5 | enum E |
|
||||
| main.rs:261:9:261:12 | ...::C | main.rs:258:9:258:9 | C |
|
||||
| main.rs:264:17:264:17 | S | main.rs:256:5:256:13 | struct S |
|
||||
| main.rs:265:17:265:17 | C | main.rs:258:9:258:9 | C |
|
||||
| main.rs:278:16:278:16 | T | main.rs:272:7:272:7 | T |
|
||||
| main.rs:279:14:279:17 | Self | main.rs:270:5:280:5 | trait MyParamTrait |
|
||||
| main.rs:279:14:279:33 | ...::AssociatedType | main.rs:274:9:274:28 | type AssociatedType |
|
||||
| main.rs:288:13:288:16 | zelf | main.rs:0:0:0:0 | Crate(main@0.0.1) |
|
||||
| main.rs:288:13:288:21 | ...::m13 | main.rs:283:1:296:1 | mod m13 |
|
||||
| main.rs:288:13:288:24 | ...::f | main.rs:284:5:284:17 | fn f |
|
||||
| main.rs:288:13:288:24 | ...::f | main.rs:284:19:285:19 | struct f |
|
||||
| main.rs:291:17:291:17 | f | main.rs:284:19:285:19 | struct f |
|
||||
| main.rs:292:21:292:21 | f | main.rs:284:19:285:19 | struct f |
|
||||
| main.rs:293:13:293:13 | f | main.rs:284:5:284:17 | fn f |
|
||||
| main.rs:307:9:307:14 | Trait1 | main.rs:299:5:303:5 | trait Trait1 |
|
||||
| main.rs:310:13:310:16 | Self | main.rs:305:5:313:5 | trait Trait2 |
|
||||
| main.rs:310:13:310:19 | ...::g | main.rs:302:9:302:20 | fn g |
|
||||
| main.rs:320:9:320:12 | Self | main.rs:315:5:328:5 | trait Trait3 |
|
||||
| main.rs:320:15:320:20 | Trait1 | main.rs:299:5:303:5 | trait Trait1 |
|
||||
| main.rs:321:9:321:10 | TT | main.rs:317:9:317:10 | TT |
|
||||
| main.rs:321:13:321:18 | Trait1 | main.rs:299:5:303:5 | trait Trait1 |
|
||||
| main.rs:323:25:323:26 | TT | main.rs:317:9:317:10 | TT |
|
||||
| main.rs:324:13:324:16 | Self | main.rs:315:5:328:5 | trait Trait3 |
|
||||
| main.rs:324:13:324:19 | ...::g | main.rs:302:9:302:20 | fn g |
|
||||
| main.rs:325:13:325:14 | TT | main.rs:317:9:317:10 | TT |
|
||||
| main.rs:325:13:325:17 | ...::g | main.rs:302:9:302:20 | fn g |
|
||||
| main.rs:333:10:333:15 | Trait1 | main.rs:299:5:303:5 | trait Trait1 |
|
||||
| main.rs:334:11:334:11 | S | main.rs:330:5:330:13 | struct S |
|
||||
| main.rs:337:13:337:16 | Self | main.rs:332:5:344:5 | impl Trait1 for S { ... } |
|
||||
| main.rs:337:13:337:19 | ...::g | main.rs:341:9:343:9 | fn g |
|
||||
| main.rs:347:10:347:15 | Trait2 | main.rs:305:5:313:5 | trait Trait2 |
|
||||
| main.rs:348:11:348:11 | S | main.rs:330:5:330:13 | struct S |
|
||||
| main.rs:357:17:357:17 | S | main.rs:330:5:330:13 | struct S |
|
||||
| main.rs:358:10:358:10 | S | main.rs:330:5:330:13 | struct S |
|
||||
| main.rs:359:14:359:19 | Trait1 | main.rs:299:5:303:5 | trait Trait1 |
|
||||
| main.rs:361:10:361:10 | S | main.rs:330:5:330:13 | struct S |
|
||||
| main.rs:362:14:362:19 | Trait2 | main.rs:305:5:313:5 | trait Trait2 |
|
||||
| main.rs:364:9:364:9 | S | main.rs:330:5:330:13 | struct S |
|
||||
| main.rs:364:9:364:12 | ...::g | main.rs:341:9:343:9 | fn g |
|
||||
| main.rs:374:24:374:24 | T | main.rs:372:7:372:7 | T |
|
||||
| main.rs:376:24:376:24 | T | main.rs:372:7:372:7 | T |
|
||||
| main.rs:379:24:379:24 | T | main.rs:372:7:372:7 | T |
|
||||
| main.rs:380:13:380:16 | Self | main.rs:370:5:386:5 | trait Trait1 |
|
||||
| main.rs:380:13:380:19 | ...::g | main.rs:376:9:377:9 | fn g |
|
||||
| main.rs:384:18:384:18 | T | main.rs:372:7:372:7 | T |
|
||||
| main.rs:392:9:394:9 | Trait1::<...> | main.rs:370:5:386:5 | trait Trait1 |
|
||||
| main.rs:393:11:393:11 | T | main.rs:390:7:390:7 | T |
|
||||
| main.rs:395:24:395:24 | T | main.rs:390:7:390:7 | T |
|
||||
| main.rs:397:13:397:16 | Self | main.rs:388:5:401:5 | trait Trait2 |
|
||||
| main.rs:397:13:397:19 | ...::g | main.rs:376:9:377:9 | fn g |
|
||||
| main.rs:399:13:399:16 | Self | main.rs:388:5:401:5 | trait Trait2 |
|
||||
| main.rs:399:13:399:19 | ...::c | main.rs:384:9:385:9 | Const |
|
||||
| main.rs:406:10:408:5 | Trait1::<...> | main.rs:370:5:386:5 | trait Trait1 |
|
||||
| main.rs:407:7:407:7 | S | main.rs:403:5:403:13 | struct S |
|
||||
| main.rs:409:11:409:11 | S | main.rs:403:5:403:13 | struct S |
|
||||
| main.rs:410:24:410:24 | S | main.rs:403:5:403:13 | struct S |
|
||||
| main.rs:412:13:412:16 | Self | main.rs:405:5:423:5 | impl Trait1::<...> for S { ... } |
|
||||
| main.rs:412:13:412:19 | ...::g | main.rs:416:9:419:9 | fn g |
|
||||
| main.rs:416:24:416:24 | S | main.rs:403:5:403:13 | struct S |
|
||||
| main.rs:418:13:418:16 | Self | main.rs:405:5:423:5 | impl Trait1::<...> for S { ... } |
|
||||
| main.rs:418:13:418:19 | ...::c | main.rs:421:9:422:9 | Const |
|
||||
| main.rs:421:18:421:18 | S | main.rs:403:5:403:13 | struct S |
|
||||
| main.rs:421:22:421:22 | S | main.rs:403:5:403:13 | struct S |
|
||||
| main.rs:426:10:428:5 | Trait2::<...> | main.rs:388:5:401:5 | trait Trait2 |
|
||||
| main.rs:427:7:427:7 | S | main.rs:403:5:403:13 | struct S |
|
||||
| main.rs:429:11:429:11 | S | main.rs:403:5:403:13 | struct S |
|
||||
| main.rs:430:24:430:24 | S | main.rs:403:5:403:13 | struct S |
|
||||
| main.rs:432:13:432:16 | Self | main.rs:425:5:434:5 | impl Trait2::<...> for S { ... } |
|
||||
| main.rs:439:17:439:17 | S | main.rs:403:5:403:13 | struct S |
|
||||
| main.rs:440:10:440:10 | S | main.rs:403:5:403:13 | struct S |
|
||||
| main.rs:441:14:443:11 | Trait1::<...> | main.rs:370:5:386:5 | trait Trait1 |
|
||||
| main.rs:442:13:442:13 | S | main.rs:403:5:403:13 | struct S |
|
||||
| main.rs:445:10:445:10 | S | main.rs:403:5:403:13 | struct S |
|
||||
| main.rs:446:14:448:11 | Trait2::<...> | main.rs:388:5:401:5 | trait Trait2 |
|
||||
| main.rs:447:13:447:13 | S | main.rs:403:5:403:13 | struct S |
|
||||
| main.rs:450:9:450:9 | S | main.rs:403:5:403:13 | struct S |
|
||||
| main.rs:450:9:450:12 | ...::g | main.rs:416:9:419:9 | fn g |
|
||||
| main.rs:452:9:452:9 | S | main.rs:403:5:403:13 | struct S |
|
||||
| main.rs:452:9:452:12 | ...::h | main.rs:379:9:382:9 | fn h |
|
||||
| main.rs:454:9:454:9 | S | main.rs:403:5:403:13 | struct S |
|
||||
| main.rs:454:9:454:12 | ...::c | main.rs:421:9:422:9 | Const |
|
||||
| main.rs:455:10:455:10 | S | main.rs:403:5:403:13 | struct S |
|
||||
| main.rs:456:14:458:11 | Trait1::<...> | main.rs:370:5:386:5 | trait Trait1 |
|
||||
| main.rs:457:13:457:13 | S | main.rs:403:5:403:13 | struct S |
|
||||
| main.rs:475:14:475:16 | Foo | main.rs:465:9:467:9 | trait Foo |
|
||||
| main.rs:475:22:475:22 | X | main.rs:473:9:473:21 | struct X |
|
||||
| main.rs:481:14:481:16 | Bar | main.rs:469:9:471:9 | trait Bar |
|
||||
| main.rs:481:22:481:22 | X | main.rs:473:9:473:21 | struct X |
|
||||
| main.rs:488:9:488:9 | m | main.rs:464:5:486:5 | mod m |
|
||||
| main.rs:488:9:488:12 | ...::X | main.rs:473:9:473:21 | struct X |
|
||||
| main.rs:491:17:491:17 | X | main.rs:473:9:473:21 | struct X |
|
||||
| main.rs:494:17:494:17 | m | main.rs:464:5:486:5 | mod m |
|
||||
| main.rs:494:17:494:22 | ...::Foo | main.rs:465:9:467:9 | trait Foo |
|
||||
| main.rs:495:13:495:13 | X | main.rs:473:9:473:21 | struct X |
|
||||
| main.rs:495:13:495:23 | ...::a_method | main.rs:475:26:478:13 | fn a_method |
|
||||
| main.rs:499:17:499:17 | m | main.rs:464:5:486:5 | mod m |
|
||||
| main.rs:499:17:499:22 | ...::Bar | main.rs:469:9:471:9 | trait Bar |
|
||||
| main.rs:500:13:500:13 | X | main.rs:473:9:473:21 | struct X |
|
||||
| main.rs:500:13:500:23 | ...::a_method | main.rs:481:26:484:13 | fn a_method |
|
||||
| main.rs:504:17:504:17 | m | main.rs:464:5:486:5 | mod m |
|
||||
| main.rs:504:17:504:22 | ...::Bar | main.rs:469:9:471:9 | trait Bar |
|
||||
| main.rs:505:13:505:13 | X | main.rs:473:9:473:21 | struct X |
|
||||
| main.rs:505:13:505:23 | ...::a_method | main.rs:481:26:484:13 | fn a_method |
|
||||
| main.rs:510:13:510:13 | m | main.rs:464:5:486:5 | mod m |
|
||||
| main.rs:510:13:510:18 | ...::Bar | main.rs:469:9:471:9 | trait Bar |
|
||||
| main.rs:510:13:510:28 | ...::a_method | main.rs:470:13:470:31 | fn a_method |
|
||||
| main.rs:523:10:523:16 | MyTrait | main.rs:516:5:518:5 | trait MyTrait |
|
||||
| main.rs:524:9:524:9 | S | main.rs:520:5:520:13 | struct S |
|
||||
| main.rs:532:7:532:13 | MyTrait | main.rs:516:5:518:5 | trait MyTrait |
|
||||
| main.rs:533:10:533:10 | T | main.rs:531:10:531:10 | T |
|
||||
| main.rs:535:9:535:9 | T | main.rs:531:10:531:10 | T |
|
||||
| main.rs:535:9:535:12 | ...::f | main.rs:517:9:517:20 | fn f |
|
||||
| main.rs:536:9:536:15 | MyTrait | main.rs:516:5:518:5 | trait MyTrait |
|
||||
| main.rs:536:9:536:18 | ...::f | main.rs:517:9:517:20 | fn f |
|
||||
| main.rs:541:9:541:9 | g | main.rs:530:5:537:5 | fn g |
|
||||
| main.rs:542:11:542:11 | S | main.rs:520:5:520:13 | struct S |
|
||||
| main.rs:560:17:560:21 | super | main.rs:552:5:564:5 | mod m19 |
|
||||
| main.rs:560:17:560:24 | ...::f | main.rs:553:9:555:9 | fn f |
|
||||
| main.rs:561:17:561:21 | super | main.rs:552:5:564:5 | mod m19 |
|
||||
| main.rs:561:17:561:28 | ...::super | main.rs:547:1:565:1 | mod m18 |
|
||||
| main.rs:561:17:561:31 | ...::f | main.rs:548:5:550:5 | fn f |
|
||||
| main.rs:578:13:578:17 | super | main.rs:567:1:592:1 | mod m21 |
|
||||
| main.rs:578:13:578:22 | ...::m22 | main.rs:568:5:574:5 | mod m22 |
|
||||
| main.rs:578:13:578:30 | ...::MyEnum | main.rs:569:9:571:9 | enum MyEnum |
|
||||
| main.rs:579:13:579:16 | self | main.rs:569:9:571:9 | enum MyEnum |
|
||||
| main.rs:583:13:583:17 | super | main.rs:567:1:592:1 | mod m21 |
|
||||
| main.rs:583:13:583:22 | ...::m22 | main.rs:568:5:574:5 | mod m22 |
|
||||
| main.rs:583:13:583:32 | ...::MyStruct | main.rs:573:9:573:28 | struct MyStruct |
|
||||
| main.rs:584:13:584:16 | self | main.rs:573:9:573:28 | struct MyStruct |
|
||||
| main.rs:588:21:588:26 | MyEnum | main.rs:569:9:571:9 | enum MyEnum |
|
||||
| main.rs:588:21:588:29 | ...::A | main.rs:570:13:570:13 | A |
|
||||
| main.rs:589:21:589:28 | MyStruct | main.rs:573:9:573:28 | struct MyStruct |
|
||||
| main.rs:605:10:607:5 | Trait1::<...> | main.rs:595:5:600:5 | trait Trait1 |
|
||||
| main.rs:606:7:606:10 | Self | main.rs:602:5:602:13 | struct S |
|
||||
| main.rs:608:11:608:11 | S | main.rs:602:5:602:13 | struct S |
|
||||
| main.rs:616:17:616:17 | S | main.rs:602:5:602:13 | struct S |
|
||||
| main.rs:632:15:632:15 | T | main.rs:631:26:631:26 | T |
|
||||
| main.rs:637:9:637:24 | GenericStruct::<...> | main.rs:630:5:633:5 | struct GenericStruct |
|
||||
| main.rs:637:23:637:23 | T | main.rs:636:10:636:10 | T |
|
||||
| main.rs:639:9:639:9 | T | main.rs:636:10:636:10 | T |
|
||||
| main.rs:639:12:639:17 | TraitA | main.rs:622:5:624:5 | trait TraitA |
|
||||
| main.rs:648:9:648:24 | GenericStruct::<...> | main.rs:630:5:633:5 | struct GenericStruct |
|
||||
| main.rs:648:23:648:23 | T | main.rs:647:10:647:10 | T |
|
||||
| main.rs:650:9:650:9 | T | main.rs:647:10:647:10 | T |
|
||||
| main.rs:650:12:650:17 | TraitB | main.rs:626:5:628:5 | trait TraitB |
|
||||
| main.rs:651:9:651:9 | T | main.rs:647:10:647:10 | T |
|
||||
| main.rs:651:12:651:17 | TraitA | main.rs:622:5:624:5 | trait TraitA |
|
||||
| main.rs:662:10:662:15 | TraitA | main.rs:622:5:624:5 | trait TraitA |
|
||||
| main.rs:662:21:662:31 | Implementor | main.rs:659:5:659:23 | struct Implementor |
|
||||
| main.rs:669:10:669:15 | TraitB | main.rs:626:5:628:5 | trait TraitB |
|
||||
| main.rs:669:21:669:31 | Implementor | main.rs:659:5:659:23 | struct Implementor |
|
||||
| main.rs:677:24:677:34 | Implementor | main.rs:659:5:659:23 | struct Implementor |
|
||||
| main.rs:678:23:678:35 | GenericStruct | main.rs:630:5:633:5 | struct GenericStruct |
|
||||
| main.rs:684:9:684:36 | GenericStruct::<...> | main.rs:630:5:633:5 | struct GenericStruct |
|
||||
| main.rs:684:9:684:50 | ...::call_trait_a | main.rs:641:9:643:9 | fn call_trait_a |
|
||||
| main.rs:684:25:684:35 | Implementor | main.rs:659:5:659:23 | struct Implementor |
|
||||
| main.rs:687:9:687:36 | GenericStruct::<...> | main.rs:630:5:633:5 | struct GenericStruct |
|
||||
| main.rs:687:9:687:47 | ...::call_both | main.rs:653:9:656:9 | fn call_both |
|
||||
| main.rs:687:25:687:35 | Implementor | main.rs:659:5:659:23 | struct Implementor |
|
||||
| main.rs:693:3:693:12 | proc_macro | proc_macro.rs:0:0:0:0 | Crate(proc_macro@0.0.1) |
|
||||
| main.rs:693:3:693:24 | ...::add_suffix | proc_macro.rs:4:1:12:1 | fn add_suffix |
|
||||
| main.rs:697:6:697:12 | AStruct | main.rs:696:1:696:17 | struct AStruct |
|
||||
| main.rs:699:7:699:16 | proc_macro | proc_macro.rs:0:0:0:0 | Crate(proc_macro@0.0.1) |
|
||||
| main.rs:699:7:699:28 | ...::add_suffix | proc_macro.rs:4:1:12:1 | fn add_suffix |
|
||||
| main.rs:702:7:702:16 | proc_macro | proc_macro.rs:0:0:0:0 | Crate(proc_macro@0.0.1) |
|
||||
| main.rs:702:7:702:28 | ...::add_suffix | proc_macro.rs:4:1:12:1 | fn add_suffix |
|
||||
| main.rs:707:9:707:11 | std | {EXTERNAL LOCATION} | Crate(std@0.0.0) |
|
||||
| main.rs:707:9:707:19 | ...::marker | {EXTERNAL LOCATION} | mod marker |
|
||||
| main.rs:707:9:707:32 | ...::PhantomData | {EXTERNAL LOCATION} | struct PhantomData |
|
||||
| main.rs:708:9:708:11 | std | {EXTERNAL LOCATION} | Crate(std@0.0.0) |
|
||||
| main.rs:708:9:708:19 | ...::result | {EXTERNAL LOCATION} | mod result |
|
||||
| main.rs:708:9:708:27 | ...::Result | {EXTERNAL LOCATION} | enum Result |
|
||||
| main.rs:716:19:716:22 | Self | main.rs:710:5:718:5 | trait Reduce |
|
||||
| main.rs:716:19:716:29 | ...::Input | main.rs:711:9:711:19 | type Input |
|
||||
| main.rs:717:14:717:46 | Result::<...> | {EXTERNAL LOCATION} | enum Result |
|
||||
| main.rs:717:21:717:24 | Self | main.rs:710:5:718:5 | trait Reduce |
|
||||
| main.rs:717:21:717:32 | ...::Output | main.rs:712:21:713:20 | type Output |
|
||||
| main.rs:717:35:717:38 | Self | main.rs:710:5:718:5 | trait Reduce |
|
||||
| main.rs:717:35:717:45 | ...::Error | main.rs:711:21:712:19 | type Error |
|
||||
| main.rs:721:17:721:34 | PhantomData::<...> | {EXTERNAL LOCATION} | struct PhantomData |
|
||||
| main.rs:721:29:721:33 | Input | main.rs:720:19:720:23 | Input |
|
||||
| main.rs:722:17:722:34 | PhantomData::<...> | {EXTERNAL LOCATION} | struct PhantomData |
|
||||
| main.rs:722:29:722:33 | Error | main.rs:720:26:720:30 | Error |
|
||||
| main.rs:729:11:729:16 | Reduce | main.rs:710:5:718:5 | trait Reduce |
|
||||
| main.rs:730:13:733:9 | MyImpl::<...> | main.rs:720:5:723:5 | struct MyImpl |
|
||||
| main.rs:731:13:731:17 | Input | main.rs:727:13:727:17 | Input |
|
||||
| main.rs:732:13:732:17 | Error | main.rs:728:13:728:17 | Error |
|
||||
| main.rs:735:22:738:9 | Result::<...> | {EXTERNAL LOCATION} | enum Result |
|
||||
| main.rs:736:13:736:17 | Input | main.rs:727:13:727:17 | Input |
|
||||
| main.rs:737:13:737:16 | Self | main.rs:725:5:757:5 | impl Reduce for MyImpl::<...> { ... } |
|
||||
| main.rs:737:13:737:23 | ...::Error | main.rs:739:11:743:9 | type Error |
|
||||
| main.rs:740:22:742:9 | Option::<...> | {EXTERNAL LOCATION} | enum Option |
|
||||
| main.rs:741:11:741:15 | Error | main.rs:728:13:728:17 | Error |
|
||||
| main.rs:745:13:745:17 | Input | main.rs:727:13:727:17 | Input |
|
||||
| main.rs:750:19:750:22 | Self | main.rs:725:5:757:5 | impl Reduce for MyImpl::<...> { ... } |
|
||||
| main.rs:750:19:750:29 | ...::Input | main.rs:735:9:739:9 | type Input |
|
||||
| main.rs:751:14:754:9 | Result::<...> | {EXTERNAL LOCATION} | enum Result |
|
||||
| main.rs:752:13:752:16 | Self | main.rs:725:5:757:5 | impl Reduce for MyImpl::<...> { ... } |
|
||||
| main.rs:752:13:752:24 | ...::Output | main.rs:743:11:746:9 | type Output |
|
||||
| main.rs:753:13:753:16 | Self | main.rs:725:5:757:5 | impl Reduce for MyImpl::<...> { ... } |
|
||||
| main.rs:753:13:753:23 | ...::Error | main.rs:739:11:743:9 | type Error |
|
||||
| main.rs:760:5:760:7 | std | {EXTERNAL LOCATION} | Crate(std@0.0.0) |
|
||||
| main.rs:760:11:760:14 | self | {EXTERNAL LOCATION} | Crate(std@0.0.0) |
|
||||
| main.rs:762:15:762:17 | ztd | {EXTERNAL LOCATION} | Crate(std@0.0.0) |
|
||||
| main.rs:762:15:762:25 | ...::string | {EXTERNAL LOCATION} | mod string |
|
||||
| main.rs:762:15:762:33 | ...::String | {EXTERNAL LOCATION} | struct String |
|
||||
| main.rs:765:5:765:6 | my | main.rs:1:1:1:7 | mod my |
|
||||
| main.rs:765:5:765:14 | ...::nested | my.rs:1:1:1:15 | mod nested |
|
||||
| main.rs:765:5:765:23 | ...::nested1 | my/nested.rs:1:1:17:1 | mod nested1 |
|
||||
| main.rs:765:5:765:32 | ...::nested2 | my/nested.rs:2:5:11:5 | mod nested2 |
|
||||
| main.rs:765:5:765:35 | ...::f | my/nested.rs:3:9:5:9 | fn f |
|
||||
| main.rs:766:5:766:6 | my | main.rs:1:1:1:7 | mod my |
|
||||
| main.rs:766:5:766:9 | ...::f | my.rs:5:1:7:1 | fn f |
|
||||
| main.rs:767:5:767:11 | nested2 | my2/mod.rs:1:1:1:16 | mod nested2 |
|
||||
| main.rs:767:5:767:20 | ...::nested3 | my2/nested2.rs:1:1:11:1 | mod nested3 |
|
||||
| main.rs:767:5:767:29 | ...::nested4 | my2/nested2.rs:2:5:10:5 | mod nested4 |
|
||||
| main.rs:767:5:767:32 | ...::f | my2/nested2.rs:3:9:5:9 | fn f |
|
||||
| main.rs:768:5:768:5 | f | my2/nested2.rs:3:9:5:9 | fn f |
|
||||
| main.rs:769:5:769:5 | g | my2/nested2.rs:7:9:9:9 | fn g |
|
||||
| main.rs:770:5:770:9 | crate | main.rs:0:0:0:0 | Crate(main@0.0.1) |
|
||||
| main.rs:770:5:770:12 | ...::h | main.rs:50:1:69:1 | fn h |
|
||||
| main.rs:771:5:771:6 | m1 | main.rs:13:1:37:1 | mod m1 |
|
||||
| main.rs:771:5:771:10 | ...::m2 | main.rs:18:5:36:5 | mod m2 |
|
||||
| main.rs:771:5:771:13 | ...::g | main.rs:23:9:27:9 | fn g |
|
||||
| main.rs:772:5:772:6 | m1 | main.rs:13:1:37:1 | mod m1 |
|
||||
| main.rs:772:5:772:10 | ...::m2 | main.rs:18:5:36:5 | mod m2 |
|
||||
| main.rs:772:5:772:14 | ...::m3 | main.rs:29:9:35:9 | mod m3 |
|
||||
| main.rs:772:5:772:17 | ...::h | main.rs:30:27:34:13 | fn h |
|
||||
| main.rs:773:5:773:6 | m4 | main.rs:39:1:46:1 | mod m4 |
|
||||
| main.rs:773:5:773:9 | ...::i | main.rs:42:5:45:5 | fn i |
|
||||
| main.rs:774:5:774:5 | h | main.rs:50:1:69:1 | fn h |
|
||||
| main.rs:775:5:775:11 | f_alias | my2/nested2.rs:3:9:5:9 | fn f |
|
||||
| main.rs:776:5:776:11 | g_alias | my2/nested2.rs:7:9:9:9 | fn g |
|
||||
| main.rs:777:5:777:5 | j | main.rs:97:1:101:1 | fn j |
|
||||
| main.rs:778:5:778:6 | m6 | main.rs:109:1:120:1 | mod m6 |
|
||||
| main.rs:778:5:778:9 | ...::g | main.rs:114:5:119:5 | fn g |
|
||||
| main.rs:779:5:779:6 | m7 | main.rs:122:1:141:1 | mod m7 |
|
||||
| main.rs:779:5:779:9 | ...::f | main.rs:133:5:140:5 | fn f |
|
||||
| main.rs:780:5:780:6 | m8 | main.rs:143:1:197:1 | mod m8 |
|
||||
| main.rs:780:5:780:9 | ...::g | main.rs:181:5:196:5 | fn g |
|
||||
| main.rs:781:5:781:6 | m9 | main.rs:199:1:207:1 | mod m9 |
|
||||
| main.rs:781:5:781:9 | ...::f | main.rs:202:5:206:5 | fn f |
|
||||
| main.rs:782:5:782:7 | m11 | main.rs:230:1:267:1 | mod m11 |
|
||||
| main.rs:782:5:782:10 | ...::f | main.rs:235:5:238:5 | fn f |
|
||||
| main.rs:783:5:783:7 | m15 | main.rs:298:1:367:1 | mod m15 |
|
||||
| main.rs:783:5:783:10 | ...::f | main.rs:354:5:366:5 | fn f |
|
||||
| main.rs:784:5:784:7 | m16 | main.rs:369:1:461:1 | mod m16 |
|
||||
| main.rs:784:5:784:10 | ...::f | main.rs:436:5:460:5 | fn f |
|
||||
| main.rs:785:5:785:20 | trait_visibility | main.rs:463:1:513:1 | mod trait_visibility |
|
||||
| main.rs:785:5:785:23 | ...::f | main.rs:490:5:512:5 | fn f |
|
||||
| main.rs:786:5:786:7 | m17 | main.rs:515:1:545:1 | mod m17 |
|
||||
| main.rs:786:5:786:10 | ...::f | main.rs:539:5:544:5 | fn f |
|
||||
| main.rs:787:5:787:11 | nested6 | my2/nested2.rs:14:5:18:5 | mod nested6 |
|
||||
| main.rs:787:5:787:14 | ...::f | my2/nested2.rs:15:9:17:9 | fn f |
|
||||
| main.rs:788:5:788:11 | nested8 | my2/nested2.rs:22:5:26:5 | mod nested8 |
|
||||
| main.rs:788:5:788:14 | ...::f | my2/nested2.rs:23:9:25:9 | fn f |
|
||||
| main.rs:789:5:789:7 | my3 | my2/mod.rs:12:1:12:12 | mod my3 |
|
||||
| main.rs:789:5:789:10 | ...::f | my2/my3/mod.rs:1:1:5:1 | fn f |
|
||||
| main.rs:790:5:790:12 | nested_f | my/my4/my5/mod.rs:1:1:3:1 | fn f |
|
||||
| main.rs:791:5:791:7 | m18 | main.rs:547:1:565:1 | mod m18 |
|
||||
| main.rs:791:5:791:12 | ...::m19 | main.rs:552:5:564:5 | mod m19 |
|
||||
| main.rs:791:5:791:17 | ...::m20 | main.rs:557:9:563:9 | mod m20 |
|
||||
| main.rs:791:5:791:20 | ...::g | main.rs:558:13:562:13 | fn g |
|
||||
| main.rs:792:5:792:7 | m23 | main.rs:594:1:619:1 | mod m23 |
|
||||
| main.rs:792:5:792:10 | ...::f | main.rs:614:5:618:5 | fn f |
|
||||
| main.rs:793:5:793:7 | m24 | main.rs:621:1:689:1 | mod m24 |
|
||||
| main.rs:793:5:793:10 | ...::f | main.rs:675:5:688:5 | fn f |
|
||||
| main.rs:794:5:794:8 | zelf | main.rs:0:0:0:0 | Crate(main@0.0.1) |
|
||||
| main.rs:794:5:794:11 | ...::h | main.rs:50:1:69:1 | fn h |
|
||||
| main.rs:796:5:796:11 | AStruct | main.rs:696:1:696:17 | struct AStruct |
|
||||
| main.rs:797:5:797:11 | AStruct | main.rs:696:1:696:17 | struct AStruct |
|
||||
| main.rs:12:5:12:7 | my2 | main.rs:7:1:7:8 | mod my2 |
|
||||
| main.rs:12:5:12:16 | ...::nested2 | my2/mod.rs:1:1:1:16 | mod nested2 |
|
||||
| main.rs:12:5:12:25 | ...::nested3 | my2/nested2.rs:1:1:11:1 | mod nested3 |
|
||||
| main.rs:12:5:12:34 | ...::nested4 | my2/nested2.rs:2:5:10:5 | mod nested4 |
|
||||
| main.rs:13:5:13:5 | f | my2/nested2.rs:3:9:5:9 | fn f |
|
||||
| main.rs:14:5:14:5 | g | my2/nested2.rs:7:9:9:9 | fn g |
|
||||
| main.rs:17:5:17:7 | my2 | main.rs:7:1:7:8 | mod my2 |
|
||||
| main.rs:17:5:17:18 | ...::nested8_f | my2/nested2.rs:23:9:25:9 | fn f |
|
||||
| main.rs:31:13:31:13 | f | main.rs:25:9:27:9 | fn f |
|
||||
| main.rs:32:13:32:17 | super | main.rs:19:1:43:1 | mod m1 |
|
||||
| main.rs:32:13:32:20 | ...::f | main.rs:20:5:22:5 | fn f |
|
||||
| main.rs:36:17:36:21 | super | main.rs:24:5:42:5 | mod m2 |
|
||||
| main.rs:36:17:36:24 | ...::f | main.rs:25:9:27:9 | fn f |
|
||||
| main.rs:39:17:39:17 | f | main.rs:25:9:27:9 | fn f |
|
||||
| main.rs:46:9:46:13 | super | main.rs:1:1:826:2 | SourceFile |
|
||||
| main.rs:46:9:46:17 | ...::m1 | main.rs:19:1:43:1 | mod m1 |
|
||||
| main.rs:46:9:46:21 | ...::m2 | main.rs:24:5:42:5 | mod m2 |
|
||||
| main.rs:46:9:46:24 | ...::g | main.rs:29:9:33:9 | fn g |
|
||||
| main.rs:50:9:50:9 | g | main.rs:29:9:33:9 | fn g |
|
||||
| main.rs:62:13:62:14 | m1 | main.rs:19:1:43:1 | mod m1 |
|
||||
| main.rs:62:13:62:18 | ...::m2 | main.rs:24:5:42:5 | mod m2 |
|
||||
| main.rs:62:13:62:21 | ...::g | main.rs:29:9:33:9 | fn g |
|
||||
| main.rs:63:9:63:9 | g | main.rs:29:9:33:9 | fn g |
|
||||
| main.rs:67:17:67:19 | Foo | main.rs:65:9:65:21 | struct Foo |
|
||||
| main.rs:70:13:70:15 | Foo | main.rs:59:5:59:17 | struct Foo |
|
||||
| main.rs:72:5:72:5 | f | main.rs:61:5:68:5 | fn f |
|
||||
| main.rs:74:5:74:8 | self | main.rs:1:1:826:2 | SourceFile |
|
||||
| main.rs:74:5:74:11 | ...::i | main.rs:77:1:89:1 | fn i |
|
||||
| main.rs:80:13:80:15 | Foo | main.rs:54:1:54:13 | struct Foo |
|
||||
| main.rs:84:16:84:18 | i32 | {EXTERNAL LOCATION} | struct i32 |
|
||||
| main.rs:87:17:87:19 | Foo | main.rs:83:9:85:9 | struct Foo |
|
||||
| main.rs:91:5:91:7 | my2 | main.rs:7:1:7:8 | mod my2 |
|
||||
| main.rs:91:5:91:16 | ...::nested2 | my2/mod.rs:1:1:1:16 | mod nested2 |
|
||||
| main.rs:93:5:93:21 | my2_nested2_alias | my2/mod.rs:1:1:1:16 | mod nested2 |
|
||||
| main.rs:93:5:93:30 | ...::nested3 | my2/nested2.rs:1:1:11:1 | mod nested3 |
|
||||
| main.rs:93:34:93:40 | nested4 | my2/nested2.rs:2:5:10:5 | mod nested4 |
|
||||
| main.rs:93:34:93:43 | ...::f | my2/nested2.rs:3:9:5:9 | fn f |
|
||||
| main.rs:93:57:93:63 | nested4 | my2/nested2.rs:2:5:10:5 | mod nested4 |
|
||||
| main.rs:93:57:93:66 | ...::g | my2/nested2.rs:7:9:9:9 | fn g |
|
||||
| main.rs:93:80:93:86 | nested4 | my2/nested2.rs:2:5:10:5 | mod nested4 |
|
||||
| main.rs:106:5:106:22 | f_defined_in_macro | main.rs:105:18:105:42 | fn f_defined_in_macro |
|
||||
| main.rs:123:13:123:17 | super | main.rs:1:1:826:2 | SourceFile |
|
||||
| main.rs:123:13:123:21 | ...::m5 | main.rs:109:1:113:1 | mod m5 |
|
||||
| main.rs:124:9:124:9 | f | main.rs:110:5:112:5 | fn f |
|
||||
| main.rs:124:9:124:9 | f | main.rs:116:5:118:5 | fn f |
|
||||
| main.rs:131:13:131:15 | i32 | {EXTERNAL LOCATION} | struct i32 |
|
||||
| main.rs:134:16:134:18 | i32 | {EXTERNAL LOCATION} | struct i32 |
|
||||
| main.rs:140:19:140:24 | MyEnum | main.rs:129:5:137:5 | enum MyEnum |
|
||||
| main.rs:143:17:143:22 | MyEnum | main.rs:129:5:137:5 | enum MyEnum |
|
||||
| main.rs:143:17:143:25 | ...::A | main.rs:130:9:132:9 | A |
|
||||
| main.rs:144:17:144:22 | MyEnum | main.rs:129:5:137:5 | enum MyEnum |
|
||||
| main.rs:144:17:144:25 | ...::B | main.rs:132:12:135:9 | B |
|
||||
| main.rs:145:9:145:14 | MyEnum | main.rs:129:5:137:5 | enum MyEnum |
|
||||
| main.rs:145:9:145:17 | ...::C | main.rs:135:12:136:9 | C |
|
||||
| main.rs:155:13:155:13 | f | main.rs:162:5:164:5 | fn f |
|
||||
| main.rs:156:13:156:16 | Self | main.rs:150:5:158:5 | trait MyTrait |
|
||||
| main.rs:156:13:156:19 | ...::f | main.rs:151:9:151:20 | fn f |
|
||||
| main.rs:167:10:167:16 | MyTrait | main.rs:150:5:158:5 | trait MyTrait |
|
||||
| main.rs:167:22:167:29 | MyStruct | main.rs:160:5:160:22 | struct MyStruct |
|
||||
| main.rs:170:13:170:13 | f | main.rs:162:5:164:5 | fn f |
|
||||
| main.rs:171:13:171:16 | Self | main.rs:166:5:177:5 | impl MyTrait for MyStruct { ... } |
|
||||
| main.rs:171:13:171:19 | ...::g | main.rs:174:9:176:9 | fn g |
|
||||
| main.rs:180:10:180:17 | MyStruct | main.rs:160:5:160:22 | struct MyStruct |
|
||||
| main.rs:183:13:183:13 | f | main.rs:162:5:164:5 | fn f |
|
||||
| main.rs:189:17:189:24 | MyStruct | main.rs:160:5:160:22 | struct MyStruct |
|
||||
| main.rs:190:9:190:15 | MyTrait | main.rs:150:5:158:5 | trait MyTrait |
|
||||
| main.rs:190:9:190:18 | ...::f | main.rs:151:9:151:20 | fn f |
|
||||
| main.rs:191:9:191:16 | MyStruct | main.rs:160:5:160:22 | struct MyStruct |
|
||||
| main.rs:191:9:191:19 | ...::f | main.rs:167:33:172:9 | fn f |
|
||||
| main.rs:192:10:192:17 | MyStruct | main.rs:160:5:160:22 | struct MyStruct |
|
||||
| main.rs:193:10:193:16 | MyTrait | main.rs:150:5:158:5 | trait MyTrait |
|
||||
| main.rs:196:17:196:24 | MyStruct | main.rs:160:5:160:22 | struct MyStruct |
|
||||
| main.rs:198:17:198:24 | MyStruct | main.rs:160:5:160:22 | struct MyStruct |
|
||||
| main.rs:200:9:200:16 | MyStruct | main.rs:160:5:160:22 | struct MyStruct |
|
||||
| main.rs:200:9:200:19 | ...::h | main.rs:180:21:184:9 | fn h |
|
||||
| main.rs:209:19:209:22 | self | main.rs:205:1:213:1 | mod m9 |
|
||||
| main.rs:209:19:209:32 | ...::MyStruct | main.rs:206:5:206:26 | struct MyStruct |
|
||||
| main.rs:211:9:211:12 | self | main.rs:205:1:213:1 | mod m9 |
|
||||
| main.rs:211:9:211:22 | ...::MyStruct | main.rs:206:5:206:26 | struct MyStruct |
|
||||
| main.rs:221:12:221:12 | T | main.rs:218:7:218:7 | T |
|
||||
| main.rs:226:12:226:12 | T | main.rs:225:14:225:14 | T |
|
||||
| main.rs:228:7:230:7 | MyStruct::<...> | main.rs:216:5:222:5 | struct MyStruct |
|
||||
| main.rs:229:9:229:9 | T | main.rs:225:14:225:14 | T |
|
||||
| main.rs:232:9:232:16 | MyStruct | main.rs:216:5:222:5 | struct MyStruct |
|
||||
| main.rs:242:17:242:19 | Foo | main.rs:237:5:237:21 | struct Foo |
|
||||
| main.rs:243:9:243:11 | Foo | main.rs:239:5:239:15 | fn Foo |
|
||||
| main.rs:252:9:252:11 | Bar | main.rs:248:5:250:5 | enum Bar |
|
||||
| main.rs:252:9:252:19 | ...::FooBar | main.rs:249:9:249:17 | FooBar |
|
||||
| main.rs:257:13:257:15 | Foo | main.rs:237:5:237:21 | struct Foo |
|
||||
| main.rs:258:17:258:22 | FooBar | main.rs:249:9:249:17 | FooBar |
|
||||
| main.rs:259:17:259:22 | FooBar | main.rs:254:5:254:18 | fn FooBar |
|
||||
| main.rs:267:9:267:9 | E | main.rs:262:15:265:5 | enum E |
|
||||
| main.rs:267:9:267:12 | ...::C | main.rs:264:9:264:9 | C |
|
||||
| main.rs:270:17:270:17 | S | main.rs:262:5:262:13 | struct S |
|
||||
| main.rs:271:17:271:17 | C | main.rs:264:9:264:9 | C |
|
||||
| main.rs:284:16:284:16 | T | main.rs:278:7:278:7 | T |
|
||||
| main.rs:285:14:285:17 | Self | main.rs:276:5:286:5 | trait MyParamTrait |
|
||||
| main.rs:285:14:285:33 | ...::AssociatedType | main.rs:280:9:280:28 | type AssociatedType |
|
||||
| main.rs:294:13:294:16 | zelf | main.rs:0:0:0:0 | Crate(main@0.0.1) |
|
||||
| main.rs:294:13:294:21 | ...::m13 | main.rs:289:1:302:1 | mod m13 |
|
||||
| main.rs:294:13:294:24 | ...::f | main.rs:290:5:290:17 | fn f |
|
||||
| main.rs:294:13:294:24 | ...::f | main.rs:290:19:291:19 | struct f |
|
||||
| main.rs:297:17:297:17 | f | main.rs:290:19:291:19 | struct f |
|
||||
| main.rs:298:21:298:21 | f | main.rs:290:19:291:19 | struct f |
|
||||
| main.rs:299:13:299:13 | f | main.rs:290:5:290:17 | fn f |
|
||||
| main.rs:313:9:313:14 | Trait1 | main.rs:305:5:309:5 | trait Trait1 |
|
||||
| main.rs:316:13:316:16 | Self | main.rs:311:5:319:5 | trait Trait2 |
|
||||
| main.rs:316:13:316:19 | ...::g | main.rs:308:9:308:20 | fn g |
|
||||
| main.rs:326:9:326:12 | Self | main.rs:321:5:334:5 | trait Trait3 |
|
||||
| main.rs:326:15:326:20 | Trait1 | main.rs:305:5:309:5 | trait Trait1 |
|
||||
| main.rs:327:9:327:10 | TT | main.rs:323:9:323:10 | TT |
|
||||
| main.rs:327:13:327:18 | Trait1 | main.rs:305:5:309:5 | trait Trait1 |
|
||||
| main.rs:329:25:329:26 | TT | main.rs:323:9:323:10 | TT |
|
||||
| main.rs:330:13:330:16 | Self | main.rs:321:5:334:5 | trait Trait3 |
|
||||
| main.rs:330:13:330:19 | ...::g | main.rs:308:9:308:20 | fn g |
|
||||
| main.rs:331:13:331:14 | TT | main.rs:323:9:323:10 | TT |
|
||||
| main.rs:331:13:331:17 | ...::g | main.rs:308:9:308:20 | fn g |
|
||||
| main.rs:339:10:339:15 | Trait1 | main.rs:305:5:309:5 | trait Trait1 |
|
||||
| main.rs:340:11:340:11 | S | main.rs:336:5:336:13 | struct S |
|
||||
| main.rs:343:13:343:16 | Self | main.rs:338:5:350:5 | impl Trait1 for S { ... } |
|
||||
| main.rs:343:13:343:19 | ...::g | main.rs:347:9:349:9 | fn g |
|
||||
| main.rs:353:10:353:15 | Trait2 | main.rs:311:5:319:5 | trait Trait2 |
|
||||
| main.rs:354:11:354:11 | S | main.rs:336:5:336:13 | struct S |
|
||||
| main.rs:363:17:363:17 | S | main.rs:336:5:336:13 | struct S |
|
||||
| main.rs:364:10:364:10 | S | main.rs:336:5:336:13 | struct S |
|
||||
| main.rs:365:14:365:19 | Trait1 | main.rs:305:5:309:5 | trait Trait1 |
|
||||
| main.rs:367:10:367:10 | S | main.rs:336:5:336:13 | struct S |
|
||||
| main.rs:368:14:368:19 | Trait2 | main.rs:311:5:319:5 | trait Trait2 |
|
||||
| main.rs:370:9:370:9 | S | main.rs:336:5:336:13 | struct S |
|
||||
| main.rs:370:9:370:12 | ...::g | main.rs:347:9:349:9 | fn g |
|
||||
| main.rs:380:24:380:24 | T | main.rs:378:7:378:7 | T |
|
||||
| main.rs:382:24:382:24 | T | main.rs:378:7:378:7 | T |
|
||||
| main.rs:385:24:385:24 | T | main.rs:378:7:378:7 | T |
|
||||
| main.rs:386:13:386:16 | Self | main.rs:376:5:392:5 | trait Trait1 |
|
||||
| main.rs:386:13:386:19 | ...::g | main.rs:382:9:383:9 | fn g |
|
||||
| main.rs:390:18:390:18 | T | main.rs:378:7:378:7 | T |
|
||||
| main.rs:398:9:400:9 | Trait1::<...> | main.rs:376:5:392:5 | trait Trait1 |
|
||||
| main.rs:399:11:399:11 | T | main.rs:396:7:396:7 | T |
|
||||
| main.rs:401:24:401:24 | T | main.rs:396:7:396:7 | T |
|
||||
| main.rs:403:13:403:16 | Self | main.rs:394:5:407:5 | trait Trait2 |
|
||||
| main.rs:403:13:403:19 | ...::g | main.rs:382:9:383:9 | fn g |
|
||||
| main.rs:405:13:405:16 | Self | main.rs:394:5:407:5 | trait Trait2 |
|
||||
| main.rs:405:13:405:19 | ...::c | main.rs:390:9:391:9 | Const |
|
||||
| main.rs:412:10:414:5 | Trait1::<...> | main.rs:376:5:392:5 | trait Trait1 |
|
||||
| main.rs:413:7:413:7 | S | main.rs:409:5:409:13 | struct S |
|
||||
| main.rs:415:11:415:11 | S | main.rs:409:5:409:13 | struct S |
|
||||
| main.rs:416:24:416:24 | S | main.rs:409:5:409:13 | struct S |
|
||||
| main.rs:418:13:418:16 | Self | main.rs:411:5:429:5 | impl Trait1::<...> for S { ... } |
|
||||
| main.rs:418:13:418:19 | ...::g | main.rs:422:9:425:9 | fn g |
|
||||
| main.rs:422:24:422:24 | S | main.rs:409:5:409:13 | struct S |
|
||||
| main.rs:424:13:424:16 | Self | main.rs:411:5:429:5 | impl Trait1::<...> for S { ... } |
|
||||
| main.rs:424:13:424:19 | ...::c | main.rs:427:9:428:9 | Const |
|
||||
| main.rs:427:18:427:18 | S | main.rs:409:5:409:13 | struct S |
|
||||
| main.rs:427:22:427:22 | S | main.rs:409:5:409:13 | struct S |
|
||||
| main.rs:432:10:434:5 | Trait2::<...> | main.rs:394:5:407:5 | trait Trait2 |
|
||||
| main.rs:433:7:433:7 | S | main.rs:409:5:409:13 | struct S |
|
||||
| main.rs:435:11:435:11 | S | main.rs:409:5:409:13 | struct S |
|
||||
| main.rs:436:24:436:24 | S | main.rs:409:5:409:13 | struct S |
|
||||
| main.rs:438:13:438:16 | Self | main.rs:431:5:440:5 | impl Trait2::<...> for S { ... } |
|
||||
| main.rs:445:17:445:17 | S | main.rs:409:5:409:13 | struct S |
|
||||
| main.rs:446:10:446:10 | S | main.rs:409:5:409:13 | struct S |
|
||||
| main.rs:447:14:449:11 | Trait1::<...> | main.rs:376:5:392:5 | trait Trait1 |
|
||||
| main.rs:448:13:448:13 | S | main.rs:409:5:409:13 | struct S |
|
||||
| main.rs:451:10:451:10 | S | main.rs:409:5:409:13 | struct S |
|
||||
| main.rs:452:14:454:11 | Trait2::<...> | main.rs:394:5:407:5 | trait Trait2 |
|
||||
| main.rs:453:13:453:13 | S | main.rs:409:5:409:13 | struct S |
|
||||
| main.rs:456:9:456:9 | S | main.rs:409:5:409:13 | struct S |
|
||||
| main.rs:456:9:456:12 | ...::g | main.rs:422:9:425:9 | fn g |
|
||||
| main.rs:458:9:458:9 | S | main.rs:409:5:409:13 | struct S |
|
||||
| main.rs:458:9:458:12 | ...::h | main.rs:385:9:388:9 | fn h |
|
||||
| main.rs:460:9:460:9 | S | main.rs:409:5:409:13 | struct S |
|
||||
| main.rs:460:9:460:12 | ...::c | main.rs:427:9:428:9 | Const |
|
||||
| main.rs:461:10:461:10 | S | main.rs:409:5:409:13 | struct S |
|
||||
| main.rs:462:14:464:11 | Trait1::<...> | main.rs:376:5:392:5 | trait Trait1 |
|
||||
| main.rs:463:13:463:13 | S | main.rs:409:5:409:13 | struct S |
|
||||
| main.rs:481:14:481:16 | Foo | main.rs:471:9:473:9 | trait Foo |
|
||||
| main.rs:481:22:481:22 | X | main.rs:479:9:479:21 | struct X |
|
||||
| main.rs:487:14:487:16 | Bar | main.rs:475:9:477:9 | trait Bar |
|
||||
| main.rs:487:22:487:22 | X | main.rs:479:9:479:21 | struct X |
|
||||
| main.rs:494:9:494:9 | m | main.rs:470:5:492:5 | mod m |
|
||||
| main.rs:494:9:494:12 | ...::X | main.rs:479:9:479:21 | struct X |
|
||||
| main.rs:497:17:497:17 | X | main.rs:479:9:479:21 | struct X |
|
||||
| main.rs:500:17:500:17 | m | main.rs:470:5:492:5 | mod m |
|
||||
| main.rs:500:17:500:22 | ...::Foo | main.rs:471:9:473:9 | trait Foo |
|
||||
| main.rs:501:13:501:13 | X | main.rs:479:9:479:21 | struct X |
|
||||
| main.rs:501:13:501:23 | ...::a_method | main.rs:481:26:484:13 | fn a_method |
|
||||
| main.rs:505:17:505:17 | m | main.rs:470:5:492:5 | mod m |
|
||||
| main.rs:505:17:505:22 | ...::Bar | main.rs:475:9:477:9 | trait Bar |
|
||||
| main.rs:506:13:506:13 | X | main.rs:479:9:479:21 | struct X |
|
||||
| main.rs:506:13:506:23 | ...::a_method | main.rs:487:26:490:13 | fn a_method |
|
||||
| main.rs:510:17:510:17 | m | main.rs:470:5:492:5 | mod m |
|
||||
| main.rs:510:17:510:22 | ...::Bar | main.rs:475:9:477:9 | trait Bar |
|
||||
| main.rs:511:13:511:13 | X | main.rs:479:9:479:21 | struct X |
|
||||
| main.rs:511:13:511:23 | ...::a_method | main.rs:487:26:490:13 | fn a_method |
|
||||
| main.rs:516:13:516:13 | m | main.rs:470:5:492:5 | mod m |
|
||||
| main.rs:516:13:516:18 | ...::Bar | main.rs:475:9:477:9 | trait Bar |
|
||||
| main.rs:516:13:516:28 | ...::a_method | main.rs:476:13:476:31 | fn a_method |
|
||||
| main.rs:529:10:529:16 | MyTrait | main.rs:522:5:524:5 | trait MyTrait |
|
||||
| main.rs:530:9:530:9 | S | main.rs:526:5:526:13 | struct S |
|
||||
| main.rs:538:7:538:13 | MyTrait | main.rs:522:5:524:5 | trait MyTrait |
|
||||
| main.rs:539:10:539:10 | T | main.rs:537:10:537:10 | T |
|
||||
| main.rs:541:9:541:9 | T | main.rs:537:10:537:10 | T |
|
||||
| main.rs:541:9:541:12 | ...::f | main.rs:523:9:523:20 | fn f |
|
||||
| main.rs:542:9:542:15 | MyTrait | main.rs:522:5:524:5 | trait MyTrait |
|
||||
| main.rs:542:9:542:18 | ...::f | main.rs:523:9:523:20 | fn f |
|
||||
| main.rs:547:9:547:9 | g | main.rs:536:5:543:5 | fn g |
|
||||
| main.rs:548:11:548:11 | S | main.rs:526:5:526:13 | struct S |
|
||||
| main.rs:566:17:566:21 | super | main.rs:558:5:570:5 | mod m19 |
|
||||
| main.rs:566:17:566:24 | ...::f | main.rs:559:9:561:9 | fn f |
|
||||
| main.rs:567:17:567:21 | super | main.rs:558:5:570:5 | mod m19 |
|
||||
| main.rs:567:17:567:28 | ...::super | main.rs:553:1:571:1 | mod m18 |
|
||||
| main.rs:567:17:567:31 | ...::f | main.rs:554:5:556:5 | fn f |
|
||||
| main.rs:584:13:584:17 | super | main.rs:573:1:598:1 | mod m21 |
|
||||
| main.rs:584:13:584:22 | ...::m22 | main.rs:574:5:580:5 | mod m22 |
|
||||
| main.rs:584:13:584:30 | ...::MyEnum | main.rs:575:9:577:9 | enum MyEnum |
|
||||
| main.rs:585:13:585:16 | self | main.rs:575:9:577:9 | enum MyEnum |
|
||||
| main.rs:589:13:589:17 | super | main.rs:573:1:598:1 | mod m21 |
|
||||
| main.rs:589:13:589:22 | ...::m22 | main.rs:574:5:580:5 | mod m22 |
|
||||
| main.rs:589:13:589:32 | ...::MyStruct | main.rs:579:9:579:28 | struct MyStruct |
|
||||
| main.rs:590:13:590:16 | self | main.rs:579:9:579:28 | struct MyStruct |
|
||||
| main.rs:594:21:594:26 | MyEnum | main.rs:575:9:577:9 | enum MyEnum |
|
||||
| main.rs:594:21:594:29 | ...::A | main.rs:576:13:576:13 | A |
|
||||
| main.rs:595:21:595:28 | MyStruct | main.rs:579:9:579:28 | struct MyStruct |
|
||||
| main.rs:611:10:613:5 | Trait1::<...> | main.rs:601:5:606:5 | trait Trait1 |
|
||||
| main.rs:612:7:612:10 | Self | main.rs:608:5:608:13 | struct S |
|
||||
| main.rs:614:11:614:11 | S | main.rs:608:5:608:13 | struct S |
|
||||
| main.rs:622:17:622:17 | S | main.rs:608:5:608:13 | struct S |
|
||||
| main.rs:638:15:638:15 | T | main.rs:637:26:637:26 | T |
|
||||
| main.rs:643:9:643:24 | GenericStruct::<...> | main.rs:636:5:639:5 | struct GenericStruct |
|
||||
| main.rs:643:23:643:23 | T | main.rs:642:10:642:10 | T |
|
||||
| main.rs:645:9:645:9 | T | main.rs:642:10:642:10 | T |
|
||||
| main.rs:645:12:645:17 | TraitA | main.rs:628:5:630:5 | trait TraitA |
|
||||
| main.rs:654:9:654:24 | GenericStruct::<...> | main.rs:636:5:639:5 | struct GenericStruct |
|
||||
| main.rs:654:23:654:23 | T | main.rs:653:10:653:10 | T |
|
||||
| main.rs:656:9:656:9 | T | main.rs:653:10:653:10 | T |
|
||||
| main.rs:656:12:656:17 | TraitB | main.rs:632:5:634:5 | trait TraitB |
|
||||
| main.rs:657:9:657:9 | T | main.rs:653:10:653:10 | T |
|
||||
| main.rs:657:12:657:17 | TraitA | main.rs:628:5:630:5 | trait TraitA |
|
||||
| main.rs:668:10:668:15 | TraitA | main.rs:628:5:630:5 | trait TraitA |
|
||||
| main.rs:668:21:668:31 | Implementor | main.rs:665:5:665:23 | struct Implementor |
|
||||
| main.rs:675:10:675:15 | TraitB | main.rs:632:5:634:5 | trait TraitB |
|
||||
| main.rs:675:21:675:31 | Implementor | main.rs:665:5:665:23 | struct Implementor |
|
||||
| main.rs:683:24:683:34 | Implementor | main.rs:665:5:665:23 | struct Implementor |
|
||||
| main.rs:684:23:684:35 | GenericStruct | main.rs:636:5:639:5 | struct GenericStruct |
|
||||
| main.rs:690:9:690:36 | GenericStruct::<...> | main.rs:636:5:639:5 | struct GenericStruct |
|
||||
| main.rs:690:9:690:50 | ...::call_trait_a | main.rs:647:9:649:9 | fn call_trait_a |
|
||||
| main.rs:690:25:690:35 | Implementor | main.rs:665:5:665:23 | struct Implementor |
|
||||
| main.rs:693:9:693:36 | GenericStruct::<...> | main.rs:636:5:639:5 | struct GenericStruct |
|
||||
| main.rs:693:9:693:47 | ...::call_both | main.rs:659:9:662:9 | fn call_both |
|
||||
| main.rs:693:25:693:35 | Implementor | main.rs:665:5:665:23 | struct Implementor |
|
||||
| main.rs:699:3:699:12 | proc_macro | proc_macro.rs:0:0:0:0 | Crate(proc_macro@0.0.1) |
|
||||
| main.rs:699:3:699:24 | ...::add_suffix | proc_macro.rs:4:1:13:1 | fn add_suffix |
|
||||
| main.rs:703:6:703:12 | AStruct | main.rs:702:1:702:17 | struct AStruct |
|
||||
| main.rs:705:7:705:16 | proc_macro | proc_macro.rs:0:0:0:0 | Crate(proc_macro@0.0.1) |
|
||||
| main.rs:705:7:705:28 | ...::add_suffix | proc_macro.rs:4:1:13:1 | fn add_suffix |
|
||||
| main.rs:708:7:708:16 | proc_macro | proc_macro.rs:0:0:0:0 | Crate(proc_macro@0.0.1) |
|
||||
| main.rs:708:7:708:28 | ...::add_suffix | proc_macro.rs:4:1:13:1 | fn add_suffix |
|
||||
| main.rs:713:9:713:11 | std | {EXTERNAL LOCATION} | Crate(std@0.0.0) |
|
||||
| main.rs:713:9:713:19 | ...::marker | {EXTERNAL LOCATION} | mod marker |
|
||||
| main.rs:713:9:713:32 | ...::PhantomData | {EXTERNAL LOCATION} | struct PhantomData |
|
||||
| main.rs:714:9:714:11 | std | {EXTERNAL LOCATION} | Crate(std@0.0.0) |
|
||||
| main.rs:714:9:714:19 | ...::result | {EXTERNAL LOCATION} | mod result |
|
||||
| main.rs:714:9:714:27 | ...::Result | {EXTERNAL LOCATION} | enum Result |
|
||||
| main.rs:722:19:722:22 | Self | main.rs:716:5:724:5 | trait Reduce |
|
||||
| main.rs:722:19:722:29 | ...::Input | main.rs:717:9:717:19 | type Input |
|
||||
| main.rs:723:14:723:46 | Result::<...> | {EXTERNAL LOCATION} | enum Result |
|
||||
| main.rs:723:21:723:24 | Self | main.rs:716:5:724:5 | trait Reduce |
|
||||
| main.rs:723:21:723:32 | ...::Output | main.rs:718:21:719:20 | type Output |
|
||||
| main.rs:723:35:723:38 | Self | main.rs:716:5:724:5 | trait Reduce |
|
||||
| main.rs:723:35:723:45 | ...::Error | main.rs:717:21:718:19 | type Error |
|
||||
| main.rs:727:17:727:34 | PhantomData::<...> | {EXTERNAL LOCATION} | struct PhantomData |
|
||||
| main.rs:727:29:727:33 | Input | main.rs:726:19:726:23 | Input |
|
||||
| main.rs:728:17:728:34 | PhantomData::<...> | {EXTERNAL LOCATION} | struct PhantomData |
|
||||
| main.rs:728:29:728:33 | Error | main.rs:726:26:726:30 | Error |
|
||||
| main.rs:735:11:735:16 | Reduce | main.rs:716:5:724:5 | trait Reduce |
|
||||
| main.rs:736:13:739:9 | MyImpl::<...> | main.rs:726:5:729:5 | struct MyImpl |
|
||||
| main.rs:737:13:737:17 | Input | main.rs:733:13:733:17 | Input |
|
||||
| main.rs:738:13:738:17 | Error | main.rs:734:13:734:17 | Error |
|
||||
| main.rs:741:22:744:9 | Result::<...> | {EXTERNAL LOCATION} | enum Result |
|
||||
| main.rs:742:13:742:17 | Input | main.rs:733:13:733:17 | Input |
|
||||
| main.rs:743:13:743:16 | Self | main.rs:731:5:763:5 | impl Reduce for MyImpl::<...> { ... } |
|
||||
| main.rs:743:13:743:23 | ...::Error | main.rs:745:11:749:9 | type Error |
|
||||
| main.rs:746:22:748:9 | Option::<...> | {EXTERNAL LOCATION} | enum Option |
|
||||
| main.rs:747:11:747:15 | Error | main.rs:734:13:734:17 | Error |
|
||||
| main.rs:751:13:751:17 | Input | main.rs:733:13:733:17 | Input |
|
||||
| main.rs:756:19:756:22 | Self | main.rs:731:5:763:5 | impl Reduce for MyImpl::<...> { ... } |
|
||||
| main.rs:756:19:756:29 | ...::Input | main.rs:741:9:745:9 | type Input |
|
||||
| main.rs:757:14:760:9 | Result::<...> | {EXTERNAL LOCATION} | enum Result |
|
||||
| main.rs:758:13:758:16 | Self | main.rs:731:5:763:5 | impl Reduce for MyImpl::<...> { ... } |
|
||||
| main.rs:758:13:758:24 | ...::Output | main.rs:749:11:752:9 | type Output |
|
||||
| main.rs:759:13:759:16 | Self | main.rs:731:5:763:5 | impl Reduce for MyImpl::<...> { ... } |
|
||||
| main.rs:759:13:759:23 | ...::Error | main.rs:745:11:749:9 | type Error |
|
||||
| main.rs:766:5:766:7 | std | {EXTERNAL LOCATION} | Crate(std@0.0.0) |
|
||||
| main.rs:766:11:766:14 | self | {EXTERNAL LOCATION} | Crate(std@0.0.0) |
|
||||
| main.rs:768:15:768:17 | ztd | {EXTERNAL LOCATION} | Crate(std@0.0.0) |
|
||||
| main.rs:768:15:768:25 | ...::string | {EXTERNAL LOCATION} | mod string |
|
||||
| main.rs:768:15:768:33 | ...::String | {EXTERNAL LOCATION} | struct String |
|
||||
| main.rs:778:7:778:16 | proc_macro | proc_macro.rs:0:0:0:0 | Crate(proc_macro@0.0.1) |
|
||||
| main.rs:778:7:778:26 | ...::identity | proc_macro.rs:15:1:18:1 | fn identity |
|
||||
| main.rs:779:10:779:15 | ATrait | main.rs:774:5:776:5 | trait ATrait |
|
||||
| main.rs:779:21:779:23 | i64 | {EXTERNAL LOCATION} | struct i64 |
|
||||
| main.rs:781:11:781:13 | i64 | {EXTERNAL LOCATION} | struct i64 |
|
||||
| main.rs:787:17:787:19 | Foo | main.rs:772:5:772:15 | struct Foo |
|
||||
| main.rs:792:5:792:6 | my | main.rs:1:1:1:7 | mod my |
|
||||
| main.rs:792:5:792:14 | ...::nested | my.rs:1:1:1:15 | mod nested |
|
||||
| main.rs:792:5:792:23 | ...::nested1 | my/nested.rs:1:1:17:1 | mod nested1 |
|
||||
| main.rs:792:5:792:32 | ...::nested2 | my/nested.rs:2:5:11:5 | mod nested2 |
|
||||
| main.rs:792:5:792:35 | ...::f | my/nested.rs:3:9:5:9 | fn f |
|
||||
| main.rs:793:5:793:6 | my | main.rs:1:1:1:7 | mod my |
|
||||
| main.rs:793:5:793:9 | ...::f | my.rs:5:1:7:1 | fn f |
|
||||
| main.rs:794:5:794:11 | nested2 | my2/mod.rs:1:1:1:16 | mod nested2 |
|
||||
| main.rs:794:5:794:20 | ...::nested3 | my2/nested2.rs:1:1:11:1 | mod nested3 |
|
||||
| main.rs:794:5:794:29 | ...::nested4 | my2/nested2.rs:2:5:10:5 | mod nested4 |
|
||||
| main.rs:794:5:794:32 | ...::f | my2/nested2.rs:3:9:5:9 | fn f |
|
||||
| main.rs:795:5:795:5 | f | my2/nested2.rs:3:9:5:9 | fn f |
|
||||
| main.rs:796:5:796:5 | g | my2/nested2.rs:7:9:9:9 | fn g |
|
||||
| main.rs:797:5:797:9 | crate | main.rs:0:0:0:0 | Crate(main@0.0.1) |
|
||||
| main.rs:797:5:797:12 | ...::h | main.rs:56:1:75:1 | fn h |
|
||||
| main.rs:798:5:798:6 | m1 | main.rs:19:1:43:1 | mod m1 |
|
||||
| main.rs:798:5:798:10 | ...::m2 | main.rs:24:5:42:5 | mod m2 |
|
||||
| main.rs:798:5:798:13 | ...::g | main.rs:29:9:33:9 | fn g |
|
||||
| main.rs:799:5:799:6 | m1 | main.rs:19:1:43:1 | mod m1 |
|
||||
| main.rs:799:5:799:10 | ...::m2 | main.rs:24:5:42:5 | mod m2 |
|
||||
| main.rs:799:5:799:14 | ...::m3 | main.rs:35:9:41:9 | mod m3 |
|
||||
| main.rs:799:5:799:17 | ...::h | main.rs:36:27:40:13 | fn h |
|
||||
| main.rs:800:5:800:6 | m4 | main.rs:45:1:52:1 | mod m4 |
|
||||
| main.rs:800:5:800:9 | ...::i | main.rs:48:5:51:5 | fn i |
|
||||
| main.rs:801:5:801:5 | h | main.rs:56:1:75:1 | fn h |
|
||||
| main.rs:802:5:802:11 | f_alias | my2/nested2.rs:3:9:5:9 | fn f |
|
||||
| main.rs:803:5:803:11 | g_alias | my2/nested2.rs:7:9:9:9 | fn g |
|
||||
| main.rs:804:5:804:5 | j | main.rs:103:1:107:1 | fn j |
|
||||
| main.rs:805:5:805:6 | m6 | main.rs:115:1:126:1 | mod m6 |
|
||||
| main.rs:805:5:805:9 | ...::g | main.rs:120:5:125:5 | fn g |
|
||||
| main.rs:806:5:806:6 | m7 | main.rs:128:1:147:1 | mod m7 |
|
||||
| main.rs:806:5:806:9 | ...::f | main.rs:139:5:146:5 | fn f |
|
||||
| main.rs:807:5:807:6 | m8 | main.rs:149:1:203:1 | mod m8 |
|
||||
| main.rs:807:5:807:9 | ...::g | main.rs:187:5:202:5 | fn g |
|
||||
| main.rs:808:5:808:6 | m9 | main.rs:205:1:213:1 | mod m9 |
|
||||
| main.rs:808:5:808:9 | ...::f | main.rs:208:5:212:5 | fn f |
|
||||
| main.rs:809:5:809:7 | m11 | main.rs:236:1:273:1 | mod m11 |
|
||||
| main.rs:809:5:809:10 | ...::f | main.rs:241:5:244:5 | fn f |
|
||||
| main.rs:810:5:810:7 | m15 | main.rs:304:1:373:1 | mod m15 |
|
||||
| main.rs:810:5:810:10 | ...::f | main.rs:360:5:372:5 | fn f |
|
||||
| main.rs:811:5:811:7 | m16 | main.rs:375:1:467:1 | mod m16 |
|
||||
| main.rs:811:5:811:10 | ...::f | main.rs:442:5:466:5 | fn f |
|
||||
| main.rs:812:5:812:20 | trait_visibility | main.rs:469:1:519:1 | mod trait_visibility |
|
||||
| main.rs:812:5:812:23 | ...::f | main.rs:496:5:518:5 | fn f |
|
||||
| main.rs:813:5:813:7 | m17 | main.rs:521:1:551:1 | mod m17 |
|
||||
| main.rs:813:5:813:10 | ...::f | main.rs:545:5:550:5 | fn f |
|
||||
| main.rs:814:5:814:11 | nested6 | my2/nested2.rs:14:5:18:5 | mod nested6 |
|
||||
| main.rs:814:5:814:14 | ...::f | my2/nested2.rs:15:9:17:9 | fn f |
|
||||
| main.rs:815:5:815:11 | nested8 | my2/nested2.rs:22:5:26:5 | mod nested8 |
|
||||
| main.rs:815:5:815:14 | ...::f | my2/nested2.rs:23:9:25:9 | fn f |
|
||||
| main.rs:816:5:816:7 | my3 | my2/mod.rs:18:1:18:12 | mod my3 |
|
||||
| main.rs:816:5:816:10 | ...::f | my2/my3/mod.rs:1:1:5:1 | fn f |
|
||||
| main.rs:817:5:817:12 | nested_f | my/my4/my5/mod.rs:1:1:3:1 | fn f |
|
||||
| main.rs:818:5:818:7 | m18 | main.rs:553:1:571:1 | mod m18 |
|
||||
| main.rs:818:5:818:12 | ...::m19 | main.rs:558:5:570:5 | mod m19 |
|
||||
| main.rs:818:5:818:17 | ...::m20 | main.rs:563:9:569:9 | mod m20 |
|
||||
| main.rs:818:5:818:20 | ...::g | main.rs:564:13:568:13 | fn g |
|
||||
| main.rs:819:5:819:7 | m23 | main.rs:600:1:625:1 | mod m23 |
|
||||
| main.rs:819:5:819:10 | ...::f | main.rs:620:5:624:5 | fn f |
|
||||
| main.rs:820:5:820:7 | m24 | main.rs:627:1:695:1 | mod m24 |
|
||||
| main.rs:820:5:820:10 | ...::f | main.rs:681:5:694:5 | fn f |
|
||||
| main.rs:821:5:821:8 | zelf | main.rs:0:0:0:0 | Crate(main@0.0.1) |
|
||||
| main.rs:821:5:821:11 | ...::h | main.rs:56:1:75:1 | fn h |
|
||||
| main.rs:822:5:822:13 | z_changed | main.rs:700:1:700:8 | fn z_changed |
|
||||
| main.rs:823:5:823:11 | AStruct | main.rs:702:1:702:17 | struct AStruct |
|
||||
| main.rs:823:5:823:22 | ...::z_on_type | main.rs:706:5:706:16 | fn z_on_type |
|
||||
| main.rs:824:5:824:11 | AStruct | main.rs:702:1:702:17 | struct AStruct |
|
||||
| main.rs:825:5:825:29 | impl_with_attribute_macro | main.rs:770:1:789:1 | mod impl_with_attribute_macro |
|
||||
| main.rs:825:5:825:35 | ...::test | main.rs:785:5:788:5 | fn test |
|
||||
| my2/mod.rs:5:5:5:11 | nested2 | my2/mod.rs:1:1:1:16 | mod nested2 |
|
||||
| my2/mod.rs:5:5:5:20 | ...::nested3 | my2/nested2.rs:1:1:11:1 | mod nested3 |
|
||||
| my2/mod.rs:5:5:5:29 | ...::nested4 | my2/nested2.rs:2:5:10:5 | mod nested4 |
|
||||
| my2/mod.rs:5:5:5:32 | ...::f | my2/nested2.rs:3:9:5:9 | fn f |
|
||||
| my2/mod.rs:8:9:8:15 | nested2 | my2/mod.rs:1:1:1:16 | mod nested2 |
|
||||
| my2/mod.rs:8:9:8:24 | ...::nested5 | my2/nested2.rs:13:1:19:1 | mod nested5 |
|
||||
| my2/mod.rs:10:9:10:15 | nested2 | my2/mod.rs:1:1:1:16 | mod nested2 |
|
||||
| my2/mod.rs:10:9:10:24 | ...::nested7 | my2/nested2.rs:21:1:27:1 | mod nested7 |
|
||||
| my2/mod.rs:10:9:10:33 | ...::nested8 | my2/nested2.rs:22:5:26:5 | mod nested8 |
|
||||
| my2/mod.rs:10:37:10:40 | self | my2/nested2.rs:22:5:26:5 | mod nested8 |
|
||||
| my2/mod.rs:17:5:17:9 | mymod | my2/mod.rs:14:1:15:10 | mod mymod |
|
||||
| my2/mod.rs:17:5:17:12 | ...::f | my2/renamed.rs:1:1:1:13 | fn f |
|
||||
| my2/mod.rs:11:9:11:15 | nested2 | my2/mod.rs:1:1:1:16 | mod nested2 |
|
||||
| my2/mod.rs:11:9:11:24 | ...::nested7 | my2/nested2.rs:21:1:27:1 | mod nested7 |
|
||||
| my2/mod.rs:11:9:11:33 | ...::nested8 | my2/nested2.rs:22:5:26:5 | mod nested8 |
|
||||
| my2/mod.rs:12:5:12:8 | self | my2/nested2.rs:22:5:26:5 | mod nested8 |
|
||||
| my2/mod.rs:13:5:13:5 | f | my2/nested2.rs:23:9:25:9 | fn f |
|
||||
| my2/mod.rs:16:5:16:11 | nested2 | my2/mod.rs:1:1:1:16 | mod nested2 |
|
||||
| my2/mod.rs:16:5:16:20 | ...::nested5 | my2/nested2.rs:13:1:19:1 | mod nested5 |
|
||||
| my2/mod.rs:16:5:16:29 | ...::nested6 | my2/nested2.rs:14:5:18:5 | mod nested6 |
|
||||
| my2/mod.rs:16:5:16:32 | ...::f | my2/nested2.rs:15:9:17:9 | fn f |
|
||||
| my2/mod.rs:23:9:23:13 | mymod | my2/mod.rs:20:1:21:10 | mod mymod |
|
||||
| my2/mod.rs:23:9:23:16 | ...::f | my2/renamed.rs:1:1:1:13 | fn f |
|
||||
| my2/my3/mod.rs:3:5:3:5 | g | my2/mod.rs:3:1:6:1 | fn g |
|
||||
| my2/my3/mod.rs:4:5:4:5 | h | main.rs:50:1:69:1 | fn h |
|
||||
| my2/my3/mod.rs:7:5:7:9 | super | my2/mod.rs:1:1:17:30 | SourceFile |
|
||||
| my2/my3/mod.rs:7:5:7:16 | ...::super | main.rs:1:1:799:2 | SourceFile |
|
||||
| my2/my3/mod.rs:7:5:7:19 | ...::h | main.rs:50:1:69:1 | fn h |
|
||||
| my2/my3/mod.rs:8:5:8:9 | super | my2/mod.rs:1:1:17:30 | SourceFile |
|
||||
| my2/my3/mod.rs:4:5:4:5 | h | main.rs:56:1:75:1 | fn h |
|
||||
| my2/my3/mod.rs:7:5:7:9 | super | my2/mod.rs:1:1:23:34 | SourceFile |
|
||||
| my2/my3/mod.rs:7:5:7:16 | ...::super | main.rs:1:1:826:2 | SourceFile |
|
||||
| my2/my3/mod.rs:7:5:7:19 | ...::h | main.rs:56:1:75:1 | fn h |
|
||||
| my2/my3/mod.rs:8:5:8:9 | super | my2/mod.rs:1:1:23:34 | SourceFile |
|
||||
| my2/my3/mod.rs:8:5:8:12 | ...::g | my2/mod.rs:3:1:6:1 | fn g |
|
||||
| my2/my3/mod.rs:10:5:10:9 | super | my2/mod.rs:1:1:23:34 | SourceFile |
|
||||
| my2/my3/mod.rs:10:5:10:20 | ...::nested6_f | my2/nested2.rs:15:9:17:9 | fn f |
|
||||
| my.rs:3:5:3:10 | nested | my.rs:1:1:1:15 | mod nested |
|
||||
| my.rs:3:5:3:13 | ...::g | my/nested.rs:19:1:22:1 | fn g |
|
||||
| my.rs:11:5:11:5 | g | my/nested.rs:19:1:22:1 | fn g |
|
||||
@@ -471,4 +491,7 @@ resolvePath
|
||||
| proc_macro.rs:8:21:8:23 | syn | {EXTERNAL LOCATION} | Crate(syn@2.0.103) |
|
||||
| proc_macro.rs:8:21:8:30 | ...::Ident | {EXTERNAL LOCATION} | struct Ident |
|
||||
| proc_macro.rs:8:21:8:35 | ...::new | {EXTERNAL LOCATION} | fn new |
|
||||
| proc_macro.rs:16:24:16:34 | TokenStream | {EXTERNAL LOCATION} | struct TokenStream |
|
||||
| proc_macro.rs:16:43:16:53 | TokenStream | {EXTERNAL LOCATION} | struct TokenStream |
|
||||
| proc_macro.rs:16:59:16:69 | TokenStream | {EXTERNAL LOCATION} | struct TokenStream |
|
||||
testFailures
|
||||
|
||||
@@ -8,5 +8,11 @@ pub fn add_suffix(attr: TokenStream, item: TokenStream) -> TokenStream {
|
||||
ast.sig.ident = syn::Ident::new(&format!("{}_{}", ast.sig.ident, suff), ast.sig.ident.span());
|
||||
quote! {
|
||||
#ast
|
||||
}.into()
|
||||
}
|
||||
.into()
|
||||
}
|
||||
|
||||
#[proc_macro_attribute]
|
||||
pub fn identity(_attr: TokenStream, item: TokenStream) -> TokenStream {
|
||||
item
|
||||
}
|
||||
|
||||
1574
rust/ql/test/query-tests/security/CWE-319/Cargo.lock
generated
Normal file
1574
rust/ql/test/query-tests/security/CWE-319/Cargo.lock
generated
Normal file
File diff suppressed because it is too large
Load Diff
76
rust/ql/test/query-tests/security/CWE-319/UseOfHttp.expected
Normal file
76
rust/ql/test/query-tests/security/CWE-319/UseOfHttp.expected
Normal file
@@ -0,0 +1,76 @@
|
||||
#select
|
||||
| main.rs:12:22:12:43 | ...::get | main.rs:12:45:12:68 | "http://example.com/api" | main.rs:12:22:12:43 | ...::get | This URL may be constructed with the HTTP protocol, from $@. | main.rs:12:45:12:68 | "http://example.com/api" | this HTTP URL |
|
||||
| main.rs:13:22:13:43 | ...::get | main.rs:13:45:13:68 | "HTTP://EXAMPLE.COM/API" | main.rs:13:22:13:43 | ...::get | This URL may be constructed with the HTTP protocol, from $@. | main.rs:13:45:13:68 | "HTTP://EXAMPLE.COM/API" | this HTTP URL |
|
||||
| main.rs:14:22:14:43 | ...::get | main.rs:14:45:14:73 | "http://api.example.com/data" | main.rs:14:22:14:43 | ...::get | This URL may be constructed with the HTTP protocol, from $@. | main.rs:14:45:14:73 | "http://api.example.com/data" | this HTTP URL |
|
||||
| main.rs:26:21:26:42 | ...::get | main.rs:23:20:23:39 | "http://example.com" | main.rs:26:21:26:42 | ...::get | This URL may be constructed with the HTTP protocol, from $@. | main.rs:23:20:23:39 | "http://example.com" | this HTTP URL |
|
||||
| main.rs:37:30:37:51 | ...::get | main.rs:34:20:34:28 | "http://" | main.rs:37:30:37:51 | ...::get | This URL may be constructed with the HTTP protocol, from $@. | main.rs:34:20:34:28 | "http://" | this HTTP URL |
|
||||
| main.rs:60:20:60:41 | ...::get | main.rs:60:43:60:65 | "http://172.32.0.0/baz" | main.rs:60:20:60:41 | ...::get | This URL may be constructed with the HTTP protocol, from $@. | main.rs:60:43:60:65 | "http://172.32.0.0/baz" | this HTTP URL |
|
||||
| main.rs:71:24:71:45 | ...::get | main.rs:68:19:68:53 | "http://example.com/sensitive-... | main.rs:71:24:71:45 | ...::get | This URL may be constructed with the HTTP protocol, from $@. | main.rs:68:19:68:53 | "http://example.com/sensitive-... | this HTTP URL |
|
||||
edges
|
||||
| main.rs:12:45:12:68 | "http://example.com/api" | main.rs:12:22:12:43 | ...::get | provenance | MaD:1 Sink:MaD:1 |
|
||||
| main.rs:13:45:13:68 | "HTTP://EXAMPLE.COM/API" | main.rs:13:22:13:43 | ...::get | provenance | MaD:1 Sink:MaD:1 |
|
||||
| main.rs:14:45:14:73 | "http://api.example.com/data" | main.rs:14:22:14:43 | ...::get | provenance | MaD:1 Sink:MaD:1 |
|
||||
| main.rs:23:9:23:16 | base_url | main.rs:25:28:25:53 | MacroExpr | provenance | |
|
||||
| main.rs:23:20:23:39 | "http://example.com" | main.rs:23:9:23:16 | base_url | provenance | |
|
||||
| main.rs:25:9:25:16 | full_url | main.rs:26:45:26:52 | full_url | provenance | |
|
||||
| main.rs:25:20:25:26 | res | main.rs:25:28:25:53 | { ... } | provenance | |
|
||||
| main.rs:25:28:25:53 | ...::format(...) | main.rs:25:20:25:26 | res | provenance | |
|
||||
| main.rs:25:28:25:53 | ...::must_use(...) | main.rs:25:9:25:16 | full_url | provenance | |
|
||||
| main.rs:25:28:25:53 | MacroExpr | main.rs:25:28:25:53 | ...::format(...) | provenance | MaD:2 |
|
||||
| main.rs:25:28:25:53 | { ... } | main.rs:25:28:25:53 | ...::must_use(...) | provenance | MaD:3 |
|
||||
| main.rs:26:44:26:52 | &full_url [&ref] | main.rs:26:21:26:42 | ...::get | provenance | MaD:1 Sink:MaD:1 |
|
||||
| main.rs:26:45:26:52 | full_url | main.rs:26:44:26:52 | &full_url [&ref] | provenance | |
|
||||
| main.rs:34:9:34:16 | protocol | main.rs:36:32:36:53 | MacroExpr | provenance | |
|
||||
| main.rs:34:20:34:28 | "http://" | main.rs:34:9:34:16 | protocol | provenance | |
|
||||
| main.rs:36:9:36:20 | insecure_url | main.rs:37:54:37:65 | insecure_url | provenance | |
|
||||
| main.rs:36:24:36:30 | res | main.rs:36:32:36:53 | { ... } | provenance | |
|
||||
| main.rs:36:32:36:53 | ...::format(...) | main.rs:36:24:36:30 | res | provenance | |
|
||||
| main.rs:36:32:36:53 | ...::must_use(...) | main.rs:36:9:36:20 | insecure_url | provenance | |
|
||||
| main.rs:36:32:36:53 | MacroExpr | main.rs:36:32:36:53 | ...::format(...) | provenance | MaD:2 |
|
||||
| main.rs:36:32:36:53 | { ... } | main.rs:36:32:36:53 | ...::must_use(...) | provenance | MaD:3 |
|
||||
| main.rs:37:53:37:65 | &insecure_url [&ref] | main.rs:37:30:37:51 | ...::get | provenance | MaD:1 Sink:MaD:1 |
|
||||
| main.rs:37:54:37:65 | insecure_url | main.rs:37:53:37:65 | &insecure_url [&ref] | provenance | |
|
||||
| main.rs:60:43:60:65 | "http://172.32.0.0/baz" | main.rs:60:20:60:41 | ...::get | provenance | MaD:1 Sink:MaD:1 |
|
||||
| main.rs:68:13:68:15 | url | main.rs:71:47:71:49 | url | provenance | |
|
||||
| main.rs:68:19:68:53 | "http://example.com/sensitive-... | main.rs:68:13:68:15 | url | provenance | |
|
||||
| main.rs:71:47:71:49 | url | main.rs:71:24:71:45 | ...::get | provenance | MaD:1 Sink:MaD:1 |
|
||||
models
|
||||
| 1 | Sink: reqwest::blocking::get; Argument[0]; request-url |
|
||||
| 2 | Summary: alloc::fmt::format; Argument[0]; ReturnValue; taint |
|
||||
| 3 | Summary: core::hint::must_use; Argument[0]; ReturnValue; value |
|
||||
nodes
|
||||
| main.rs:12:22:12:43 | ...::get | semmle.label | ...::get |
|
||||
| main.rs:12:45:12:68 | "http://example.com/api" | semmle.label | "http://example.com/api" |
|
||||
| main.rs:13:22:13:43 | ...::get | semmle.label | ...::get |
|
||||
| main.rs:13:45:13:68 | "HTTP://EXAMPLE.COM/API" | semmle.label | "HTTP://EXAMPLE.COM/API" |
|
||||
| main.rs:14:22:14:43 | ...::get | semmle.label | ...::get |
|
||||
| main.rs:14:45:14:73 | "http://api.example.com/data" | semmle.label | "http://api.example.com/data" |
|
||||
| main.rs:23:9:23:16 | base_url | semmle.label | base_url |
|
||||
| main.rs:23:20:23:39 | "http://example.com" | semmle.label | "http://example.com" |
|
||||
| main.rs:25:9:25:16 | full_url | semmle.label | full_url |
|
||||
| main.rs:25:20:25:26 | res | semmle.label | res |
|
||||
| main.rs:25:28:25:53 | ...::format(...) | semmle.label | ...::format(...) |
|
||||
| main.rs:25:28:25:53 | ...::must_use(...) | semmle.label | ...::must_use(...) |
|
||||
| main.rs:25:28:25:53 | MacroExpr | semmle.label | MacroExpr |
|
||||
| main.rs:25:28:25:53 | { ... } | semmle.label | { ... } |
|
||||
| main.rs:26:21:26:42 | ...::get | semmle.label | ...::get |
|
||||
| main.rs:26:44:26:52 | &full_url [&ref] | semmle.label | &full_url [&ref] |
|
||||
| main.rs:26:45:26:52 | full_url | semmle.label | full_url |
|
||||
| main.rs:34:9:34:16 | protocol | semmle.label | protocol |
|
||||
| main.rs:34:20:34:28 | "http://" | semmle.label | "http://" |
|
||||
| main.rs:36:9:36:20 | insecure_url | semmle.label | insecure_url |
|
||||
| main.rs:36:24:36:30 | res | semmle.label | res |
|
||||
| main.rs:36:32:36:53 | ...::format(...) | semmle.label | ...::format(...) |
|
||||
| main.rs:36:32:36:53 | ...::must_use(...) | semmle.label | ...::must_use(...) |
|
||||
| main.rs:36:32:36:53 | MacroExpr | semmle.label | MacroExpr |
|
||||
| main.rs:36:32:36:53 | { ... } | semmle.label | { ... } |
|
||||
| main.rs:37:30:37:51 | ...::get | semmle.label | ...::get |
|
||||
| main.rs:37:53:37:65 | &insecure_url [&ref] | semmle.label | &insecure_url [&ref] |
|
||||
| main.rs:37:54:37:65 | insecure_url | semmle.label | insecure_url |
|
||||
| main.rs:60:20:60:41 | ...::get | semmle.label | ...::get |
|
||||
| main.rs:60:43:60:65 | "http://172.32.0.0/baz" | semmle.label | "http://172.32.0.0/baz" |
|
||||
| main.rs:68:13:68:15 | url | semmle.label | url |
|
||||
| main.rs:68:19:68:53 | "http://example.com/sensitive-... | semmle.label | "http://example.com/sensitive-... |
|
||||
| main.rs:71:24:71:45 | ...::get | semmle.label | ...::get |
|
||||
| main.rs:71:47:71:49 | url | semmle.label | url |
|
||||
subpaths
|
||||
@@ -0,0 +1,4 @@
|
||||
query: queries/security/CWE-319/UseOfHttp.ql
|
||||
postprocess:
|
||||
- utils/test/PrettyPrintModels.ql
|
||||
- utils/test/InlineExpectationsTestQuery.ql
|
||||
83
rust/ql/test/query-tests/security/CWE-319/main.rs
Normal file
83
rust/ql/test/query-tests/security/CWE-319/main.rs
Normal file
@@ -0,0 +1,83 @@
|
||||
use reqwest;
|
||||
use std::env;
|
||||
|
||||
fn main() {
|
||||
test_direct_literals();
|
||||
test_dynamic_urls();
|
||||
test_localhost_exemptions();
|
||||
}
|
||||
|
||||
fn test_direct_literals() {
|
||||
// BAD: Direct HTTP URLs that should be flagged
|
||||
let _response1 = reqwest::blocking::get("http://example.com/api").unwrap(); // $ Alert[rust/non-https-url]
|
||||
let _response2 = reqwest::blocking::get("HTTP://EXAMPLE.COM/API").unwrap(); // $ Alert[rust/non-https-url]
|
||||
let _response3 = reqwest::blocking::get("http://api.example.com/data").unwrap(); // $ Alert[rust/non-https-url]
|
||||
|
||||
// GOOD: HTTPS URLs that should not be flagged
|
||||
let _response3 = reqwest::blocking::get("https://example.com/api").unwrap();
|
||||
let _response4 = reqwest::blocking::get("https://api.example.com/data").unwrap();
|
||||
}
|
||||
|
||||
fn test_dynamic_urls() {
|
||||
// BAD: HTTP URLs constructed dynamically
|
||||
let base_url = "http://example.com"; // $ Source
|
||||
let endpoint = "/api/users";
|
||||
let full_url = format!("{}{}", base_url, endpoint);
|
||||
let _response = reqwest::blocking::get(&full_url).unwrap(); // $ Alert[rust/non-https-url]
|
||||
|
||||
// GOOD: HTTPS URLs constructed dynamically
|
||||
let secure_base = "https://example.com";
|
||||
let secure_full = format!("{}{}", secure_base, endpoint);
|
||||
let _secure_response = reqwest::blocking::get(&secure_full).unwrap();
|
||||
|
||||
// BAD: HTTP protocol string
|
||||
let protocol = "http://"; // $ Source
|
||||
let host = "api.example.com";
|
||||
let insecure_url = format!("{}{}", protocol, host);
|
||||
let _insecure_response = reqwest::blocking::get(&insecure_url).unwrap(); // $ Alert[rust/non-https-url]
|
||||
|
||||
// GOOD: HTTPS protocol string
|
||||
let secure_protocol = "https://";
|
||||
let secure_url = format!("{}{}", secure_protocol, host);
|
||||
let _secure_response2 = reqwest::blocking::get(&secure_url).unwrap();
|
||||
}
|
||||
|
||||
fn test_localhost_exemptions() {
|
||||
// GOOD: localhost URLs should not be flagged (local development)
|
||||
let _local1 = reqwest::blocking::get("http://localhost:8080/api").unwrap();
|
||||
let _local2 = reqwest::blocking::get("HTTP://LOCALHOST:8080/api").unwrap();
|
||||
let _local3 = reqwest::blocking::get("http://127.0.0.1:3000/test").unwrap();
|
||||
let _local4 = reqwest::blocking::get("http://192.168.1.100/internal").unwrap();
|
||||
let _local5 = reqwest::blocking::get("http://10.0.0.1/admin").unwrap();
|
||||
let _local6 = reqwest::blocking::get("http://172.16.0.0/foo").unwrap();
|
||||
let _local7 = reqwest::blocking::get("http://172.31.255.255/bar").unwrap();
|
||||
|
||||
// GOOD: test IPv6 localhost variants
|
||||
let _local8 = reqwest::blocking::get("http://[::1]:8080/api").unwrap();
|
||||
let _local9 = reqwest::blocking::get("http://[0:0:0:0:0:0:0:1]/test").unwrap();
|
||||
|
||||
// BAD: non-private IP address
|
||||
let _local10 = reqwest::blocking::get("http://172.32.0.0/baz").unwrap(); // $ Alert[rust/non-https-url]
|
||||
|
||||
}
|
||||
|
||||
// Additional test cases that mirror the Bad/Good examples
|
||||
fn test_examples() {
|
||||
// From UseOfHttpBad.rs - BAD case
|
||||
{
|
||||
let url = "http://example.com/sensitive-data"; // $ Source
|
||||
|
||||
// This makes an insecure HTTP request that can be intercepted
|
||||
let response = reqwest::blocking::get(url).unwrap(); // $ Alert[rust/non-https-url]
|
||||
println!("Response: {}", response.text().unwrap());
|
||||
}
|
||||
|
||||
// From UseOfHttpGood.rs - GOOD case
|
||||
{
|
||||
let url = "https://example.com/sensitive-data";
|
||||
|
||||
// This makes a secure HTTPS request that is encrypted
|
||||
let response = reqwest::blocking::get(url).unwrap();
|
||||
println!("Response: {}", response.text().unwrap());
|
||||
}
|
||||
}
|
||||
3
rust/ql/test/query-tests/security/CWE-319/options.yml
Normal file
3
rust/ql/test/query-tests/security/CWE-319/options.yml
Normal file
@@ -0,0 +1,3 @@
|
||||
qltest_cargo_check: true
|
||||
qltest_dependencies:
|
||||
- reqwest = { version = "0.12.9", features = ["blocking"] }
|
||||
@@ -59,13 +59,11 @@ edges
|
||||
| test.rs:129:4:130:21 | fn bad3_1 | test.rs:130:5:130:19 | call_target3_1(...) |
|
||||
| test.rs:130:5:130:19 | call_target3_1(...) | test.rs:124:1:126:1 | fn call_target3_1 |
|
||||
| test.rs:144:1:144:7 | Attr | test.rs:145:4:147:21 | fn bad3_3 |
|
||||
| test.rs:144:1:148:1 | fn bad3_3 | test.rs:146:5:146:20 | call_target3_1(...) |
|
||||
| test.rs:145:4:147:21 | fn bad3_3 | test.rs:146:5:146:19 | call_target3_1(...) |
|
||||
| test.rs:146:5:146:19 | call_target3_1(...) | test.rs:124:1:126:1 | fn call_target3_1 |
|
||||
| test.rs:146:5:146:20 | call_target3_1(...) | test.rs:124:1:126:1 | fn call_target3_1 |
|
||||
| test.rs:150:1:150:7 | Attr | test.rs:151:4:152:13 | fn bad3_4 |
|
||||
| test.rs:151:4:152:13 | fn bad3_4 | test.rs:152:5:152:11 | bad3_3(...) |
|
||||
| test.rs:152:5:152:11 | bad3_3(...) | test.rs:144:1:148:1 | fn bad3_3 |
|
||||
| test.rs:152:5:152:11 | bad3_3(...) | test.rs:145:4:147:21 | fn bad3_3 |
|
||||
| test.rs:168:1:168:7 | Attr | test.rs:169:4:170:16 | fn bad4_1 |
|
||||
| test.rs:169:4:170:16 | fn bad4_1 | test.rs:168:1:168:7 | ... .write(...) |
|
||||
| test.rs:169:4:170:16 | fn bad4_1 | test.rs:168:1:168:7 | ...::stdout(...) |
|
||||
|
||||
@@ -1020,6 +1020,12 @@ module MakeWithSplitting<
|
||||
not jbp instanceof BasicBlocks::EntryBasicBlock and
|
||||
id = idOfAstNode(jbp.getFirstNode().(AstCfgNode).getAstNode()) and
|
||||
kind = 1
|
||||
or
|
||||
exists(AnnotatedExitNode aen |
|
||||
jbp.getFirstNode() = aen and
|
||||
id = idOfCfgScope(aen.getScope()) and
|
||||
if aen.isNormal() then kind = 2 else kind = 3
|
||||
)
|
||||
}
|
||||
|
||||
string getSplitString(BasicBlocks::JoinPredecessorBasicBlock jbp) {
|
||||
|
||||
Reference in New Issue
Block a user