File tree Expand file tree Collapse file tree 2 files changed +43
-0
lines changed Expand file tree Collapse file tree 2 files changed +43
-0
lines changed Original file line number Diff line number Diff line change 1
1
private import codeql.bicep.AST
2
2
private import codeql.bicep.CFG
3
+ private import codeql.bicep.DataFlow
4
+ private import codeql.threatmodels.ThreatModels
5
+
6
+
7
+ /**
8
+ * A data flow source for a specific threat-model.
9
+ *
10
+ * Extend this class to refine existing API models. If you want to model new APIs,
11
+ * extend `ThreatModelSource::Range` instead.
12
+ */
13
+ final class ThreatModelSource = ThreatModelSource:: Range ;
14
+
15
+ /**
16
+ * Provides a class for modeling new sources for specific threat-models.
17
+ */
18
+ module ThreatModelSource {
19
+ /**
20
+ * A data flow source, for a specific threat-model.
21
+ */
22
+ abstract class Range extends DataFlow:: Node {
23
+ /**
24
+ * Gets a string that represents the source kind with respect to threat modeling.
25
+ *
26
+ * See
27
+ * - https://github.com/github/codeql/blob/main/docs/codeql/reusables/threat-model-description.rst
28
+ * - https://github.com/github/codeql/blob/main/shared/threat-models/ext/threat-model-grouping.model.yml
29
+ */
30
+ abstract string getThreatModel ( ) ;
31
+
32
+ /**
33
+ * Gets a string that describes the type of this threat-model source.
34
+ */
35
+ abstract string getSourceType ( ) ;
36
+ }
37
+ }
38
+
39
+ /**
40
+ * A data flow source that is enabled in the current threat model configuration.
41
+ */
42
+ class ActiveThreatModelSource extends ThreatModelSource {
43
+ ActiveThreatModelSource ( ) { currentThreatModel ( this .getThreatModel ( ) ) }
44
+ }
3
45
4
46
/**
5
47
* A Public Resource is a resource that is publicly accessible to the Internet.
Original file line number Diff line number Diff line change
1
+ import dataflow.TaintTracking
You can’t perform that action at this time.
0 commit comments