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

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

@bgshacklett

Description

@bgshacklett

Describe the issue
When --download-external-modules is explicitly set to false, Checkov still produces warnings indicating that downloading external modules has failed.

If I am explicitly setting this value to false, it is not useful to produce a warning, and may lead to confusion for those running the output.

Examples

# command
checkov \
  --dir . \
  --download-external-modules false \
  --baseline .checkov.baseline \
  --output-baseline-as-skipped \
  --output cli \
  --output junitxml \
  --output-file-path console,'test-results/checkov.xml'

Warning (sanitized):

2023-11-21 14:01:42,192 [MainThread  ] [WARNI]  Failed to download module <module_path> (for external modules, the --download-external-modules flag is required)

Version (please complete the following information):

  • Checkov Version 3.1.8

Additional context
Downloading external modules is disabled in our pipeline to avoid performing checks against code that we do not have any control over as part of the CI process.

edit:
At present, I am using 2> >(grep -v 'Failed to download module' >&2) to filter this output out of the CI job console.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions