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

Checkov - unable to skip a check #208

Closed
kelechi-i opened this issue Jul 5, 2021 · 1 comment · Fixed by #232
Closed

Checkov - unable to skip a check #208

kelechi-i opened this issue Jul 5, 2021 · 1 comment · Fixed by #232
Assignees
Labels
documentation Improvements or additions to documentation estimate/1h Need 1 hour to be done good first issue Good for newcomers hook/terraform_checkov Bash hook

Comments

@kelechi-i
Copy link

kelechi-i commented Jul 5, 2021

.pre-commit-config.yaml

- repo: git://github.com/antonbabenko/pre-commit-terraform
  rev: v1.49.0
  hooks:
    - id: terraform_validate
      args:
        - '--args=-json'
    - id: terraform_tflint
    - id: terraform_tfsec    
    - id: checkov
      args:     
        [-d . --skip-check CKV_AWS_24]

When I run the pre-commit run -a command locally, the checkov rule CKV_AWS_24 rule is not skipped. How do I skip multiple checkov rules?

Checkov version 1.0.855

@MaxymVlasov MaxymVlasov added estimate/4h Need 4 hours to be done help wanted Extra attention is needed hook/terraform_checkov Bash hook bug Something isn't working and removed help wanted Extra attention is needed labels Sep 9, 2021
@MaxymVlasov
Copy link
Collaborator

Hi, @kelechi-i.

For checkov you need to specify each argument separately

repos:
- repo: git://github.com/antonbabenko/pre-commit-terraform
  rev: v1.50.0
  hooks:
  - id: checkov
    args: [
      "-d", ".",
      "--skip-check", "CKV2_AWS_8",
    ]

Can be fixed together with #199
TBD: Add/clarify doc how to use arguments with checkov

@MaxymVlasov MaxymVlasov added estimate/1h Need 1 hour to be done good first issue Good for newcomers documentation Improvements or additions to documentation and removed bug Something isn't working estimate/4h Need 4 hours to be done labels Sep 9, 2021
@MaxymVlasov MaxymVlasov added this to the Bug and docs fixes milestone Sep 9, 2021
@MaxymVlasov MaxymVlasov self-assigned this Sep 29, 2021
MaxymVlasov added a commit that referenced this issue Sep 29, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation estimate/1h Need 1 hour to be done good first issue Good for newcomers hook/terraform_checkov Bash hook
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants