Skip to main content
Version: v0.19.0

cve-count

Max allowed violations for a given severity level.

ProviderLevelTags
trivyWarningsecurity

Parameters

NameDefault ValueDescription
levelcriticaln/a
max_count0n/a

Messages

TypeMessage
PassNumber of ${rule.params.level} vulnerabilities is within limits.
FailImage has ${results.trivy.${rule.params.level}_count} ${rule.params.level} CVEs (max allowed: ${rule.params.max_count}).

Playbook Example

rules:
- provider: trivy
rule: cve-count
options:
level: critical
max_count: 0

Condition

{
"<=": [
{
"get": [
{
"var": "results.trivy"
},
{
"cat": [
{
"var": "rule.params.level"
},
"_count"
]
}
]
},
{
"var": "rule.params.max_count"
}
]
}