Puppet Class: vulnerability::guard
- Defined in:
- manifests/guard.pp
Summary
Guard the system for vulnerabilities.Overview
vulnerability::guard
When you include this class into your catalog, Puppet starts to guard your system. Meaning it will check on every Puppet run’s if the number of found vulnerabilities is lower than the maximum number you have specified.
When Puppet detects that more vulnerabilities are found on your system than you specified, Puppet will fail.
You will need to monitor the status of Puppet runs on the Puppet server and take appropriate actions.
Sometimes you know about a set of vulnerabilities, and you don’t want Puppet to report on this. If this is the case, add the vulnerability ID to the ‘allow_list`. Puppet will then allow this specific CVE on your system without reporting and/or failing on it.
See the file “LICENSE” for the full license governing this code.
45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 |
# File 'manifests/guard.pp', line 45
class vulnerability::guard (
Array[String[1]] $allow_list,
Optional[Integer] $critical,
Optional[Integer] $high,
Optional[Integer] $low,
Optional[Integer] $medium,
Optional[Integer] $negligible,
Optional[Integer] $unknown
) {
vulnerability_status { $facts['networking']['fqdn']:
critical => $critical,
high => $high,
medium => $medium,
low => $low,
negligible => $negligible,
unknown => $unknown,
allow_list => $allow_list,
}
}
|