зеркало из https://github.com/github/codeql.git
Update shared/threat-models/codeql/threatmodels/ThreatModels.qll
Co-authored-by: Michael Nebel <michaelnebel@github.com>
This commit is contained in:
Родитель
8d9e4d391f
Коммит
927eb8424d
|
@ -46,22 +46,21 @@ private string getParentThreatModel(string child) {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets the `enabled` column of the highest-priority configuration row whose `kind` column includes
|
* Holds if the `enabled` column is set to `true` of the highest-priority configuration row
|
||||||
* the specified threat model kind.
|
* whose `kind` column includes the specified threat model kind.
|
||||||
*/
|
*/
|
||||||
private boolean threatModelExplicitState(string kind) {
|
private predicate threatModelEnabled(string kind) {
|
||||||
// Find the highest-oriority configuration row whose `kind` column includes the specified threat
|
// Find the highest-oriority configuration row whose `kind` column includes the specified threat
|
||||||
// model kind. If such a row exists and its `enabled` column is `true`, then the threat model is
|
// model kind. If such a row exists and its `enabled` column is `true`, then the threat model is
|
||||||
// enabled.
|
// enabled.
|
||||||
(knownThreatModel(kind) or kind = "<other>") and
|
knownThreatModel(kind) and
|
||||||
result =
|
max(boolean enabled, int priority |
|
||||||
max(boolean enabled, int priority |
|
exists(string configuredKind | configuredKind = getParentThreatModel*(kind) |
|
||||||
exists(string configuredKind | configuredKind = getParentThreatModel*(kind) |
|
threatModelConfiguration(configuredKind, enabled, priority)
|
||||||
threatModelConfiguration(configuredKind, enabled, priority)
|
|
||||||
)
|
|
||||||
|
|
|
||||||
enabled order by priority
|
|
||||||
)
|
)
|
||||||
|
|
|
||||||
|
enabled order by priority
|
||||||
|
) = true
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Загрузка…
Ссылка в новой задаче