chore(k8s): Improve testing for k8s scanner
As discussed here we should improve the testing for the k8s scanner as it is short on coverage.
As part of this we could also look into refactoring the scanner a bit.
update: there was an attempt to add some testcases here https://github.com/afdesk/trivy/pull/101/files for #8442 It seems to take a long time; perhaps we should investigate ways to optimize performance. We might also consider refactoring the code to avoid using flag options for better readability and maintainability.
It seems to take a long time; perhaps we should investigate ways to optimize performance.
@afdesk it takes a long time as in the test is slow to finish? Is it an integration test? If so, is the slow evaluation is expected?
Related https://github.com/aquasecurity/trivy-operator/issues/2573