Compliance audit procedures for Linux & Windows estates — evaluated against CIS Level 1 Server, PCI-DSS, and Microsoft Security Baselines to enforce security best practices and regulatory compliance.
This guide outlines comprehensive compliance audit procedures across Linux and Windows estates. Linux systems use OpenSCAP and the SCAP Security Guide evaluated against CIS Level 1 Server and PCI-DSS benchmarks. Windows hosts use the Microsoft Security Compliance Toolkit (SCT) with Policy Analyzer to compare live state against official Microsoft Security Baselines.
Update the package repository and upgrade existing packages so the system has the latest security patches before scanning.
sudo apt update
sudo apt upgrade
Install the core OpenSCAP scanner and utilities required for compliance scanning.
sudo apt install -y openscap-scanner openscap-utils
Install additional SCAP Security Guide packages for Debian-derived systems.
sudo apt install -y ssg-debderived
sudo apt install -y ssg-base
Ensure unzip is available for extracting the security guide archive.
sudo apt update && sudo apt install -y unzip
Download the latest SCAP Security Guide content package from the official ComplianceAsCode repository.
wget https://github.com/ComplianceAsCode/content/releases/latest/download/scap-security-guide-0.1.79.zip
Extract the downloaded archive to access the compliance content.
unzip scap-security-guide-0.1.79.zip
cd scap-security-guide-0.1.79
Find the specific SCAP data stream file for Ubuntu 24.04.
find . -name "*ubuntu2404-ds.xml"
Display information about available compliance profiles in the data stream — CIS benchmarks, DISA STIG, and other frameworks.
oscap info ssg-ubuntu2404-ds.xml
Run the comprehensive compliance scan against the CIS Level 1 Server profile.
sudo oscap xccdf eval \
--profile xccdf_org.ssgproject.content_profile_cis_level1_server \
--results ubuntu2404-cis-results.xml \
--report ubuntu2404-cis-report.html \
ssg-ubuntu2404-ds.xml
A standardized workflow for auditing a Windows 10 / 11 system against the official Microsoft Security Baselines. This process identifies security "loopholes" (misconfigurations) by comparing the machine's live state against Microsoft's recommended hardened state.
Unlike older methods (like SCM 4.0), modern auditing uses the Microsoft Security Compliance Toolkit (SCT). Download the following from Microsoft:
To audit a system, first convert Microsoft's GPO files into a format the analyzer can read.
This phase identifies the differences between the local machine and the baseline.
Results are displayed in a color-coded grid that maps directly to compliance state:
To share findings with stakeholders:
Once the audit is complete, the system can be hardened using one of two methods:
LGPO.exe /g "C:\Path\To\Baseline\GPOs"
A compliance audit is not complete until it is verified. After applying fixes:
Install the SCAP Security Guide package which contains security policies and compliance profiles for Oracle Linux.
sudo dnf install -y scap-security-guide
Before running the audit, understand what security profiles are available in the SCAP content for Oracle Linux 9 — including benchmarks and compliance standards.
sudo oscap info "/usr/share/xml/scap/ssg/content/ssg-ol9-ds.xml"
Execute the CIS benchmark audit. This scan evaluates the system against CIS standards and automatically applies remediation where possible.
sudo oscap xccdf eval \
--profile xccdf_org.ssgproject.content_profile_cis \
--remediate \
/usr/share/xml/scap/ssg/content/ssg-ol9-ds.xml
Execute the PCI-DSS (Payment Card Industry Data Security Standard) compliance audit. This scan generates detailed reports in both XML and HTML formats for review and client presentation.
sudo oscap xccdf eval \
--profile xccdf_org.ssgproject.content_profile_pci-dss \
--results-arf /tmp/pci-dss-arf.xml \
--report /tmp/pci-dss-report.html \
/usr/share/xml/scap/ssg/content/ssg-ol9-ds.xml
Automated compliance audits with OpenSCAP turn a multi-day manual review into a single command. The same XML/HTML report can be submitted to auditors, attached to change tickets, or piped into a SIEM for trending — every Linux host in the fleet measured against the same yardstick.