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 multiprocess abilities #5887

Merged
merged 26 commits into from
Jan 10, 2024
Merged

Conversation

AdamDev
Copy link
Contributor

@AdamDev AdamDev commented Dec 20, 2023

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

There are 2 bugs:

  1. SCA and SAST are not working well in Darwin via Fork mode (security issue of Mac).
  2. Can't override Windows parallel type to None.

Solution:

  1. In the case of Darwin, change the parallel type to Threads, the best practice is 'spawn ' but it starts the child process with a fresh memory, and Checkov is not supporting this case yet, the runners still use the parent's memory.
  2. Support ability for None parallel type in Windows.

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

Copy link
Contributor

@gruebel gruebel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

feels like cheating by excluding the secrets runner, which failed the last time 😄

checkov/common/parallelizer/parallel_runner.py Outdated Show resolved Hide resolved
checkov/common/parallelizer/parallel_runner.py Outdated Show resolved Hide resolved
checkov/kustomize/runner.py Outdated Show resolved Hide resolved
Copy link
Contributor

@gruebel gruebel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🍰

@AdamDev AdamDev merged commit d912b2d into main Jan 10, 2024
37 checks passed
@AdamDev AdamDev deleted the fix_multiprocess_ability_in_mac branch January 10, 2024 05:37
pull bot pushed a commit to tooniez/checkov that referenced this pull request Jan 10, 2024
* fix_multiprocess_ability_in_mac

* support freeze mode

* update description

* lint

* flake8 fix

* testing

* support secret scan

* lint

* support secret

* get parallel type to execute

* typo

* flake 8

* clean

* improve comment

* moving back to threads in casd of Darwin

* clean

* revert some changes

* revert some changes

* revert changes

* clean

* clean

* clean

* add comments

* add UT

* allow to override via env var

* re-run

---------

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.

4 participants