C#: Add queries for extracting hand written MaD models.

This commit is contained in:
Michael Nebel
2022-10-11 15:48:42 +02:00
parent 2a0c3636c7
commit 4972839b69
3 changed files with 51 additions and 0 deletions

View File

@@ -0,0 +1,17 @@
/**
* @name Extract MaD sink model rows.
* @description This extracts the Models as data sink model rows.
* @id cs/utils/modelconverter/generate-data-extensions-sink
*/
import csharp
import semmle.code.csharp.dataflow.ExternalFlow
from
string namespace, string type, boolean subtypes, string name, string signature, string ext,
string input, string kind, string provenance
where
sinkModel(namespace, type, subtypes, name, signature, ext, input, kind, provenance) and
provenance != "generated"
select namespace, type, subtypes, name, signature, ext, input, kind, provenance order by
namespace, type, name, signature, input, kind

View File

@@ -0,0 +1,17 @@
/**
* @name Extract MaD source model rows.
* @description This extracts the Models as data source model rows.
* @id cs/utils/modelconverter/generate-data-extensions-source
*/
import csharp
import semmle.code.csharp.dataflow.ExternalFlow
from
string namespace, string type, boolean subtypes, string name, string signature, string ext,
string output, string kind, string provenance
where
sourceModel(namespace, type, subtypes, name, signature, ext, output, kind, provenance) and
provenance != "generated"
select namespace, type, subtypes, name, signature, ext, output, kind, provenance order by
namespace, type, name, signature, output, kind

View File

@@ -0,0 +1,17 @@
/**
* @name Extract MaD summary model rows.
* @description This extracts the Models as data summary model rows.
* @id cs/utils/modelconverter/generate-data-extensions-summary
*/
import csharp
import semmle.code.csharp.dataflow.ExternalFlow
from
string namespace, string type, boolean subtypes, string name, string signature, string ext,
string input, string output, string kind, string provenance
where
summaryModel(namespace, type, subtypes, name, signature, ext, input, output, kind, provenance) and
provenance != "generated"
select namespace, type, subtypes, name, signature, ext, input, output, kind, provenance order by
namespace, type, name, signature, input, output, kind