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 bug for no matches of yalib in one file mapping #1628

Merged
merged 1 commit into from
Mar 10, 2024

Conversation

MMMMMMorty
Copy link
Member

Overview

When executing yqlib, if there is an error, it will return, which causes the crash of Kubescape scanning.
To fix it, instead of generating an error and return, I print a warning log to tell users which files are failing to execute yqlib. Therefore, it will only generate a warning for the files, and scanning will not be stopped.
In this case, in the sarif printer, since the files don't have the file mapping, it will return the default location. The worst case will be all the files fail to execute yqlib, but this is really rare.

Examples/Screenshots

./kubescape scan framework allcontrols ./demo-bitnami-charts -f sarif -o test1.sarif
result

Related issues/PRs:

Signed-off-by: mmmmmmorty <mmmmmmorty@outlook.com>
@MMMMMMorty MMMMMMorty requested a review from dwertent March 8, 2024 09:07
@dwertent dwertent merged commit 05ec28b into kubescape:master Mar 10, 2024
5 checks passed
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.

Error exectuateYq err: no matches found when rendering Helm chart
2 participants