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

fix(general): fix lazy loading custom policies into check registry #6662

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

mikeurbanski1
Copy link
Contributor

@mikeurbanski1 mikeurbanski1 commented Aug 16, 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

Fixes an issue preventing custom policies from running.

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:

Fix an issue in the Registry class that prevents custom policies from being loaded into the check registry. Modify the load_checks method to ensure custom policies are added only once and introduce a flag custom_policies_loaded to track the loading status.

TopicDetails
Custom Policy Loading Fix the lazy loading mechanism for custom policies in the Registry class.
Modified files (1)
  • checkov/common/checks_infra/registry.py
Latest Contributors(2)
EmailCommitDate
iifrach@paloaltonetwor...feat-general-Support-m...August 18, 2024
123508988+taviassaf@us...feat-general-support-m...August 05, 2024
This pull request is reviewed by Baz. Join @mikeurbanski1 and the rest of your team on (Baz).

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.

1 participant