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(general): Add resource code filter to all checkov loggers #5356

Merged
merged 11 commits into from
Jul 19, 2023

Conversation

bo156
Copy link
Contributor

@bo156 bo156 commented Jul 18, 2023

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

Description

Add resource code filter to all checkov loggers

Checklist:

  • My code follows the style guidelines of this project
  • 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
  • Any dependent changes have been merged and published in downstream modules

Base automatically changed from feature/custom-code-logger to main July 19, 2023 10:39
@bo156 bo156 force-pushed the feature/migrate-loggers-to-use-code-filter branch from 4fa3f02 to 75f2446 Compare July 19, 2023 10:42
@bo156 bo156 force-pushed the feature/migrate-loggers-to-use-code-filter branch from 75f2446 to ee0c6cc Compare July 19, 2023 10:42
@bo156 bo156 force-pushed the feature/migrate-loggers-to-use-code-filter branch from ee0c6cc to 69e15de Compare July 19, 2023 10:43
@bo156 bo156 temporarily deployed to scan-security July 19, 2023 10:43 — with GitHub Actions Inactive
@bo156 bo156 merged commit a97068b into main Jul 19, 2023
32 checks passed
@bo156 bo156 deleted the feature/migrate-loggers-to-use-code-filter branch July 19, 2023 10:55
pull bot pushed a commit to tooniez/checkov that referenced this pull request Jul 19, 2023
…ecrewio#5356)

* Created template code for using custom logger which removes code string templates from the log

* Added other logging methods and moved env variable to constructor

* replaced logger with logger adapter

* Added tests

* mypy

* Renamed to indicate it's general for templates

* Renamed files and qfixed mypy

* Instead of using a replacement code template, just log empty message

* Eventually decided to use logging.Filter as the best option

* Add resource code filter to all checkov logs

* flake8
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