Skip to content

Commit 7fe378e

Browse files
authored
Merge pull request #15756 from egregius313/egregius313/csharp/dataflow/threat-model/remove-addlocalsource
C#: Remove `AddLocalSource` classes from queries
2 parents 58f2777 + 3fdc7e9 commit 7fe378e

File tree

5 files changed

+12
-6
lines changed

5 files changed

+12
-6
lines changed

csharp/ql/lib/semmle/code/csharp/security/dataflow/CodeInjectionQuery.qll

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,8 +68,6 @@ deprecated class RemoteSource extends DataFlow::Node instanceof RemoteFlowSource
6868
*/
6969
deprecated class LocalSource extends DataFlow::Node instanceof LocalFlowSource { }
7070

71-
private class AddLocalSource extends Source instanceof LocalFlowSource { }
72-
7371
/** A source supported by the current threat model. */
7472
class ThreatModelSource extends Source instanceof ThreatModelFlowSource { }
7573

csharp/ql/lib/semmle/code/csharp/security/dataflow/ResourceInjectionQuery.qll

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,8 +67,6 @@ deprecated class RemoteSource extends DataFlow::Node instanceof RemoteFlowSource
6767
*/
6868
deprecated class LocalSource extends DataFlow::Node instanceof LocalFlowSource { }
6969

70-
private class AddLocalSource extends Source instanceof LocalFlowSource { }
71-
7270
/** A source supported by the current threat model. */
7371
class ThreatModelSource extends Source instanceof ThreatModelFlowSource { }
7472

csharp/ql/lib/semmle/code/csharp/security/dataflow/SqlInjectionQuery.qll

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,8 +78,6 @@ deprecated class RemoteSource extends DataFlow::Node instanceof RemoteFlowSource
7878
*/
7979
deprecated class LocalSource extends DataFlow::Node instanceof LocalFlowSource { }
8080

81-
private class AddLocalSource extends Source instanceof LocalFlowSource { }
82-
8381
/** A source supported by the current threat model. */
8482
class ThreatModelSource extends Source instanceof ThreatModelFlowSource { }
8583

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
category: minorAnalysis
3+
---
4+
* Data flow queries that track flow from *local* flow sources now use the current *threat model* configuration instead. This may lead to changes in the produced alerts if the threat model configuration only uses *remote* flow sources. The changed queries are `cs/code-injection`, `cs/resource-injection`, `cs/sql-injection`, and `cs/uncontrolled-format-string`.
5+
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
extensions:
2+
3+
- addsTo:
4+
pack: codeql/threat-models
5+
extensible: threatModelConfiguration
6+
data:
7+
- ["local", true, 0]

0 commit comments

Comments
 (0)