mirror of
https://github.com/github/codeql.git
synced 2026-04-23 07:45:17 +02:00
Convert existing mapped-property classes to directly extend DatabaseInputSource
This commit is contained in:
@@ -12,6 +12,7 @@ private import semmle.code.csharp.frameworks.Sql
|
||||
private import semmle.code.csharp.dataflow.internal.FlowSummaryImpl::Public
|
||||
private import semmle.code.csharp.dataflow.internal.FlowSummaryImpl::Private
|
||||
private import semmle.code.csharp.dataflow.internal.DataFlowPrivate as DataFlowPrivate
|
||||
private import semmle.code.csharp.security.dataflow.flowsources.Stored as Stored
|
||||
|
||||
/**
|
||||
* Definitions relating to the `System.ComponentModel.DataAnnotations`
|
||||
@@ -44,7 +45,7 @@ module EntityFramework {
|
||||
}
|
||||
|
||||
/** A taint source where the data has come from a mapped property stored in the database. */
|
||||
class StoredFlowSource extends DataFlow::Node {
|
||||
class StoredFlowSource extends Stored::DatabaseInputSource {
|
||||
StoredFlowSource() {
|
||||
this.asExpr() = any(PropertyRead read | read.getTarget() instanceof MappedProperty)
|
||||
}
|
||||
|
||||
@@ -6,6 +6,7 @@ import csharp
|
||||
private import semmle.code.csharp.frameworks.System
|
||||
private import semmle.code.csharp.frameworks.system.Collections
|
||||
private import semmle.code.csharp.frameworks.Sql
|
||||
private import semmle.code.csharp.security.dataflow.flowsources.Stored as Stored
|
||||
|
||||
/** Definitions relating to the `NHibernate` package. */
|
||||
module NHibernate {
|
||||
@@ -86,7 +87,7 @@ module NHibernate {
|
||||
}
|
||||
|
||||
/** A taint source where the data has come from a mapped property stored in the database. */
|
||||
class StoredFlowSource extends DataFlow::Node {
|
||||
class StoredFlowSource extends Stored::DatabaseInputSource {
|
||||
StoredFlowSource() {
|
||||
this.asExpr() = any(PropertyRead read | read.getTarget() instanceof MappedProperty)
|
||||
}
|
||||
|
||||
@@ -60,7 +60,7 @@ class DbDataReaderPropertyStoredFlowSource extends DatabaseInputSource {
|
||||
}
|
||||
|
||||
/** A read of a mapped property. */
|
||||
class ORMMappedProperty extends DatabaseInputSource {
|
||||
deprecated class ORMMappedProperty extends DataFlow::Node {
|
||||
ORMMappedProperty() {
|
||||
this instanceof EntityFramework::StoredFlowSource or
|
||||
this instanceof NHibernate::StoredFlowSource
|
||||
|
||||
Reference in New Issue
Block a user