You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the issue
Running a scan and found in an otherwise working file that UnicodeDecodeError was raised crashing checkov.
Examples
Eventually found which file was causing the issue, as below, and that the yaml file contained:
# ℹCommand-line programs to run using the OS shell.# 📚 https://git.io/JvXDl# ✏️ If the Autobuild fails
Luckly all in comments!
Exception Trace
Please share the trace for the exception and all relevant output by checkov.
To maximize the understanding, please run checkov with LOG_LEVEL set to debug
as follows:
LOG_LEVEL=DEBUG checkov ...
Not available!
Desktop (please complete the following information):
OS: Windows 10-64
Checkov Version: 3.2.85
Python Version: 3.12.3
Additional context
Was able to identify the problem file by modifying C:\temp\test_install_checkov\Lib\site-packages\checkov\github_actions\runner.py line 67-69
From:
This allowed me to actually see which file was giving the issues & since the odd characters were all in comments I was able to remove them so as to complete the run.
In general it is a shame that the UnicodeDecodeError does not give the name of the file that was being read when the exception occurred but a review of the code so as to improve reporting can allow the users to address such problems. (Or maybe add errors='xmlcharrefreplace' or errors='backslashreplace' on all open operations?)
The text was updated successfully, but these errors were encountered:
Describe the issue
Running a scan and found in an otherwise working file that UnicodeDecodeError was raised crashing checkov.
Examples
Eventually found which file was causing the issue, as below, and that the yaml file contained:
Luckly all in comments!
Exception Trace
Please share the trace for the exception and all relevant output by checkov.
To maximize the understanding, please run checkov with LOG_LEVEL set to debug
as follows:
Not available!
Desktop (please complete the following information):
Additional context
Was able to identify the problem file by modifying
C:\temp\test_install_checkov\Lib\site-packages\checkov\github_actions\runner.py
line 67-69From:
To:
This allowed me to actually see which file was giving the issues & since the odd characters were all in comments I was able to remove them so as to complete the run.
In general it is a shame that the UnicodeDecodeError does not give the name of the file that was being read when the exception occurred but a review of the code so as to improve reporting can allow the users to address such problems. (Or maybe add
errors='xmlcharrefreplace'
orerrors='backslashreplace'
on allopen
operations?)The text was updated successfully, but these errors were encountered: