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

Conversation

@thentenaar
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

This allows --download-external-modules to evaluate to:

  • True if set to something truthy (current behavior)
  • False if set to something falsy (current behavior)
  • None as the default value (new behavior)

which enables the modules code to check whether the value was explicitly set, or is merely the default.

Also, don't print the message about the flag being required if it has been explicitly set to false.

Fixes #5782

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

@tsmithv11
Copy link
Contributor

tsmithv11 commented Apr 26, 2025

@thentenaar thanks for the contribution! Can you please fix the flake8 findings?

This allows --download-external-modules to evaluate to:
- True if set to true
- False if set to false
- None as the default value

... which enables the modules code to check whether the value was
explicitly set, or is merely the default.

Also, don't print the message about the flag being required if it
has been explicitly set to false.
@tsmithv11 tsmithv11 merged commit 7cfabdd into bridgecrewio:main Apr 28, 2025
42 of 43 checks passed
Saarett pushed a commit that referenced this pull request Apr 28, 2025
This allows --download-external-modules to evaluate to:
- True if set to true
- False if set to false
- None as the default value

... which enables the modules code to check whether the value was
explicitly set, or is merely the default.

Also, don't print the message about the flag being required if it
has been explicitly set to false.

Co-authored-by: Taylor <28880387+tsmithv11@users.noreply.github.com>
@thentenaar thentenaar deleted the optional-dem branch April 28, 2025 12:08
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.

Checkov should not warn about downloading external modules if --download-external-modules is explicitly set to false.

3 participants