Giter Club home page Giter Club logo

Comments (5)

MaxymVlasov avatar MaxymVlasov commented on June 2, 2024

You're right. That's a bug in checkov - it returns wrong exit code

from pre-commit-terraform.

MaxymVlasov avatar MaxymVlasov commented on June 2, 2024

If you run checkov -d "$(pwd)" --hard-fail-on MEDIUM - you'll get error message and exit code 0

from pre-commit-terraform.

MaxymVlasov avatar MaxymVlasov commented on June 2, 2024

@CaspervdKerk please open the issue in https://github.com/bridgecrewio/checkov/
It also break their checkov pre-commit hook, as far as I can see

https://github.com/bridgecrewio/checkov/blob/05cf950fd9f1d1eaba2998d9b845b62494df060c/.pre-commit-hooks.yaml#L6-L15

from pre-commit-terraform.

CaspervdKerk avatar CaspervdKerk commented on June 2, 2024

Thank you for confirming my findings! I'll raise this bug on the checkov repo as well.
There is definitely some strange behavior going on. During my testing I found my code also triggered CKV_AZURE_103, which is a LOW severity check.
Using the pre-commit hook with --soft-fail and --hard-fail-on MEDIUM Checkov passes, as is expected. However, when I use the local installed Checkov CLI it fails on this LOW severity check, even though the --soft-fail and --hard-fail-on MEDIUM flags are passed...

from pre-commit-terraform.

MaxymVlasov avatar MaxymVlasov commented on June 2, 2024

From bridgecrewio/checkov#5560 (comment) :

Severities only work with an API key, that's why it doesn't work as expected.

from pre-commit-terraform.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.