diff --git a/docs/templates/template_reference.md b/docs/templates/template_reference.md index ed5a23df135..6a3336b846b 100644 --- a/docs/templates/template_reference.md +++ b/docs/templates/template_reference.md @@ -795,7 +795,7 @@ When the remediation is applied duplicate occurrences of `key` are removed. package name is provided, socketname is used. Currently, the package name is used when running Automatus test scenarios. -- languages: Ansible, Bash, OVAL +- languages: Ansible, Bash, OVAL, SCE #### sshd_lineinfile - Checks SSH server configuration items in `/etc/ssh/sshd_config` or diff --git a/shared/templates/socket_disabled/sce-bash.template b/shared/templates/socket_disabled/sce-bash.template new file mode 100644 index 00000000000..2b27cd73ba6 --- /dev/null +++ b/shared/templates/socket_disabled/sce-bash.template @@ -0,0 +1,6 @@ +#!/bin/bash +# check-import = stdout +if [[ $(systemctl is-enabled {{{ SOCKETNAME }}}.socket) == "masked" ]] ; then + exit "$XCCDF_RESULT_PASS" +fi +exit "$XCCDF_RESULT_FAIL" diff --git a/shared/templates/socket_disabled/template.yml b/shared/templates/socket_disabled/template.yml index b57de6fbb63..f084d352593 100644 --- a/shared/templates/socket_disabled/template.yml +++ b/shared/templates/socket_disabled/template.yml @@ -2,3 +2,4 @@ supported_languages: - ansible - bash - oval + - sce-bash