Fix textfilecontent54_probe behaviour#2210
Merged
evgenyz merged 3 commits intoOpenSCAP:maint-1.3from Mar 25, 2025
Merged
Conversation
According to OVAL docs the 'instance' tag should be able to take negative numbers. And these negative numbers should count from the last element matched. This is was not the case in oscap implementation Signed-off-by: Edgar Aguilar <edgar.aguilar@oracle.com>
Contributor
|
Hey! Thanks for the fix. Please add a test for this behavior. |
Validate behaviour with negative instance Signed-off-by: Edgar Aguilar <edgar.aguilar@oracle.com>
evgenyz
requested changes
Mar 25, 2025
Contributor
evgenyz
left a comment
There was a problem hiding this comment.
Some nitpicks, otherwise LGTM.
Contributor
|
BTW, was it intentional to put this fix into |
Co-authored-by: Evgeny Kolesnikov <evgenyz@gmail.com>
Contributor
Author
|
Yes it was intentional to put this into 1.3, that's what is used in Oracle Linux 8 and 9, so would be good to have that fix in those distros |
Contributor
OK. Can I ask you then to also forward-port it to |
evgenyz
approved these changes
Mar 25, 2025
jan-cerny
added a commit
to jan-cerny/contest
that referenced
this pull request
Apr 29, 2025
These waivers are added to be able to merge the pull request ComplianceAsCode/content#13374 This PR adds changes that work only with new OpenSCAP, but the new OpenSCAP hasn't been shipped in CentOS/RHEL yet, which means the Testing farm tests fail in CI gating. At the same time, we don't want to delay the PR. Therefore, we introduce this waiver, that can be removed once the new OpenSCAP is released. Specifically, these rules require OpenSCAP 1.3.12 or 1.4.2 to pass because they depend on processing negative numbers by textfilecontent54_probe which is fixed by OpenSCAP/openscap#2210
matusmarhefka
pushed a commit
to RHSecurityCompliance/contest
that referenced
this pull request
Apr 29, 2025
These waivers are added to be able to merge the pull request ComplianceAsCode/content#13374 This PR adds changes that work only with new OpenSCAP, but the new OpenSCAP hasn't been shipped in CentOS/RHEL yet, which means the Testing farm tests fail in CI gating. At the same time, we don't want to delay the PR. Therefore, we introduce this waiver, that can be removed once the new OpenSCAP is released. Specifically, these rules require OpenSCAP 1.3.12 or 1.4.2 to pass because they depend on processing negative numbers by textfilecontent54_probe which is fixed by OpenSCAP/openscap#2210
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Reading OVAL docs: https://oval-community-guidelines.readthedocs.io/en/latest/oval-schema-documentation/independent-definitions-schema.html?highlight=textfilecontent54_object#textfilecontent54-object
The
instancetag insidetextfilecontent54_objectshould be able to take negative numbers. And these negative numbers should count from the last element matched. This is was not the case in oscap implementation.