Skip to content

Conversation

Ilyesbdlala
Copy link
Member

@Ilyesbdlala Ilyesbdlala commented Jun 30, 2023

Description

Trivy tests have been ruuning incorrectly until now. The JSON.parse function was missing, that means the tests for empty results was succesfful because of the earlier check of "if the results are a string or not" and not the check of "results is an non-empty array" This fixes that.
closes #1489

Checklist

  • Test your changes as thoroughly as possible before you commit them. Preferably, automate your test by unit/integration tests.
  • Make sure that all your commits are signed-off and that you are added to the Contributors file.
  • Make sure that all CI finish successfully.
  • Optional (but appreciated): Make sure that all commits are Verified.

@Ilyesbdlala Ilyesbdlala added the bug Bugs label Jun 30, 2023
@Ilyesbdlala Ilyesbdlala self-assigned this Jun 30, 2023
@Ilyesbdlala Ilyesbdlala changed the title #1489 Fixes the tests of Trivy and adds a check for empty scanResults Fixes the tests of Trivy and adds a check for empty scanResults Jun 30, 2023
@github-actions
Copy link

github-actions bot commented Jun 30, 2023

MegaLinter status: ⚠️ WARNING

Descriptor Linter Files Fixed Errors Elapsed time
⚠️ JAVASCRIPT eslint 2 1 0.63s
✅ JSON eslint-plugin-jsonc 1 0 1.16s
✅ SPELL misspell 3 0 0.04s

See errors details in artifact MegaLinter reports on CI Job page
Set VALIDATE_ALL_CODEBASE: true in mega-linter.yml to validate all sources, not only the diff

Trivy tests have been ruuning incorrectly until now. The JSON.parse function was missing, that means the tests for empty results  was succesfful because
of the earlier check of "if the results are a string or not" and not the check of "results is an non-empty array"
This fixes that.

Signed-off-by: Ilyes Ben Dlala <ilyes.bendlala@iteratec.com>
@J12934 J12934 merged commit 24a6116 into main Jul 10, 2023
@J12934 J12934 deleted the fix/trivy-empty-results branch July 10, 2023 08:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Bugs
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

Parser fails when no findings in results
2 participants