question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Feature Request: another flag to display failed checks

See original GitHub issue

Is your feature request related to a problem? Please describe.

it seems that -o github_failed_only only returns failed but with plain text. if I use -o json then I get all checks(failed and success). Describe the solution you’d like

Apart from json and github_failed_only parameters. It might be good to have to another flag to display failed only reports. It can be used with json output. Something like to see failed checks in json format.

$ checkov --display-failed-checks -o json -d .

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

3reactions
ismailyenigulcommented, Feb 10, 2021

Seems good! Thanks

 $ checkov  --quiet -o json  -f tf.json
{
    "check_type": "terraform_plan",
    "results": {
        "failed_checks": [
            {
                "check_id": "CKV_AWS_9",
                "check_name": "Ensure IAM password policy expires passwords within 90 days or less",
                "check_result": {
                    "result": "FAILED",
                    "evaluated_keys": [
                        "max_password_age"
                    ]
                },
                "code_block": [],
                "file_path": "/tf.json",
                "repo_file_path": "/tf.json",
                "file_line_range": [
                    0,
                    0
                ],
                "resource": "aws_iam_account_password_policy.default",
                "evaluations": null,
                "check_class": "checkov.terraform.checks.resource.aws.PasswordPolicyExpiration",
                "fixed_definition": null,
                "entity_tags": null,
                "guideline": "https://docs.bridgecrew.io/docs/iam_11"
            },
            {
                "check_id": "CKV_AWS_13",
                "check_name": "Ensure IAM password policy prevents password reuse",
                "check_result": {
                    "result": "FAILED",
                    "evaluated_keys": [
                        "password_reuse_prevention"
                    ]
                },
                "code_block": [],
                "file_path": "/tf.json",
                "repo_file_path": "/tf.json",
                "file_line_range": [
                    0,
                    0
                ],
                "resource": "aws_iam_account_password_policy.default",
                "evaluations": null,
                "check_class": "checkov.terraform.checks.resource.aws.PasswordPolicyReuse",
                "fixed_definition": null,
                "entity_tags": null,
                "guideline": "https://docs.bridgecrew.io/docs/iam_10"
            },
            {
                "check_id": "CKV_AWS_10",
                "check_name": "Ensure IAM password policy requires minimum length of 14 or greater",
                "check_result": {
                    "result": "FAILED",
                    "evaluated_keys": [
                        "minimum_password_length"
                    ]
                },
                "code_block": [],
                "file_path": "/tf.json",
                "repo_file_path": "/tf.json",
                "file_line_range": [
                    0,
                    0
                ],
                "resource": "aws_iam_account_password_policy.default",
                "evaluations": null,
                "check_class": "checkov.terraform.checks.resource.aws.PasswordPolicyLength",
                "fixed_definition": null,
                "entity_tags": null,
                "guideline": "https://docs.bridgecrew.io/docs/iam_9-1"
            }
        ]
    },
    "summary": {
        "passed": 4,
        "failed": 3,
        "skipped": 0,
        "parsing_errors": 0,
        "checkov_version": "1.0.775"
    }
}
0reactions
schosterbarakcommented, Feb 10, 2021

Thank you @metahertz @ismailyenigul feel free to give it a try in 20 min from now (release pipeline)

Read more comments on GitHub >

github_iconTop Results From Across the Web

Testing with feature flags - GitLab Docs
If enabling the feature flag results in E2E test failures, you can browse the artifacts in the failed pipeline to see screenshots of...
Read more >
Essential Guide to Feature Flags - Split Software
A feature flag is a mechanism that allows you to choose between different code paths in your system at runtime. In this guide,...
Read more >
Feature Toggles (aka Feature Flags) - Martin Fowler
Use that admin UI to turn the new feature on a test environment. Teach the Toggle Router how to make dynamic, per-request toggling...
Read more >
How we ship code faster and safer with feature flags
The interface allows us to manage the shipping status of a feature flag, creation of new ones, and deletion. Additionally, we can see...
Read more >
Feature Flags—What Are Those? Uses, Benefits & Best ...
However, it does require developer intervention to change a flag and, in the case of a physical config file, it may require a...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found