这是indexloc提供的服务,不要输入任何密码
Skip to content

Conversation

@omriyoffe-panw
Copy link
Contributor

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:

  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have added tests that prove my feature, policy, or fix is effective and works
  • New and existing tests pass locally with my changes

asteval = get_asteval()
if RANGE_PATTERN.match(input_str):
temp_eval = asteval(input_str)
temp_eval = asteval(input_str, show_errors=False)
Copy link
Contributor

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

Copy link
Contributor Author

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

if logger.isEnabledFor(logging.DEBUG):

Would this help here?

@tsmithv11
Copy link
Contributor

Fixes #7161 and #7144

@omriyoffe-panw omriyoffe-panw merged commit 4365ecf into main May 21, 2025
46 checks passed
@omriyoffe-panw omriyoffe-panw deleted the fix-eval-syntax-logs branch May 21, 2025 11:40
Saarett pushed a commit that referenced this pull request May 21, 2025
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.

4 participants