Skip to content

Commit 9f7103c

Browse files
committed
Java: Add queries for extracting sources, sinks and summaries.
1 parent a8ee878 commit 9f7103c

File tree

3 files changed

+51
-0
lines changed

3 files changed

+51
-0
lines changed
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
/**
2+
* @name Extract MaD sink model rows.
3+
* @description This extracts the Models as data sink model rows.
4+
* @id java/utils/modelconverter/generate-data-extensions-sink
5+
*/
6+
7+
import java
8+
import semmle.code.java.dataflow.ExternalFlow
9+
10+
from
11+
string package, string type, boolean subtypes, string name, string signature, string ext,
12+
string input, string kind, string provenance
13+
where
14+
sinkModel(package, type, subtypes, name, signature, ext, input, kind, provenance) and
15+
provenance != "generated"
16+
select package, type, subtypes, name, signature, ext, input, kind, provenance order by
17+
package, type, name, signature, input, kind
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
/**
2+
* @name Extract MaD source model rows.
3+
* @description This extracts the Models as data source model rows.
4+
* @id java/utils/modelconverter/generate-data-extensions-source
5+
*/
6+
7+
import java
8+
import semmle.code.java.dataflow.ExternalFlow
9+
10+
from
11+
string package, string type, boolean subtypes, string name, string signature, string ext,
12+
string output, string kind, string provenance
13+
where
14+
sourceModel(package, type, subtypes, name, signature, ext, output, kind, provenance) and
15+
provenance != "generated"
16+
select package, type, subtypes, name, signature, ext, output, kind, provenance order by
17+
package, type, name, signature, output, kind
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
/**
2+
* @name Extract MaD summary model rows.
3+
* @description This extracts the Models as data summary model rows.
4+
* @id java/utils/modelconverter/generate-data-extensions-summary
5+
*/
6+
7+
import java
8+
import semmle.code.java.dataflow.ExternalFlow
9+
10+
from
11+
string package, string type, boolean subtypes, string name, string signature, string ext,
12+
string input, string output, string kind, string provenance
13+
where
14+
summaryModel(package, type, subtypes, name, signature, ext, input, output, kind, provenance) and
15+
provenance != "generated"
16+
select package, type, subtypes, name, signature, ext, input, output, kind, provenance order by
17+
package, type, name, signature, input, output, kind

0 commit comments

Comments
 (0)