Skip to content
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

feat(arm): unsupported module soft fail #6775

Merged
merged 3 commits into from
Oct 15, 2024
Merged

Conversation

AdamDev
Copy link
Contributor

@AdamDev AdamDev commented Oct 15, 2024

User description

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

Description

Two modifications:

  1. Implement a soft fail for scenarios involving unsupported modules.
  2. Only display the exception log when the user explicitly sets the unsupported module.

For instance, if a user executes the command checkov -d . --framework secrets and the only runner available is the secrets runner, but the SECRETS module is not enabled, then we want to ensure a soft fail upon exit.

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

Generated description

Dear maintainer, below is a concise technical summary of the changes proposed in this PR:

Introduce a soft fail mechanism for unsupported modules in the RunnerRegistry class, allowing the system to log warnings instead of errors when unsupported frameworks are explicitly set by the user. Modify the ModuleNotEnabledError to include a list of unsupported frameworks, enhancing error handling and logging in checkov/main.py and checkov/common/bridgecrew/platform_errors.py.

TopicDetails
Error Handling Enhancement Enhance the ModuleNotEnabledError to include a list of unsupported frameworks, improving error handling and logging.
Modified files (2)
  • checkov/common/bridgecrew/platform_errors.py
  • checkov/common/runners/runner_registry.py
Latest Contributors(2)
EmailCommitDate
anton.gruebel@gmail.comchore-update-cloudspla...September 18, 2024
47212872+EmmaVinen@use...feat-general-allow-too...September 11, 2024
Soft Fail Mechanism Implement a soft fail mechanism for unsupported modules in the RunnerRegistry class, allowing the system to log warnings instead of errors when unsupported frameworks are explicitly set by the user.
Modified files (2)
  • checkov/main.py
  • checkov/common/runners/runner_registry.py
Latest Contributors(2)
EmailCommitDate
anton.gruebel@gmail.comchore-update-cloudspla...September 18, 2024
47212872+EmmaVinen@use...feat-general-allow-too...September 11, 2024
This pull request is reviewed by Baz. Join @AdamDev and the rest of your team on (Baz).

@AdamDev AdamDev merged commit 7458179 into main Oct 15, 2024
44 checks passed
@AdamDev AdamDev deleted the module-not-supported-soft-fail branch October 15, 2024 10:27
Ali-Razmjoo pushed a commit to fork-the-planet/checkov that referenced this pull request Oct 16, 2024
* soft fail in case the scanner has unsupported module

* fix lint

---------

Co-authored-by: adam varsano <avarsano@paloaltonetworks.com>
Ali-Razmjoo pushed a commit to fork-the-planet/checkov that referenced this pull request Oct 16, 2024
* soft fail in case the scanner has unsupported module

* fix lint

---------

Co-authored-by: adam varsano <avarsano@paloaltonetworks.com>
Ali-Razmjoo pushed a commit to fork-the-planet/checkov that referenced this pull request Oct 16, 2024
* soft fail in case the scanner has unsupported module

* fix lint

---------

Co-authored-by: adam varsano <avarsano@paloaltonetworks.com>
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.

3 participants