Puppet Class: security_baseline::rules::common::sec_squashfs
- Defined in:
- manifests/rules/common/sec_squashfs.pp
Summary
Ensure mounting of squashfs filesystems is disabled (Scored)Overview
The squashfs filesystem type is a compressed read-only Linux filesystem embedded in small footprint systems (similar to cramfs ). A squashfs image can be used without having to first decompress the image.
Rationale: Removing support for unneeded filesystem types reduces the local attack surface of the system. If this filesystem type is not needed, disable it.
29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 |
# File 'manifests/rules/common/sec_squashfs.pp', line 29
class security_baseline::rules::common::sec_squashfs (
Boolean $enforce = true,
String $message = '',
String $log_level = ''
) {
if $enforce {
kmod::install { 'squashfs':
command => '/bin/true',
}
} else {
if($facts['security_baseline']['kernel_modules']['squashfs']) {
echo { 'squashfs':
message => $message,
loglevel => $log_level,
withpath => false,
}
}
}
}
|