Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix validation with OpenSCAP 1.4 #12303

Merged
merged 1 commit into from
Aug 15, 2024

Conversation

Mab879
Copy link
Member

@Mab879 Mab879 commented Aug 14, 2024

Description:

Fix validation with OpenSCAP 1.4 by disabling eks and ocp4 Always.

Rationale:

Fix issues with the new OpenSCAP release.

@Mab879 Mab879 added the Infrastructure Our content build system label Aug 14, 2024
@Mab879 Mab879 added this to the 0.1.75 milestone Aug 14, 2024
Copy link

Start a new ephemeral environment with changes proposed in this pull request:

Fedora Environment
Open in Gitpod

Oracle Linux 8 Environment
Open in Gitpod

Copy link

github-actions bot commented Aug 14, 2024

🤖 A k8s content image for this PR is available at:
ghcr.io/complianceascode/k8scontent:12303
This image was built from commit: d72411c

Click here to see how to deploy it

If you alread have Compliance Operator deployed:
utils/build_ds_container.py -i ghcr.io/complianceascode/k8scontent:12303

Otherwise deploy the content and operator together by checking out ComplianceAsCode/compliance-operator and:
CONTENT_IMAGE=ghcr.io/complianceascode/k8scontent:12303 make deploy-local

Copy link

codeclimate bot commented Aug 14, 2024

Code Climate has analyzed commit d72411c and detected 0 issues on this pull request.

The test coverage on the diff in this pull request is 100.0% (50% is the threshold).

This pull request will bring the total coverage in the repository to 59.4% (0.0% change).

View more on Code Climate.

@Mab879
Copy link
Member Author

Mab879 commented Aug 14, 2024

Windows build will be fixed in #12303

@jan-cerny
Copy link
Collaborator

I think we should explain this change here.

OVALs in OCP4 and EKS products uses yamlfilecontent OVAL tests. The yamfilecontent OVAL test is our custom extension and isn't part of the OVAL 5.11 language. The condition if openscap >= 1.4.0 was wrong here, because the OVAL validation against the 5.11 scheme would fail with any past or future version of OpenSCAP, because the yamlfilecontent isn't part of the 5.11 schema.

In other words, this change effectively preserves the current situation. The current situation is that OCP4 and EKS products contain invalid OVAL 5.11 and we don't run OVAL validation for them in the CTest.

In OpenSCAP, we ship a custom OVAL 5.11.3 schema, where the yamlfilecontent is present. But, that is a "future version", and we build our content in OVAL version 5.11. OpenSCAP chooses the schema to validate the OVAL against based on the version in the OVAL file.

Copy link
Collaborator

@jan-cerny jan-cerny left a comment

Choose a reason for hiding this comment

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

I have build ocp4 product with OpenSCAP 1.4.0 and I have verified that the test isn't present in the CTest test.

@jan-cerny jan-cerny merged commit 9930f19 into ComplianceAsCode:master Aug 15, 2024
96 of 97 checks passed
@jan-cerny jan-cerny self-assigned this Aug 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Infrastructure Our content build system
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants