Skip to content
This repository was archived by the owner on Jan 3, 2023. It is now read-only.

Commit 64d72c9

Browse files
Merge branch 'master' into container-help
2 parents cba69b7 + 74cdc86 commit 64d72c9

File tree

4 files changed

+5
-3
lines changed

4 files changed

+5
-3
lines changed

container/install.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,14 @@
33
ETC='/etc/oscapd'
44
ETC_FILE='config.ini'
55
HOST='/host'
6+
SELF=$1
67

78
echo ""
89
echo "Installing the configuration file 'openscap' into /etc/atomic.d/. You can now use this scanner with atomic scan with the --scanner openscap command-line option. You can also set 'openscap' as the default scanner in /etc/atomic.conf. To list the scanners you have configured for your system, use 'atomic scan --list'."
910

1011
echo ""
1112
cp /root/openscap /host/etc/atomic.d/
13+
sed -i "s|\$IMAGE_NAME|${SELF}|" /host/etc/atomic.d/openscap
1214

1315
SCRIPTS="/etc/atomic.d/scripts/"
1416
echo ""

container/openscap

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
type: scanner
22
scanner_name: openscap
3-
image_name: openscap
3+
image_name: $IMAGE_NAME
44
default_scan: cve
55
custom_args: ['-v', '/etc/oscapd:/etc/oscapd:ro']
66
remediation_script: '/etc/atomic.d/scripts/remediate.py'

generate-dockerfile.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
("io.k8s.display-name", "OpenSCAP"),
1313
("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."),
1414
("io.openshift.tags", "security openscap scan"),
15-
("install", "docker run --rm --privileged -v /:/host/ IMAGE sh /root/install.sh"),
15+
("install", "docker run --rm --privileged -v /:/host/ IMAGE sh /root/install.sh IMAGE"),
1616
("run", "docker run -it --rm -v /:/host/ IMAGE sh /root/run.sh"),
1717
("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")
1818
]

openscap_daemon/oscap_helpers.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -474,7 +474,7 @@ def _get_result_id(results_path):
474474
return test_result.attrib["id"]
475475

476476

477-
def generate_fix_for_result(config, results_path, fix_type, xccdf_id):
477+
def generate_fix_for_result(config, results_path, fix_type, xccdf_id=None):
478478
if not os.path.exists(results_path):
479479
raise RuntimeError("Can't generate fix for scan result. Expected "
480480
"results XML at '%s' but the file doesn't exist."

0 commit comments

Comments
 (0)