Skip to main content

Overview

OpenSCAP is the open standard for automated security compliance scanning. It evaluates a system against machine-readable SCAP (Security Content Automation Protocol) content — including CIS Benchmarks, DISA STIGs, PCI-DSS, HIPAA, and ANSSI profiles. Scan results are produced as detailed HTML and XML reports that map each test to a specific compliance requirement. Xloud Cloud Platform ships OpenSCAP tooling on XOS and supports fleet-wide compliance scanning via the XDeploy automation pipeline. Scan reports can be forwarded to SIEM systems or stored as audit artifacts for regulatory reviews.
Xloud-Developed — OpenSCAP is one of three independent scanners in the Xloud triple compliance system. XAVS runs SCA benchmarks, system audit, and SCAP profile scans in parallel across all nodes, providing layered compliance coverage. Results from all three scanners are aggregated in the Security Operations Dashboard.
Prerequisites
  • openscap-scanner and scap-security-guide packages installed (pre-installed on XOS nodes)
  • Guest VMs: apt install openscap-scanner ssg-debderived on Ubuntu/Debian
  • Root access on the target system
  • Target profile selected from the SCAP Security Guide (SSG)

Available Profiles

The SCAP Security Guide ships dozens of profiles for common compliance frameworks. Key profiles for Xloud environments:
Profile IDFrameworkTarget
xccdf_org.ssgproject.content_profile_cis_level1_serverCIS Level 1Ubuntu Server
xccdf_org.ssgproject.content_profile_cis_level2_serverCIS Level 2Ubuntu Server
xccdf_org.ssgproject.content_profile_pci-dssPCI-DSS v3.2.1Ubuntu Server
xccdf_org.ssgproject.content_profile_hipaaHIPAAUbuntu Server
xccdf_org.ssgproject.content_profile_anssi_bp28_highANSSI BP-028 HIGHUbuntu Server
xccdf_org.ssgproject.content_profile_stigDISA STIGRHEL-based
List all available profiles for your OS
oscap info /usr/share/xml/scap/ssg/content/ssg-ubuntu2204-ds.xml | grep "Profile:"

Run a Compliance Scan

Identify the SCAP content file

Locate SSG content for Ubuntu 22.04
ls /usr/share/xml/scap/ssg/content/ | grep ubuntu22
# Output: ssg-ubuntu2204-ds.xml

Run the scan against a profile

Scan against CIS Level 1 Server profile
oscap xccdf eval \
  --profile xccdf_org.ssgproject.content_profile_cis_level1_server \
  --results /tmp/results-cis-l1.xml \
  --report /tmp/report-cis-l1.html \
  /usr/share/xml/scap/ssg/content/ssg-ubuntu2204-ds.xml
The scan evaluates each rule and produces:
  • results-cis-l1.xml — machine-readable XCCDF results
  • report-cis-l1.html — human-readable HTML report

Review the HTML report

Copy the report to a location accessible from a browser:
Copy report to web-accessible path
cp /tmp/report-cis-l1.html /var/www/html/scap-report.html
The report shows each rule with a pass, fail, or not applicable result, linked to the compliance requirement ID and remediation guidance.
Check the score at the top of the report. A score above 80% indicates strong compliance posture for that profile.

Interpreting Results

Each rule in the HTML report maps to a specific compliance control:
ResultMeaningAction
PassSystem meets the requirementNo action needed
FailRequirement not metApply remediation
Not ApplicableRule does not apply to this systemDocument exemption
Not CheckedRule requires manual verificationPerform manual check
ErrorScan could not evaluate the ruleCheck for missing dependencies

Score Interpretation

Score RangeCompliance Posture
90–100%Excellent — minimal gaps
80–89%Good — a few controls need attention
70–79%Moderate — hardening required before production
Below 70%Poor — significant remediation needed

Scheduled Scanning

Run scans on a weekly schedule and archive results:
/etc/cron.weekly/openscap-scan
#!/bin/bash
DATE=$(date +%Y%m%d)
REPORT_DIR="/var/log/scap"
PROFILE="xccdf_org.ssgproject.content_profile_cis_level1_server"
CONTENT="/usr/share/xml/scap/ssg/content/ssg-ubuntu2204-ds.xml"

mkdir -p "$REPORT_DIR"

oscap xccdf eval \
  --profile "$PROFILE" \
  --results "$REPORT_DIR/results-$DATE.xml" \
  --report "$REPORT_DIR/report-$DATE.html" \
  "$CONTENT"

# Keep 90 days of reports
find "$REPORT_DIR" -name "*.xml" -mtime +90 -delete
find "$REPORT_DIR" -name "*.html" -mtime +90 -delete
chmod +x /etc/cron.weekly/openscap-scan

Profile Selection Guide

Workload TypeRecommended Profile
General production VMsCIS Level 1 Server
High-security workloadsCIS Level 2 Server
Payment card environmentsPCI-DSS
Healthcare dataHIPAA
Government / defenceANSSI BP-028 HIGH or DISA STIG
Development and stagingCIS Level 1 (relaxed enforcement)
Start with CIS Level 1 for all new deployments. Escalate to Level 2 or framework-specific profiles for regulated workloads.
You can create tailored profiles by extending existing SSG content using SCAP Workbench or editing the XCCDF XML directly. Custom profiles allow you to:
  • Disable rules that conflict with your application requirements
  • Add organization-specific controls
  • Override severity levels for risk-accepted findings
Store custom profiles in /etc/scap/custom-profiles/ and reference them with --profile-id in scan commands.

Next Steps

Wazuh HIDS

Complement SCAP scans with continuous real-time host intrusion detection

Lynis Auditing

Run agentless OS security audits with hardening index scoring

Compliance Frameworks

Map SCAP results to SOC 2, ISO 27001, and HIPAA audit requirements

Hardening Guide

Apply baseline hardening before running compliance scans