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

Oval data contains invalid test_ref which points nowhere #20

Open
yavor-atanasov opened this issue Jun 2, 2024 · 0 comments
Open

Oval data contains invalid test_ref which points nowhere #20

yavor-atanasov opened this issue Jun 2, 2024 · 0 comments

Comments

@yavor-atanasov
Copy link
Contributor

Both the el8 and el9 ovals contain one invalid test_ref which points nowhere for defintion id oval:org.rockylinux.rlsa:def:20233661 (title RLSA-2023:3661: texlive security update (Important)).

The el9 oval data contains this invalid test for that definition:

  <criteria operator="OR">
    <criterion comment="Rocky Linux 8 must be installed"
      test_ref="oval:org.rockylinux.rlsa:tst:unk"/>
  </criteria>

Reciprocally, the el8 data contains this invalid:

  <criteria operator="OR">
    <criterion comment="Rocky Linux 9 must be installed"
      test_ref="oval:org.rockylinux.rlsa:tst:unk"/>
  </criteria>

The Red Hat ovals do not contain such a criteria for the same definition.

This is the area of the code where that invalid unk test reference is being injected:

oval/oval/transform.py

Lines 425 to 429 in 8f63e83

tid = "unk"
for test in tests :
if test[ 'comment' ] == criteria[ 'comment' ] :
tid = test[ 'id' ]
break

I've not looked into that code in great detail, but it looks like instead of injecting an invalid test, the criteria should be skipped altogether.

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

No branches or pull requests

1 participant