File tree Expand file tree Collapse file tree 2 files changed +4
-27
lines changed
lib/codeql/swift/frameworks/StandardLibrary
test/query-tests/Security/CWE-611 Expand file tree Collapse file tree 2 files changed +4
-27
lines changed Original file line number Diff line number Diff line change @@ -17,19 +17,12 @@ private class RawRepresentableSummaries extends SummaryModelCsv {
17
17
}
18
18
19
19
/**
20
- * A content implying that, if an `RawRepresentable` is tainted, then
21
- * the `rawValue` field is tainted as well.
20
+ * A content implying that, if a `RawRepresentable` is tainted, then the
21
+ * `rawValue` field is tainted as well. This model has been extended to assume
22
+ * that any object's `rawValue` field also inherits taint.
22
23
*/
23
24
private class RawRepresentableFieldsInheritTaint extends TaintInheritingContent ,
24
25
DataFlow:: Content:: FieldContent
25
26
{
26
- RawRepresentableFieldsInheritTaint ( ) {
27
- exists ( FieldDecl fieldDecl , Decl declaringDecl , TypeDecl namedTypeDecl |
28
- namedTypeDecl .getFullName ( ) = "RawRepresentable" and
29
- fieldDecl .getName ( ) = "rawValue" and
30
- declaringDecl .getAMember ( ) = fieldDecl and
31
- declaringDecl .asNominalTypeDecl ( ) = namedTypeDecl .getADerivedTypeDecl * ( ) and
32
- this .getField ( ) = fieldDecl
33
- )
34
- }
27
+ RawRepresentableFieldsInheritTaint ( ) { this .getField ( ) .getName ( ) = "rawValue" }
35
28
}
Original file line number Diff line number Diff line change 1
1
testFailures
2
- | testLibxmlXXE.swift:101:78:102:1 | // $ hasXXE=96\n | Missing result:hasXXE=96 |
3
- | testLibxmlXXE.swift:102:80:103:1 | // $ hasXXE=96\n | Missing result:hasXXE=96 |
4
- | testLibxmlXXE.swift:103:107:104:1 | // $ hasXXE=96\n | Missing result:hasXXE=96 |
5
- | testLibxmlXXE.swift:104:82:105:1 | // $ hasXXE=96\n | Missing result:hasXXE=96 |
6
- | testLibxmlXXE.swift:106:78:107:1 | // $ hasXXE=95\n | Missing result:hasXXE=95 |
7
- | testLibxmlXXE.swift:107:80:108:1 | // $ hasXXE=95\n | Missing result:hasXXE=95 |
8
- | testLibxmlXXE.swift:109:87:110:1 | // $ hasXXE=96\n | Missing result:hasXXE=96 |
9
- | testLibxmlXXE.swift:110:89:111:1 | // $ hasXXE=96\n | Missing result:hasXXE=96 |
10
- | testLibxmlXXE.swift:112:99:113:1 | // $ hasXXE=96\n | Missing result:hasXXE=96 |
11
- | testLibxmlXXE.swift:113:97:114:1 | // $ hasXXE=96\n | Missing result:hasXXE=96 |
12
- | testLibxmlXXE.swift:115:87:116:1 | // $ hasXXE=95\n | Missing result:hasXXE=95 |
13
- | testLibxmlXXE.swift:116:89:117:1 | // $ hasXXE=95\n | Missing result:hasXXE=95 |
14
- | testLibxmlXXE.swift:118:89:119:1 | // $ hasXXE=96\n | Missing result:hasXXE=96 |
15
- | testLibxmlXXE.swift:119:91:120:1 | // $ hasXXE=96\n | Missing result:hasXXE=96 |
16
- | testLibxmlXXE.swift:121:98:122:1 | // $ hasXXE=96\n | Missing result:hasXXE=96 |
17
- | testLibxmlXXE.swift:122:100:123:1 | // $ hasXXE=96\n | Missing result:hasXXE=96 |
18
2
failures
You can’t perform that action at this time.
0 commit comments