Skip to content

Commit dd2cc1e

Browse files
committed
(CONT-5) Codebase hardening
Prior to this commit, and after the work perform in CONT-256, there were a few commands in the module that were not properly sanitised according to our current standards. This PR aims to implement some changes that ensure no malformed commands are passed through to the system. Primarily, the commands targeted were the ones related to Open3 and exec.
1 parent 0070c25 commit dd2cc1e

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

manifests/linux/redhat.pp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,10 @@
7474

7575
if ($::operatingsystem != 'Amazon') {
7676
if $ensure == 'running' {
77+
$running_command = ['/usr/bin/systemctl', 'daemon-reload']
78+
7779
exec { '/usr/bin/systemctl daemon-reload':
80+
command => $running_command,
7881
require => Package[$package_name],
7982
before => Service[$service_name, $service_name_v6],
8083
subscribe => Package[$package_name],

0 commit comments

Comments
 (0)