Skip to content

Commit 0ff12c0

Browse files
committed
Convert existing mapped-property classes to directly extend DatabaseInputSource
1 parent 9753276 commit 0ff12c0

File tree

3 files changed

+5
-3
lines changed

3 files changed

+5
-3
lines changed

csharp/ql/lib/semmle/code/csharp/frameworks/EntityFramework.qll

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ private import semmle.code.csharp.frameworks.Sql
1212
private import semmle.code.csharp.dataflow.internal.FlowSummaryImpl::Public
1313
private import semmle.code.csharp.dataflow.internal.FlowSummaryImpl::Private
1414
private import semmle.code.csharp.dataflow.internal.DataFlowPrivate as DataFlowPrivate
15+
private import semmle.code.csharp.security.dataflow.flowsources.Stored as Stored
1516

1617
/**
1718
* Definitions relating to the `System.ComponentModel.DataAnnotations`
@@ -44,7 +45,7 @@ module EntityFramework {
4445
}
4546

4647
/** A taint source where the data has come from a mapped property stored in the database. */
47-
class StoredFlowSource extends DataFlow::Node {
48+
class StoredFlowSource extends Stored::DatabaseInputSource {
4849
StoredFlowSource() {
4950
this.asExpr() = any(PropertyRead read | read.getTarget() instanceof MappedProperty)
5051
}

csharp/ql/lib/semmle/code/csharp/frameworks/NHibernate.qll

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import csharp
66
private import semmle.code.csharp.frameworks.System
77
private import semmle.code.csharp.frameworks.system.Collections
88
private import semmle.code.csharp.frameworks.Sql
9+
private import semmle.code.csharp.security.dataflow.flowsources.Stored as Stored
910

1011
/** Definitions relating to the `NHibernate` package. */
1112
module NHibernate {
@@ -86,7 +87,7 @@ module NHibernate {
8687
}
8788

8889
/** A taint source where the data has come from a mapped property stored in the database. */
89-
class StoredFlowSource extends DataFlow::Node {
90+
class StoredFlowSource extends Stored::DatabaseInputSource {
9091
StoredFlowSource() {
9192
this.asExpr() = any(PropertyRead read | read.getTarget() instanceof MappedProperty)
9293
}

csharp/ql/lib/semmle/code/csharp/security/dataflow/flowsources/Stored.qll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ class DbDataReaderPropertyStoredFlowSource extends DatabaseInputSource {
6060
}
6161

6262
/** A read of a mapped property. */
63-
class ORMMappedProperty extends DatabaseInputSource {
63+
deprecated class ORMMappedProperty extends DataFlow::Node {
6464
ORMMappedProperty() {
6565
this instanceof EntityFramework::StoredFlowSource or
6666
this instanceof NHibernate::StoredFlowSource

0 commit comments

Comments
 (0)