aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSven Vermeulen <sven.vermeulen@siphos.be>2013-12-20 15:08:44 +0100
committerSven Vermeulen <sven.vermeulen@siphos.be>2013-12-20 15:08:44 +0100
commit544b76229debef4bb6489933d07e3c933acc85dc (patch)
treeffd81d6dc128bee8fbb931aa8bc3aff4447b3111
parentForgot to reference oval checks for quota mounts (diff)
downloadhardened-docs-544b76229debef4bb6489933d07e3c933acc85dc.tar.gz
hardened-docs-544b76229debef4bb6489933d07e3c933acc85dc.tar.bz2
hardened-docs-544b76229debef4bb6489933d07e3c933acc85dc.zip
Run oscap in tmp dir as well
-rw-r--r--xml/SCAP/Makefile34
1 files changed, 19 insertions, 15 deletions
diff --git a/xml/SCAP/Makefile b/xml/SCAP/Makefile
index 93cd449..8b54a28 100644
--- a/xml/SCAP/Makefile
+++ b/xml/SCAP/Makefile
@@ -1,23 +1,27 @@
all: report-gentoo-xccdf.html guide-gentoo-xccdf.html remediate-gentoo-xccdf.sh guide-gentoo-xccdf.docbook report-gentoo-oval.xml
-report-gentoo-xccdf.html: gentoo-cpe.xml gentoo-xccdf.xml gentoo-oval.xml
- -oscap xccdf eval --cpe gentoo-cpe.xml --profile xccdf_org.gentoo.dev.swift_profile_default-oval --results ~/tmp/results-gentoo-xccdf.xml --oval-results --report ~/tmp/report-gentoo-xccdf.html gentoo-xccdf.xml
+report-gentoo-xccdf.html: gentoo-cpe.xml gentoo-xccdf.xml gentoo-oval.xml prep
+ -pushd ~/tmp; oscap xccdf eval --cpe gentoo-cpe.xml --profile xccdf_org.gentoo.dev.swift_profile_default-oval --results results-gentoo-xccdf.xml --oval-results --check-engine-results --report report-gentoo-xccdf.html gentoo-xccdf.xml; popd
-guide-gentoo-xccdf.html: gentoo-cpe.xml gentoo-xccdf.xml gentoo-oval.xml
- oscap xccdf generate guide --profile xccdf_org.gentoo.dev.swift_profile_default-oval --output ~/tmp/guide-gentoo-xccdf.html gentoo-xccdf.xml
+guide-gentoo-xccdf.html: gentoo-cpe.xml gentoo-xccdf.xml gentoo-oval.xml prep
+ -pushd ~/tmp; oscap xccdf generate guide --profile xccdf_org.gentoo.dev.swift_profile_default-oval --output guide-gentoo-xccdf.html gentoo-xccdf.xml; popd
-guide-gentoo-xccdf.docbook: gentoo-cpe.xml gentoo-xccdf.xml gentoo-oval.xml
- oscap xccdf generate guide --profile xccdf_org.gentoo.dev.swift_profile_default-oval --format docbook --output ~/tmp/guide-gentoo-xccdf.docbook gentoo-xccdf.xml
+guide-gentoo-xccdf.docbook: gentoo-cpe.xml gentoo-xccdf.xml gentoo-oval.xml prep
+ -pushd ~/tmp; oscap xccdf generate guide --profile xccdf_org.gentoo.dev.swift_profile_default-oval --format docbook --output guide-gentoo-xccdf.docbook gentoo-xccdf.xml; popd
-remediate-gentoo-xccdf.sh:
- oscap xccdf generate fix --output ~/tmp/remediate-gentoo-xccdf.sh ~/tmp/results-gentoo-xccdf.xml
- chmod 0644 ~/tmp/remediate-gentoo-xccdf.sh
+remediate-gentoo-xccdf.sh: prep
+ -pushd ~/tmp; oscap xccdf generate fix --output remediate-gentoo-xccdf.sh results-gentoo-xccdf.xml chmod 0644 remediate-gentoo-xccdf.sh; popd
-gentoo-ds.xml:
- oscap ds sds-compose gentoo-xccdf.xml ~/tmp/gentoo-ds.xml
- oscap ds sds-add gentoo-cpe.xml ~/tmp/gentoo-ds.xml
+gentoo-ds.xml: prep
+ -pushd ~/tmp; oscap ds sds-compose gentoo-xccdf.xml gentoo-ds.xml; popd
+ -pushd ~/tmp; oscap ds sds-add gentoo-cpe.xml gentoo-ds.xml; popd
-report-gentoo-oval.xml:
- oscap oval eval --report ~/tmp/report-gentoo-oval.html --results ~/tmp/results-gentoo-oval.xml gentoo-oval.xml
+report-gentoo-oval.xml: prep
+ -pushd ~/tmp; oscap oval eval --report report-gentoo-oval.html --results results-gentoo-oval.xml gentoo-oval.xml; popd
-.PHONY: all
+prep:
+ -cp gentoo-cpe.xml ~/tmp
+ -cp gentoo-xccdf.xml ~/tmp
+ -cp gentoo-oval.xml ~/tmp
+
+.PHONY: all prep