-
Notifications
You must be signed in to change notification settings - Fork 1.3k
fix(general): Remove asteval syntax error logs #7172
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
Conversation
| asteval = get_asteval() | ||
| if RANGE_PATTERN.match(input_str): | ||
| temp_eval = asteval(input_str) | ||
| temp_eval = asteval(input_str, show_errors=False) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we add this line behind debug mode in checkov? (there should be an existing env var for it).
just in case we will need to debug some runs
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I found this line logger.isEnabledFor(logging.DEBUG) in
Line 427 in f8464d8
| if logger.isEnabledFor(logging.DEBUG): |
Would this help here?
checkov/terraform/graph_builder/variable_rendering/safe_eval_functions.py
Outdated
Show resolved
Hide resolved
* pass show_errors=False to asteval
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
Description
Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context. List any dependencies that are required for this change.
Fixes # (issue)
New/Edited policies (Delete if not relevant)
Description
Include a description of what makes it a violation and any relevant external links.
Fix
How does someone fix the issue in code and/or in runtime?
Checklist: