Skip to content

Add a script to compare 2 control files#14870

Open
jan-cerny wants to merge 3 commits into
ComplianceAsCode:masterfrom
jan-cerny:compare_controls
Open

Add a script to compare 2 control files#14870
jan-cerny wants to merge 3 commits into
ComplianceAsCode:masterfrom
jan-cerny:compare_controls

Conversation

@jan-cerny

Copy link
Copy Markdown
Collaborator

The script is very useful for comparing 2 versions of STIG control files for the same product, eg. comparing RHEL 10 STIG V1R1 control file and RHEL 10 STIG V1R2 control file.

The script is very useful for comparing 2 versions of STIG control
files for the same product, eg. comparing RHEL 10 STIG V1R1 control
file and RHEL 10 STIG V1R2 control file.
@jan-cerny jan-cerny added this to the 0.1.82 milestone Jul 13, 2026
@Mab879 Mab879 self-assigned this Jul 13, 2026
Comment thread utils/compare_controls.py
@@ -0,0 +1,64 @@
#!/usr/bin/env python3

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add the execute bit since there is a shebag.


### `utils/compare_controls.py` – Compare two control files

This script compares controls between two YAML control files and outputs a unified diff.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Might be worth adding note that this script doesn't support nested controls.

@openshift-ci

openshift-ci Bot commented Jul 14, 2026

Copy link
Copy Markdown

@jan-cerny: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/prow/e2e-aws-openshift-node-compliance 1959793 link true /test e2e-aws-openshift-node-compliance

Full PR test history. Your PR dashboard.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants