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(azure): skip grater then criterions #314

Conversation

DmitriyLewen
Copy link
Contributor

@DmitriyLewen DmitriyLewen commented Nov 15, 2024

Description

Microsoft started using multiple criterion in definition:

<criteria operator="AND">
  <criterion comment="Package golang is earlier than 1.20.7-1, affected by CVE-2023-29409" test_ref="oval:com.microsoft.azurelinux:tst:52881000"/>
  <criterion comment="Package golang is greater than 0.0.0, affected by CVE-2023-29409" test_ref="oval:com.microsoft.azurelinux:tst:52881003"/>
</criteria>

Adding support for multiple criteria (#313) requires time to review and test.

So this PR adds a custom MarshalJson to store only one earlier than criterion to fix the problem with building trivy-db now.

test run - https://github.com/DmitriyLewen/vuln-list-update/actions/runs/11854656796
trivy-db build test run - https://github.com/DmitriyLewen/trivy-db/actions/runs/11855682567/job/33040403541

  "Criteria": {
    "Criterion": {
      "Comment": "Package golang is earlier than 1.20.7-1, affected by CVE-2023-29409",
      "TestRef": "oval:com.microsoft.azurelinux:tst:52881000"
    },
    "Operator": "AND"
  }

@DmitriyLewen DmitriyLewen self-assigned this Nov 15, 2024
@DmitriyLewen
Copy link
Contributor Author

closed in favor of #313

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.

1 participant