stig_patch_cycle_analyzer.py is a standalone, offline, command-line Python script for parsing DISA STIG manuals authored in XCCDF (Extensible Configuration Checklist Description Format) and producing structured inventories, patch-cycle deltas, and executive-level summaries.
The script is designed for Federal, regulated, and air-gapped environments where software installation, persistent services, or external dependencies may be restricted.
This script parses DISA Security Technical Implementation Guide (STIG) manuals distributed via Cyber Exchange that are authored in XCCDF format..
It is explicitly not intended to parse:
- CKL files
- CKLB files
- SCAP scan results
- Host-level assessment outputs
If DISA or NIST introduce a successor format to XCCDF in the future, this script’s scope remains intentionally limited to XCCDF-based STIG manuals unless explicitly extended.
- Standalone script (single file)
- No installation or packaging
- No services or daemons
- No databases
- No external dependencies
- No persistent state outside run folders
- Deterministic, inspectable outputs
- Fully compatible with air-gapped systems
This script is intended to support security operations, vulnerability management, and patch-cycle analysis by converting published DISA STIG documentation into structured, auditable datasets.
The script produces:
- Structured inventories of STIG manuals and vulnerabilities
- Deterministic delta outputs between patch cycles
- Integrity-checked CSV and JSON artifacts
- A human-readable executive patch-cycle summary
- Patch-cycle comparison and trend analysis
- STIG Change detection across releases
- Vulnerability inventory tracking
- RMF, POA&M, SSP, and audit artifact generation
- Executive-level reporting on STIG changes
- Parsing or evaluating CKL or CKLB files
- Assessing system compliance or configuration state
- Performing vulnerability scanning
- Making automated compliance determinations
- Replacing assessor judgment or control validation activities
The outputs generated by this script are informational and analytical in nature.
They:
- Do not assert compliance or non-compliance
- Do not perform configuration assessment
- Do not replace assessor, AO, or control owner judgment
- Do not constitute an official security determination
All outputs should be interpreted as decision-support artifacts and must be interpreted in accordance with organizational policy and governance processes.
- The script assumes all input STIG manuals are valid DISA STIGs published in XCCDF format.
- The script does not validate the cryptographic authenticity of STIG source files.
- Delta comparisons are based on structured metadata fields and normalized text values.
- Changes in formatting, ordering, or non-semantic metadata may be flagged as differences.
- Severity weighting reflects static mappings defined in the script and is not dynamically derived.
- Parses standalone and nested STIG ZIP libraries
- Automatically skips supplemental content
- Produces normalized, audit-ready datasets
- Supports deterministic delta analysis between patch cycles
- Generates executive-level summaries
- Produces SHA-256 checksums for integrity verification
- Outputs both CSV and JSON / JSONL artifacts
STIG_MANUALS_OVERVIEW.csvSTIG_MANUALS_SPECIFICATIONS.csvSTIG_MANUALS_OVERVIEW.jsonSTIG_MANUALS_SPECIFICATIONS.jsonlRUN_SUMMARY.txtCHECKSUMS.sha256
DELTA_OVERVIEW.csvDELTA_VULNS.csvDELTA_OVERVIEW.jsonDELTA_VULNS.jsonDELTA_ONLY_SUMMARY.txt
EXECUTIVE_PATCH_CYCLE_SUMMARY.txt
LATEST_RUN.txt
Always points to the most recent crawl run folder.
The executive summary files are designed for:
- Patch review boards
- Security engineering leadership
- Change advisory boards
- RMF and audit support It provides:
- STIG-level additions, removals, and changes
- Vulnerability-level change counts
- Field-level change explanations
- Severity trend indicators
- Deterministic file references
Each run produces CHECKSUMS.sha256 containing SHA-256 hashes for:
- The script
- All generated CSV files
- All generated JSON and JSONL files
- Summary reports
This enables:
- Chain-of-custody verification
- Artifact integrity validation
- Secure transfer between environments
- Windows or Linux
- Python 3.10 or newer
- Standard library only:
- argparse
- csv
- datetime
- hashlib
- json
- pathlib
- re
- xml.etree.ElementTree
- zipfile
No third-party packages are required.
python stig_patch_cycle_analyzer.py \
--target "C:\STIG_Library" \
--out-dir runsUse this if your directory contains both individual STIG ZIPs and the compiled library ZIP
python stig_patch_cycle_analyzer.py --target "C:\path\to\stig_library" --exclude-compiled-librarypython stig_patch_cycle_analyzer.py --target "C:\path\to\stig_library" --out-dir runspython stig_patch_cycle_analyzer.py --target "C:\path\to\stig_library" --run-id jan_patch_cyclepython stig_patch_cycle_analyzer.py --target "C:\path\to\stig_library" --quietDelta-only mode compares two existing datasets without re-parsing the STIG library.
python stig_patch_cycle_analyzer.py --delta \
--prev-overview "C:\prev\STIG_MANUALS_OVERVIEW.csv" \
--curr-overview "C:\curr\STIG_MANUALS_OVERVIEW.csv" \
--delta-out delta_outputDelta-only mode compares two existing datasets without re-parsing the STIG library.
python stig_patch_cycle_analyzer.py --delta \
--prev-overview "C:\prev\STIG_MANUALS_OVERVIEW.csv" \
--prev-specs "C:\prev\STIG_MANUALS_SPECIFICATIONS.csv" \
--curr-overview "C:\curr\STIG_MANUALS_OVERVIEW.csv" \
--curr-specs "C:\curr\STIG_MANUALS_SPECIFICATIONS.csv" \
--delta-out delta_outputParse the current STIG library and immediately compare it to a previous snapshot. The script automatically uses the newly generated run outputs as the “current” dataset.
python stig_patch_cycle_analyzer.py --target "C:\path\to\stig_library" \
--delta \
--prev-overview "C:\prev\STIG_MANUALS_OVERVIEW.csv" \
--prev-specs "C:\prev\STIG_MANUALS_SPECIFICATIONS.csv" \
--delta-out delta_outputstig_patch_cycle_analyzer.py
This script parses DISA Security Technical Implementation Guide (STIG) manuals authored in XCCDF (Extensible Configuration Checklist Description Format) and produces structured analytical outputs for compliance review, patch-cycle analysis, and change tracking.
The script is explicitly limited to processing STIG manuals and is not intended to parse CKL, CKLB, or system scan result files.
- Input:
- Locally stored ZIP archives containing DISA STIG XCCDF XML documents
- Output:
- CSV, JSON, JSONL, and plain-text summary files
- Execution:
- User-invoked, non-persistent command-line execution
- Data Source:
- Publicly distributed DISA STIG documentation
- Data Types:
- Compliance requirements
- Vulnerability metadata
- Severity classifications
- Explicitly excludes:
- Personally Identifiable Information (PII)
- Protected Health Information (PHI)
- Classified data
- System configuration data
- Scan results or host-specific findings
- None
- No inbound or outbound network connections
- No DNS resolution
- No API calls
- No remote resources accessed
- Runs as a foreground process under the invoking user context
- No background services
- No daemons
- No scheduled tasks
- Terminates upon completion
- No system configuration changes
- No registry modifications
- No environment variable persistence
- No system service installation
- File outputs are written only to user-specified directories
- Python standard library only
- No third-party libraries
- No package installation required
- No administrative privileges required
- Not applicable
- Script executes under the permissions of the invoking user
- Optional console output for progress visibility
- Deterministic file-based outputs
- No telemetry
- No external logging
- No log forwarding
- SHA-256 hashing is used solely for integrity verification of generated output artifacts
- No encryption or key management functions are implemented
- Each execution produces a checksum file (CHECKSUMS.sha256)
- Checksums include:
- Script file
- CSV outputs
- JSON and JSONL outputs
- Executive and run summary reports
- Supports independent verification of artifact integrity and provenance
- Delta comparison mode identifies additions, removals, and changes between STIG releases
- Executive-level summary is generated automatically as:
- EXECUTIVE_PATCH_CYCLE_SUMMARY.txt
- Summary is derived exclusively from published STIG content
- Script version is displayed via a version banner at runtime
- Changes are documented in CHANGELOG.md
- No self-update mechanisms exist
- Updates are performed through controlled replacement of the script file
- This script does not perform vulnerability scanning
- This script does not assess system compliance
- This script does not enforce remediation
- Outputs are analytical and informational in nature
This project is released under the MIT License. You are free to:
- Use the script internally or commercially
- Modify and adapt it
- Integrate it into internal workflows
- Include outputs in reports and compliance artifacts
This project is intentionally self-contained and dependency-free.
- Paid customization, extensions, and consulting may be offered independently
- No obligation exists to provide support, updates, or enhancements
- Inquiries: info@saorsaindustries.com
Authored by Jamison Lewis
Original work and design retained via repository history and script header annotations.