Skip to content

Commit

Permalink
Merge pull request #15756 from egregius313/egregius313/csharp/dataflo…
Browse files Browse the repository at this point in the history
…w/threat-model/remove-addlocalsource

C#: Remove `AddLocalSource` classes from queries
  • Loading branch information
egregius313 authored Mar 11, 2024
2 parents 58f2777 + 3fdc7e9 commit 7fe378e
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,6 @@ deprecated class RemoteSource extends DataFlow::Node instanceof RemoteFlowSource
*/
deprecated class LocalSource extends DataFlow::Node instanceof LocalFlowSource { }

private class AddLocalSource extends Source instanceof LocalFlowSource { }

/** A source supported by the current threat model. */
class ThreatModelSource extends Source instanceof ThreatModelFlowSource { }

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,6 @@ deprecated class RemoteSource extends DataFlow::Node instanceof RemoteFlowSource
*/
deprecated class LocalSource extends DataFlow::Node instanceof LocalFlowSource { }

private class AddLocalSource extends Source instanceof LocalFlowSource { }

/** A source supported by the current threat model. */
class ThreatModelSource extends Source instanceof ThreatModelFlowSource { }

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,6 @@ deprecated class RemoteSource extends DataFlow::Node instanceof RemoteFlowSource
*/
deprecated class LocalSource extends DataFlow::Node instanceof LocalFlowSource { }

private class AddLocalSource extends Source instanceof LocalFlowSource { }

/** A source supported by the current threat model. */
class ThreatModelSource extends Source instanceof ThreatModelFlowSource { }

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
category: minorAnalysis
---
* 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`.

Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
extensions:

- addsTo:
pack: codeql/threat-models
extensible: threatModelConfiguration
data:
- ["local", true, 0]

0 comments on commit 7fe378e

Please sign in to comment.