Skip to content

Commit

Permalink
C#: Update external models tests and expected test output.
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelnebel committed Sep 13, 2024
1 parent 79d424e commit cbd8340
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ void Foo()
TaggedPropertySetter = propertyWrite;

object indexerWrite = new object();
this[0] = indexerWrite;
this[0] = indexerWrite; // MISSING as attributes on indexers are not extracted.
}

object SinkMethod()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ void Foo()
x = SrcTwoArg("", "");

x = TaggedSrcPropertyGetter;
x = this[0];
x = this[0]; // MISSING as attributes on indexers are not extracted.
}

[SourceAttribute]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,6 @@ invalidModelRow
| Sinks.cs:11:13:11:41 | this access | file-content-store |
| Sinks.cs:11:30:11:40 | access to local variable argToTagged | file-content-store |
| Sinks.cs:14:27:14:36 | access to local variable fieldWrite | sql-injection |
| Sinks.cs:17:36:17:48 | access to local variable propertyWrite | sql-injection |
| Sinks.cs:26:20:26:22 | access to local variable res | js-injection |
| Sinks.cs:33:20:33:25 | access to local variable resTag | html-injection |
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,4 @@ extensions:
- ["My.Qltest", "SinkAttribute", false, "", "", "Attribute", "ReturnValue", "html-injection", "manual"]
- ["My.Qltest", "SinkAttribute", false, "", "", "Attribute", "Argument", "file-content-store", "manual"]
- ["My.Qltest", "SinkAttribute", false, "", "", "Attribute", "", "sql-injection", "manual"]
- ["My.Qltest", "SinkAttribute", false, "", "", "Attribute.Setter", "Argument[0..1]", "sql-injection", "manual"]
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ invalidModelRow
| Sources.cs:17:17:17:33 | call to method TaggedSrcMethod | local |
| Sources.cs:18:17:18:30 | access to field TaggedSrcField | local |
| Sources.cs:20:17:20:33 | call to method SrcTwoArg | local |
| Sources.cs:22:17:22:39 | access to property TaggedSrcPropertyGetter | local |
| Sources.cs:27:14:27:20 | this | local |
| Sources.cs:27:29:27:45 | taggedMethodParam | local |
| Sources.cs:31:47:31:60 | taggedSrcParam | local |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,5 @@ extensions:
- ["My.Qltest", "SourceAttribute", false, "", "", "Attribute", "ReturnValue", "local", "manual"]
- ["My.Qltest", "SourceAttribute", false, "", "", "Attribute", "Parameter", "local", "manual"]
- ["My.Qltest", "SourceAttribute", false, "", "", "Attribute", "", "local", "manual"]
- ["My.Qltest", "A", false, "SrcTwoArg", "(System.String,System.String)", "", "ReturnValue", "local", "manual"]
- ["My.Qltest", "SourceAttribute", false, "", "", "Attribute.Getter", "ReturnValue", "local", "manual"]
- ["My.Qltest", "A", false, "SrcTwoArg", "(System.String,System.String)", "", "ReturnValue", "local", "manual"]

0 comments on commit cbd8340

Please sign in to comment.