[PATCH 2/2] Added package_*_installed remediations from template

Shawn Wells shawn.d.wells at gmail.com
Sun Jul 7 07:38:58 UTC 2013


-------------- next part --------------
>From 6a60667211c912cf3fd3fe80e712c86b192a946f Mon Sep 17 00:00:00 2001
From: Shawn Wells <shawn at redhat.com>
Date: Sun, 7 Jul 2013 03:20:44 -0400
Subject: [PATCH 2/2] Added package_*_installed remediations from template

[shawn at rhel6 templates]$ make packages
./create_package_installed.py packages_installed.csv
./create_package_removed.py packages_removed.csv

[shawn at rhel6 templates]$ ../testcheck.py output/package_*_installed.xml
Evaluating with OVAL tempfile : /tmp/package_aide_installedgnj2WE.xml
Definition oval:scap-security-guide.testing:def:100: true
Evaluation done.
Evaluating with OVAL tempfile : /tmp/package_audit_installedZRX7UK.xml
Definition oval:scap-security-guide.testing:def:103: true
Evaluation done.
Evaluating with OVAL tempfile : /tmp/package_cronie_installedKeZqP7.xml
Definition oval:scap-security-guide.testing:def:106: true
Evaluation done.
Evaluating with OVAL tempfile : /tmp/package_iptables_installed7abVNm.xml
Definition oval:scap-security-guide.testing:def:109: true
Evaluation done.
Evaluating with OVAL tempfile : /tmp/package_iptables-ipv6_installedKrIpUv.xml
Definition oval:scap-security-guide.testing:def:112: true
Evaluation done.
Evaluating with OVAL tempfile : /tmp/package_irqbalance_installedEDLhHr.xml
Definition oval:scap-security-guide.testing:def:115: true
Evaluation done.
Evaluating with OVAL tempfile : /tmp/package_ntp_installedfhZ7lg.xml
Definition oval:scap-security-guide.testing:def:118: true
Evaluation done.
Evaluating with OVAL tempfile : /tmp/package_openswan_installedacZbHI.xml
Definition oval:scap-security-guide.testing:def:121: false
Evaluation done.
Evaluating with OVAL tempfile : /tmp/package_policycoreutils_installedvKexE3.xml
Definition oval:scap-security-guide.testing:def:124: true
Evaluation done.
Evaluating with OVAL tempfile : /tmp/package_postfix_installed83pAF3.xml
Definition oval:scap-security-guide.testing:def:127: true
Evaluation done.
Evaluating with OVAL tempfile : /tmp/package_psacct_installedIAnuAg.xml
Definition oval:scap-security-guide.testing:def:130: true
Evaluation done.
Evaluating with OVAL tempfile : /tmp/package_screen_installedspnVoP.xml
Definition oval:scap-security-guide.testing:def:133: true
Evaluation done.
Evaluating with OVAL tempfile : /tmp/package_vsftpd_installedK3O0Hn.xml
Definition oval:scap-security-guide.testing:def:136: true
Evaluation done.

[shawn at rhel6 templates]$ ../testcheck.py output/package_*_removed.xml
Evaluating with OVAL tempfile : /tmp/package_abrt_removedOrsEhu.xml
Definition oval:scap-security-guide.testing:def:139: false
Evaluation done.
Evaluating with OVAL tempfile : /tmp/package_at_removediK6HTc.xml
Definition oval:scap-security-guide.testing:def:142: false
Evaluation done.
Evaluating with OVAL tempfile : /tmp/package_bind_removedVdK3sG.xml
Definition oval:scap-security-guide.testing:def:145: true
Evaluation done.
Evaluating with OVAL tempfile : /tmp/package_cpuspeed_removed0S4mly.xml
Definition oval:scap-security-guide.testing:def:148: false
Evaluation done.
Evaluating with OVAL tempfile : /tmp/package_cups_removed286Wo2.xml
Definition oval:scap-security-guide.testing:def:151: false
Evaluation done.
Evaluating with OVAL tempfile : /tmp/package_cyrus-sasl_removedI2fiLP.xml
Definition oval:scap-security-guide.testing:def:154: false
Evaluation done.
Evaluating with OVAL tempfile : /tmp/package_dbus_removedp9evD3.xml
Definition oval:scap-security-guide.testing:def:157: false
Evaluation done.
Evaluating with OVAL tempfile : /tmp/package_dhcpd_removedUKjuC3.xml
Definition oval:scap-security-guide.testing:def:160: true
Evaluation done.
Evaluating with OVAL tempfile : /tmp/package_dhcp_removedZVRHCG.xml
Definition oval:scap-security-guide.testing:def:163: true
Evaluation done.
Evaluating with OVAL tempfile : /tmp/package_dovecot_removedrKKhE8.xml
Definition oval:scap-security-guide.testing:def:166: true
Evaluation done.
Evaluating with OVAL tempfile : /tmp/package_hal_removedjUnGOg.xml
Definition oval:scap-security-guide.testing:def:169: false
Evaluation done.
Evaluating with OVAL tempfile : /tmp/package_httpd_removedlw10Lq.xml
Definition oval:scap-security-guide.testing:def:172: false
Evaluation done.
Evaluating with OVAL tempfile : /tmp/package_iputils_removed7fEp2U.xml
Definition oval:scap-security-guide.testing:def:175: false
Evaluation done.
Evaluating with OVAL tempfile : /tmp/package_kexec-tools_removedA4GI_L.xml
Definition oval:scap-security-guide.testing:def:178: false
Evaluation done.
Evaluating with OVAL tempfile : /tmp/package_libcgroup_removedsF4Yjl.xml
Definition oval:scap-security-guide.testing:def:181: false
Evaluation done.
Evaluating with OVAL tempfile : /tmp/package_mdadm_removedK15Vd2.xml
Definition oval:scap-security-guide.testing:def:184: false
Evaluation done.
Evaluating with OVAL tempfile : /tmp/package_net-snmp_removed8b5g7V.xml
Definition oval:scap-security-guide.testing:def:187: false
Evaluation done.
Evaluating with OVAL tempfile : /tmp/package_nfs-utils_removedUMyvKG.xml
Definition oval:scap-security-guide.testing:def:190: false
Evaluation done.
Evaluating with OVAL tempfile : /tmp/package_oddjob_removedco2UEP.xml
Definition oval:scap-security-guide.testing:def:193: false
Evaluation done.
Evaluating with OVAL tempfile : /tmp/package_openldap-servers_removed3LNoGl.xml
Definition oval:scap-security-guide.testing:def:196: true
Evaluation done.
Evaluating with OVAL tempfile : /tmp/package_openssh-server_removedbM7IFe.xml
Definition oval:scap-security-guide.testing:def:199: false
Evaluation done.
Evaluating with OVAL tempfile : /tmp/package_pam_ldap_removedPLb4vg.xml
Definition oval:scap-security-guide.testing:def:202: true
Evaluation done.
Evaluating with OVAL tempfile : /tmp/package_portreserve_removedyVKJl6.xml
Definition oval:scap-security-guide.testing:def:205: false
Evaluation done.
Evaluating with OVAL tempfile : /tmp/package_qpid-cpp-server_removed_zQ0Rv.xml
Definition oval:scap-security-guide.testing:def:208: false
Evaluation done.
Evaluating with OVAL tempfile : /tmp/package_quota_removedOxv1Hr.xml
Definition oval:scap-security-guide.testing:def:211: false
Evaluation done.
Evaluating with OVAL tempfile : /tmp/package_rhnsd_removedktYSLL.xml
Definition oval:scap-security-guide.testing:def:214: false
Evaluation done.
Evaluating with OVAL tempfile : /tmp/package_rsh-server_removedPlSrTR.xml
Definition oval:scap-security-guide.testing:def:217: true
Evaluation done.
Evaluating with OVAL tempfile : /tmp/package_samba-common_removedquUsaC.xml
Definition oval:scap-security-guide.testing:def:220: false
Evaluation done.
Evaluating with OVAL tempfile : /tmp/package_sendmail_removedfZ6HWI.xml
Definition oval:scap-security-guide.testing:def:223: true
Evaluation done.
Evaluating with OVAL tempfile : /tmp/package_smartmontools_removedGpABP6.xml
Definition oval:scap-security-guide.testing:def:226: false
Evaluation done.
Evaluating with OVAL tempfile : /tmp/package_squid_removedksiwSi.xml
Definition oval:scap-security-guide.testing:def:229: true
Evaluation done.
Evaluating with OVAL tempfile : /tmp/package_subscription-manager_removedVDwXq7.xml
Definition oval:scap-security-guide.testing:def:232: false
Evaluation done.
Evaluating with OVAL tempfile : /tmp/package_sysstat_removed5m6PpE.xml
Definition oval:scap-security-guide.testing:def:235: false
Evaluation done.
Evaluating with OVAL tempfile : /tmp/package_talk-server_removedlV3K7O.xml
Definition oval:scap-security-guide.testing:def:238: true
Evaluation done.
Evaluating with OVAL tempfile : /tmp/package_telnet-server_removedFUBQZ9.xml
Definition oval:scap-security-guide.testing:def:241: false
Evaluation done.
Evaluating with OVAL tempfile : /tmp/package_tftp-server_removed6jQhyJ.xml
Definition oval:scap-security-guide.testing:def:244: false
Evaluation done.
Evaluating with OVAL tempfile : /tmp/package_vsftpd_removedZ_qUzG.xml
Definition oval:scap-security-guide.testing:def:247: false
Evaluation done.
Evaluating with OVAL tempfile : /tmp/package_xinetd_removed7LPhO9.xml
Definition oval:scap-security-guide.testing:def:250: false
Evaluation done.
Evaluating with OVAL tempfile : /tmp/package_xorg-x11-server-common_removed0ISUsp.xml
Definition oval:scap-security-guide.testing:def:253: false
Evaluation done.
Evaluating with OVAL tempfile : /tmp/package_ypbind_removedX8c6H0.xml
Definition oval:scap-security-guide.testing:def:256: false
Evaluation done.
Evaluating with OVAL tempfile : /tmp/package_ypserv_removedt597bV.xml
Definition oval:scap-security-guide.testing:def:259: true
Evaluation done.

[shawn at rhel6 templates]$ cat output/package_*_installed.sh
yum -y install aide
yum -y install audit
yum -y install cronie
yum -y install iptables
yum -y install iptables-ipv6
yum -y install irqbalance
yum -y install ntp
yum -y install openswan
yum -y install policycoreutils
yum -y install postfix
yum -y install psacct
yum -y install screen
yum -y install vsftpd

[shawn at rhel6 templates]$ make copy ; make clean
cp output/*.xml ../
cp output/*.sh ../../fixes/bash/
rm -f output/*.xml
rm -f output/*.sh
---
 RHEL6/input/checks/package_talk-server_removed.xml |   25 ++++++++++++++++++++
 RHEL6/input/fixes/bash/package_audit_installed.sh  |    1 +
 RHEL6/input/fixes/bash/package_cronie_installed.sh |    1 +
 .../fixes/bash/package_iptables-ipv6_installed.sh  |    1 +
 .../input/fixes/bash/package_iptables_installed.sh |    1 +
 .../fixes/bash/package_irqbalance_installed.sh     |    1 +
 RHEL6/input/fixes/bash/package_ntp_installed.sh    |    1 +
 .../input/fixes/bash/package_openswan_installed.sh |    1 +
 .../bash/package_policycoreutils_installed.sh      |    1 +
 .../input/fixes/bash/package_postfix_installed.sh  |    1 +
 RHEL6/input/fixes/bash/package_psacct_installed.sh |    1 +
 RHEL6/input/fixes/bash/package_vsftpd_installed.sh |    1 +
 12 files changed, 36 insertions(+), 0 deletions(-)
 create mode 100644 RHEL6/input/checks/package_talk-server_removed.xml
 create mode 100644 RHEL6/input/fixes/bash/package_audit_installed.sh
 create mode 100644 RHEL6/input/fixes/bash/package_cronie_installed.sh
 create mode 100644 RHEL6/input/fixes/bash/package_iptables-ipv6_installed.sh
 create mode 100644 RHEL6/input/fixes/bash/package_iptables_installed.sh
 create mode 100644 RHEL6/input/fixes/bash/package_irqbalance_installed.sh
 create mode 100644 RHEL6/input/fixes/bash/package_ntp_installed.sh
 create mode 100644 RHEL6/input/fixes/bash/package_openswan_installed.sh
 create mode 100644 RHEL6/input/fixes/bash/package_policycoreutils_installed.sh
 create mode 100644 RHEL6/input/fixes/bash/package_postfix_installed.sh
 create mode 100644 RHEL6/input/fixes/bash/package_psacct_installed.sh
 create mode 100644 RHEL6/input/fixes/bash/package_vsftpd_installed.sh

diff --git a/RHEL6/input/checks/package_talk-server_removed.xml b/RHEL6/input/checks/package_talk-server_removed.xml
new file mode 100644
index 0000000..74b1735
--- /dev/null
+++ b/RHEL6/input/checks/package_talk-server_removed.xml
@@ -0,0 +1,25 @@
+<def-group>
+ <!-- THIS FILE IS GENERATED by create_package_removed.py.  DO NOT EDIT.  -->
+  <definition class="compliance" id="package_talk-server_removed"
+  version="1">
+    <metadata>
+      <title>Package talk-server Removed</title>
+      <affected family="unix">
+        <platform>Red Hat Enterprise Linux 6</platform>
+      </affected>
+      <description>The RPM package talk-server should be removed.</description>
+    </metadata>
+    <criteria>
+      <criterion comment="package talk-server is removed"
+      test_ref="test_package_talk-server_removed" />
+    </criteria>
+  </definition>
+  <linux:rpminfo_test check="all" check_existence="none_exist"
+  id="test_package_talk-server_removed" version="1"
+  comment="package talk-server is removed">
+    <linux:object object_ref="obj_package_talk-server_removed" />
+  </linux:rpminfo_test>
+  <linux:rpminfo_object id="obj_package_talk-server_removed" version="1">
+    <linux:name>talk-server</linux:name>
+  </linux:rpminfo_object>
+</def-group>
diff --git a/RHEL6/input/fixes/bash/package_audit_installed.sh b/RHEL6/input/fixes/bash/package_audit_installed.sh
new file mode 100644
index 0000000..2d1f6ad
--- /dev/null
+++ b/RHEL6/input/fixes/bash/package_audit_installed.sh
@@ -0,0 +1 @@
+yum -y install audit
diff --git a/RHEL6/input/fixes/bash/package_cronie_installed.sh b/RHEL6/input/fixes/bash/package_cronie_installed.sh
new file mode 100644
index 0000000..43d3df0
--- /dev/null
+++ b/RHEL6/input/fixes/bash/package_cronie_installed.sh
@@ -0,0 +1 @@
+yum -y install cronie
diff --git a/RHEL6/input/fixes/bash/package_iptables-ipv6_installed.sh b/RHEL6/input/fixes/bash/package_iptables-ipv6_installed.sh
new file mode 100644
index 0000000..045ce9f
--- /dev/null
+++ b/RHEL6/input/fixes/bash/package_iptables-ipv6_installed.sh
@@ -0,0 +1 @@
+yum -y install iptables-ipv6
diff --git a/RHEL6/input/fixes/bash/package_iptables_installed.sh b/RHEL6/input/fixes/bash/package_iptables_installed.sh
new file mode 100644
index 0000000..5c45081
--- /dev/null
+++ b/RHEL6/input/fixes/bash/package_iptables_installed.sh
@@ -0,0 +1 @@
+yum -y install iptables
diff --git a/RHEL6/input/fixes/bash/package_irqbalance_installed.sh b/RHEL6/input/fixes/bash/package_irqbalance_installed.sh
new file mode 100644
index 0000000..a58dfb9
--- /dev/null
+++ b/RHEL6/input/fixes/bash/package_irqbalance_installed.sh
@@ -0,0 +1 @@
+yum -y install irqbalance
diff --git a/RHEL6/input/fixes/bash/package_ntp_installed.sh b/RHEL6/input/fixes/bash/package_ntp_installed.sh
new file mode 100644
index 0000000..13c0e4f
--- /dev/null
+++ b/RHEL6/input/fixes/bash/package_ntp_installed.sh
@@ -0,0 +1 @@
+yum -y install ntp
diff --git a/RHEL6/input/fixes/bash/package_openswan_installed.sh b/RHEL6/input/fixes/bash/package_openswan_installed.sh
new file mode 100644
index 0000000..6750377
--- /dev/null
+++ b/RHEL6/input/fixes/bash/package_openswan_installed.sh
@@ -0,0 +1 @@
+yum -y install openswan
diff --git a/RHEL6/input/fixes/bash/package_policycoreutils_installed.sh b/RHEL6/input/fixes/bash/package_policycoreutils_installed.sh
new file mode 100644
index 0000000..88df025
--- /dev/null
+++ b/RHEL6/input/fixes/bash/package_policycoreutils_installed.sh
@@ -0,0 +1 @@
+yum -y install policycoreutils
diff --git a/RHEL6/input/fixes/bash/package_postfix_installed.sh b/RHEL6/input/fixes/bash/package_postfix_installed.sh
new file mode 100644
index 0000000..a845fba
--- /dev/null
+++ b/RHEL6/input/fixes/bash/package_postfix_installed.sh
@@ -0,0 +1 @@
+yum -y install postfix
diff --git a/RHEL6/input/fixes/bash/package_psacct_installed.sh b/RHEL6/input/fixes/bash/package_psacct_installed.sh
new file mode 100644
index 0000000..1e24902
--- /dev/null
+++ b/RHEL6/input/fixes/bash/package_psacct_installed.sh
@@ -0,0 +1 @@
+yum -y install psacct
diff --git a/RHEL6/input/fixes/bash/package_vsftpd_installed.sh b/RHEL6/input/fixes/bash/package_vsftpd_installed.sh
new file mode 100644
index 0000000..5d56d77
--- /dev/null
+++ b/RHEL6/input/fixes/bash/package_vsftpd_installed.sh
@@ -0,0 +1 @@
+yum -y install vsftpd
-- 
1.7.1



More information about the scap-security-guide mailing list