Skip to content

Commit f0e7f1a

Browse files
committed
C++/C#/Go: Align ExternalFlowExtensions with Java.
1 parent cb578e3 commit f0e7f1a

File tree

3 files changed

+73
-0
lines changed

3 files changed

+73
-0
lines changed

cpp/ql/lib/semmle/code/cpp/dataflow/internal/ExternalFlowExtensions.qll

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
* This module provides extensible predicates for defining MaD models.
33
*/
44

5+
private import codeql.mad.static.MaD as SharedMaD
6+
57
/**
68
* Holds if an external source model exists for the given parameters.
79
*/
@@ -18,10 +20,37 @@ extensible predicate sinkModel(
1820
string input, string kind, string provenance, QlBuiltins::ExtensionId madId
1921
);
2022

23+
/**
24+
* Holds if a barrier model exists for the given parameters.
25+
*/
26+
extensible predicate barrierModel(
27+
string namespace, string type, boolean subtypes, string name, string signature, string ext,
28+
string output, string kind, string provenance, QlBuiltins::ExtensionId madId
29+
);
30+
31+
/**
32+
* Holds if a barrier guard model exists for the given parameters.
33+
*/
34+
extensible predicate barrierGuardModel(
35+
string namespace, string type, boolean subtypes, string name, string signature, string ext,
36+
string input, string acceptingvalue, string kind, string provenance, QlBuiltins::ExtensionId madId
37+
);
38+
2139
/**
2240
* Holds if an external summary model exists for the given parameters.
2341
*/
2442
extensible predicate summaryModel(
2543
string namespace, string type, boolean subtypes, string name, string signature, string ext,
2644
string input, string output, string kind, string provenance, QlBuiltins::ExtensionId madId
2745
);
46+
47+
/**
48+
* Holds if a neutral model exists for the given parameters.
49+
*/
50+
extensible predicate neutralModel(
51+
string namespace, string type, string name, string signature, string kind, string provenance
52+
);
53+
54+
module Extensions implements SharedMaD::ExtensionsSig {
55+
import ExternalFlowExtensions
56+
}

csharp/ql/lib/semmle/code/csharp/dataflow/internal/ExternalFlowExtensions.qll

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
* This module provides extensible predicates for defining MaD models.
33
*/
44

5+
private import codeql.mad.static.MaD as SharedMaD
6+
57
/**
68
* Holds if a source model exists for the given parameters.
79
*/
@@ -18,6 +20,22 @@ extensible predicate sinkModel(
1820
string input, string kind, string provenance, QlBuiltins::ExtensionId madId
1921
);
2022

23+
/**
24+
* Holds if a barrier model exists for the given parameters.
25+
*/
26+
extensible predicate barrierModel(
27+
string namespace, string type, boolean subtypes, string name, string signature, string ext,
28+
string output, string kind, string provenance, QlBuiltins::ExtensionId madId
29+
);
30+
31+
/**
32+
* Holds if a barrier guard model exists for the given parameters.
33+
*/
34+
extensible predicate barrierGuardModel(
35+
string namespace, string type, boolean subtypes, string name, string signature, string ext,
36+
string input, string acceptingvalue, string kind, string provenance, QlBuiltins::ExtensionId madId
37+
);
38+
2139
/**
2240
* Holds if a summary model exists for the given parameters.
2341
*/
@@ -32,3 +50,7 @@ extensible predicate summaryModel(
3250
extensible predicate neutralModel(
3351
string namespace, string type, string name, string signature, string kind, string provenance
3452
);
53+
54+
module Extensions implements SharedMaD::ExtensionsSig {
55+
import ExternalFlowExtensions
56+
}

go/ql/lib/semmle/go/dataflow/internal/ExternalFlowExtensions.qll

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
* This module provides extensible predicates for defining MaD models.
33
*/
44

5+
private import codeql.mad.static.MaD as SharedMaD
6+
57
/**
68
* Holds if a source model exists for the given parameters.
79
*/
@@ -18,6 +20,22 @@ extensible predicate sinkModel(
1820
string input, string kind, string provenance, QlBuiltins::ExtensionId madId
1921
);
2022

23+
/**
24+
* Holds if a barrier model exists for the given parameters.
25+
*/
26+
extensible predicate barrierModel(
27+
string package, string type, boolean subtypes, string name, string signature, string ext,
28+
string output, string kind, string provenance, QlBuiltins::ExtensionId madId
29+
);
30+
31+
/**
32+
* Holds if a barrier guard model exists for the given parameters.
33+
*/
34+
extensible predicate barrierGuardModel(
35+
string package, string type, boolean subtypes, string name, string signature, string ext,
36+
string input, string acceptingvalue, string kind, string provenance, QlBuiltins::ExtensionId madId
37+
);
38+
2139
/**
2240
* Holds if a summary model exists for the given parameters.
2341
*/
@@ -37,3 +55,7 @@ extensible predicate neutralModel(
3755
* Holds if the package `package` is part of the group `group`.
3856
*/
3957
extensible predicate packageGrouping(string group, string package);
58+
59+
module Extensions implements SharedMaD::ExtensionsSig {
60+
import ExternalFlowExtensions
61+
}

0 commit comments

Comments
 (0)