File tree Expand file tree Collapse file tree 1 file changed +10
-11
lines changed
shared/threat-models/codeql/threatmodels Expand file tree Collapse file tree 1 file changed +10
-11
lines changed Original file line number Diff line number Diff line change @@ -46,22 +46,21 @@ private string getParentThreatModel(string child) {
46
46
}
47
47
48
48
/**
49
- * Gets the `enabled` column of the highest-priority configuration row whose `kind` column includes
50
- * the specified threat model kind.
49
+ * Holds if the `enabled` column is set to `true` of the highest-priority configuration row
50
+ * whose `kind` column includes the specified threat model kind.
51
51
*/
52
- private boolean threatModelExplicitState ( string kind ) {
52
+ private predicate threatModelEnabled ( string kind ) {
53
53
// Find the highest-oriority configuration row whose `kind` column includes the specified threat
54
54
// model kind. If such a row exists and its `enabled` column is `true`, then the threat model is
55
55
// enabled.
56
- ( knownThreatModel ( kind ) or kind = "<other>" ) and
57
- result =
58
- max ( boolean enabled , int priority |
59
- exists ( string configuredKind | configuredKind = getParentThreatModel * ( kind ) |
60
- threatModelConfiguration ( configuredKind , enabled , priority )
61
- )
62
- |
63
- enabled order by priority
56
+ knownThreatModel ( kind ) and
57
+ max ( boolean enabled , int priority |
58
+ exists ( string configuredKind | configuredKind = getParentThreatModel * ( kind ) |
59
+ threatModelConfiguration ( configuredKind , enabled , priority )
64
60
)
61
+ |
62
+ enabled order by priority
63
+ ) = true
65
64
}
66
65
67
66
/**
You can’t perform that action at this time.
0 commit comments