Skip to content

fix skipChecks overriding config file #15

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

Closed
wants to merge 5 commits into from

Conversation

Japillow
Copy link

@Japillow Japillow commented Apr 7, 2025

Closes #10 [Feature]: List of skipped checks (and closes bridgecrewio#125)

This disables the hardcoded --skip-check BC_LIC*, ensuring theskip-check: from .checkov.yaml config file are evaluated as expected if config file defined.

Also adds an extension configuration option that overwrites any checkov.yaml config, similar to frameworks of skip-frameworks.

@Japillow Japillow marked this pull request as draft April 7, 2025 18:34
@Japillow Japillow marked this pull request as ready for review April 7, 2025 19:33
@Japillow Japillow mentioned this pull request Apr 8, 2025
@@ -77,15 +77,20 @@ export const runCheckovScan = (logger: Logger, checkovInstallation: CheckovInsta
const certificateParams: string[] = certPath && checkovInstallationMethod !== 'docker' ? ['-ca', `"${certPath}"`] : [];
const bcIdParam: string[] = useBcIds ? ['--output-bc-ids'] : [];
const noCertVerifyParam: string[] = noCertVerify ? ['--no-cert-verify'] : [];
const skipCheckParam: string[] = skipChecks.length ? ['--skip-check', skipChecks.join(',')] : [];
const skipCheckParam: string[] = skipChecks
Copy link
Owner

@XargsUK XargsUK Apr 16, 2025

Choose a reason for hiding this comment

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

This logic seems to always append the default skip (BC_LIC*) to the user’s skip list, and doesn't allow for an empty skip list.

@XargsUK XargsUK mentioned this pull request Apr 16, 2025
@XargsUK
Copy link
Owner

XargsUK commented Apr 16, 2025

Thanks for the contribution! I didn't have the perms to update your branch directly, so I pulled your changes into a different branch and made a couple of tweaks. I'll hopefully be getting this released today.

Really appreciate the hand!

@XargsUK XargsUK closed this Apr 16, 2025
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.

.checkov.yaml skip-checks being overridden by hard-coded BC_LIC* skip [Feature]: List of skipped checks
2 participants