Generate SCAP
To generate SCAP, OVAL, or XCCDF documents, use the generate_scap.py
script.
- List available baselines:
./scripts/generate_scap.py -l
- Generate SCAP 1.3 document for all baselines:
./scripts/generate_scap.py
- Generate only XCCDF or OVAL:
./scripts/generate_scap.py -x
(XCCDF)./scripts/generate_scap.py -o
(OVAL) - Generate for a specific baseline:
./scripts/generate_scap.py -b stig -x
Directory
build/
- [generated SCAP/XCCDF/OVAL files]
Directory
rules/
- [rule files with baseline tags]
Directory
custom/
- [custom rule files with baseline tags]
Directory
scripts/
- generate_scap.py
Example Output:
➜ macos_security git:(sequoia) ./scripts/generate_scap.py./scripts/generate_scap.py -l800-171800-53r4_high800-53r4_low800-53r4_moderate800-53r5_high800-53r5_low800-53r5_moderate800-53r5_privacycis_lvl1cis_lvl2cisv8cnssi-1253stig➜ macos_security git:(ventura) ./scripts/generate_scap.py -b stig -x
This generates an XCCDF document in the build
folder for just the stig
baseline.
SCAP References
Section titled “SCAP References”Security Content Automation Protocol (SCAP) 1.3
An SCAP data stream (typically) consists of several XML documents knit together in a containing XML document. The component documents are:
- An XCCDF document
- An OVAL document referenced by the XCCDF document
- An OCIL document referenced by the XCCDF document
- A CPE dictionary document referenced by the XCCDF document
- An OVAL document referenced by the CPE dictionary document
National Checklist Program for IT Products Guidelines for Checklist Users and Developers