Skip to content
This repository was archived by the owner on Jun 27, 2025. It is now read-only.
This repository was archived by the owner on Jun 27, 2025. It is now read-only.

Oval data contains invalid test_ref which points nowhere #20

@yavor-atanasov

Description

@yavor-atanasov

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions