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) {
4646}
4747
4848/**
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.
5151 */
52- private boolean threatModelExplicitState ( string kind ) {
52+ private predicate threatModelEnabled ( string kind ) {
5353 // Find the highest-oriority configuration row whose `kind` column includes the specified threat
5454 // model kind. If such a row exists and its `enabled` column is `true`, then the threat model is
5555 // 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 )
6460 )
61+ |
62+ enabled order by priority
63+ ) = true
6564}
6665
6766/**
You can’t perform that action at this time.
0 commit comments