Skip to content
This repository was archived by the owner on Jan 3, 2023. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions container/help.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#!/bin/bash

DOCKER="/usr/bin/docker"
SELF=$1

VERSION=$(${DOCKER} inspect -f '{{ index .Config.Labels "version" }}' ${SELF})
RELEASE=$(${DOCKER} inspect -f '{{ index .Config.Labels "release" }}' ${SELF})
if [ -z ${RELEASE} ]; then
echo -e "${SELF} image version: ${VERSION}\n"
else
echo -e "${SELF} image version: ${VERSION}-${RELEASE}\n"
fi

DESCRIPTION=$(${DOCKER} inspect -f '{{ index .Config.Labels "description" }}' ${SELF})
echo -e "Description:\n${DESCRIPTION}\n"

echo "OpenSCAP packages bundled in ${SELF} image:"
rpm -qa | grep openscap
rpm -qa | grep scap-security-guide
6 changes: 4 additions & 2 deletions generate-dockerfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@
("io.k8s.description", "OpenSCAP is an auditing tool that utilizes the Extensible Configuration Checklist Description Format (XCCDF). XCCDF is a standard way of expressing checklist content and defines security checklists."),
("io.openshift.tags", "security openscap scan"),
("install", "docker run --rm --privileged -v /:/host/ IMAGE sh /root/install.sh IMAGE"),
("run", "docker run -it --rm -v /:/host/ IMAGE sh /root/run.sh")
("run", "docker run -it --rm -v /:/host/ IMAGE sh /root/run.sh"),
("help", "docker run --rm --privileged -v /usr/bin:/usr/bin -v /var/run:/var/run -v /lib:/lib -v /lib64:/lib64 -v /etc/sysconfig:/etc/sysconfig IMAGE sh /root/help.sh IMAGE")
]
packages = [
"bzip2",
Expand All @@ -24,7 +25,8 @@
("container/run.sh", "/root"),
("container/openscap", "/root"),
("container/config.ini", "/root"),
("container/remediate.py", "/root")
("container/remediate.py", "/root"),
("container/help.sh", "/root")
]
env_variables = [
("container", "docker")
Expand Down