Skip to content

Added a check for empty Trivy .Results#1640

Merged
Weltraumschaf merged 1 commit intomainfrom
fix/trivy-no-results-parse
Mar 13, 2023
Merged

Added a check for empty Trivy .Results#1640
Weltraumschaf merged 1 commit intomainfrom
fix/trivy-no-results-parse

Conversation

@Ilyesbdlala
Copy link
Member

Description

Also added corresponding unit-test.
Relates to #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.

Also added corresponding unit-test

Signed-off-by: Ilyes Ben Dlala <[email protected]>
@Ilyesbdlala Ilyesbdlala added the bug Bugs label Mar 13, 2023
@Ilyesbdlala Ilyesbdlala added this to the v4.0.0 milestone Mar 13, 2023
@Ilyesbdlala Ilyesbdlala self-assigned this Mar 13, 2023
@github-actions
Copy link

github-actions bot commented Mar 13, 2023

MegaLinter status: ⚠️ WARNING

Descriptor Linter Files Fixed Errors Elapsed time
⚠️ JAVASCRIPT eslint 2 1 0.58s
✅ JSON eslint-plugin-jsonc 1 0 1.07s
✅ 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

@Weltraumschaf Weltraumschaf merged commit c467fd8 into main Mar 13, 2023
@Weltraumschaf Weltraumschaf deleted the fix/trivy-no-results-parse branch March 13, 2023 20:47
}
}
},
"Results": []
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This won't affect the new check btw. Because [] is an array.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@c0olix Thanks for the review. This made me realize that the trivy test for empty results never actually ran correctly ^_^". This PR should fix the issue, #1787 .

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.

3 participants