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

Guidelines not displayed when check fails #2826

Closed
SiSiHenry opened this issue Apr 15, 2022 · 3 comments · Fixed by #3600
Closed

Guidelines not displayed when check fails #2826

SiSiHenry opened this issue Apr 15, 2022 · 3 comments · Fixed by #3600

Comments

@SiSiHenry
Copy link

I am crafting some custom rules and am unable to get the guidelines section to print out when the rule fails.
When I run the out-of-the box rules, guidelines prints. How do I get my custom rules to generate the guideline so that my users can access url?

metadata:
  name: "Ensure instance profile is configured - https://test.example.com/EC2/MK_AWS_EC2_2.md?at=refs%2Fheads%2Fdevelop"
  guidelines: "https://test.example.com/EC2/MK_AWS_EC2_2.md?at=refs%2Fheads%2Fdevelop"
  id: "CKV_AWS_TF_EC2_2"
  category: "IAM"
  severity: "TBD"
scope:
provider: "aws"
definition:
            cond_type: "attribute"
            resource_types:
              - "aws_instance"
            attribute: "iam_instance_profile"
            operator: "exists"

Version (please complete the following information):

  • Checkov Version [2.0.1065]
@nimrodkor
Copy link
Contributor

Hi @SiSiHenry !

Can you try naming the field guideline, singular form?

@SiSiHenry
Copy link
Author

I have tried both singular and plural form of the word and neither outputs.

@npapapietro
Copy link

npapapietro commented Aug 2, 2022

Seeing this too, here's an example entry from running -o json on a plan file. I've omitted details of my infrastructure, but removed no keys at top level. (version checkov-2.1.87)

{
    "check_id": "CKV2_AWS_6",
    "bc_check_id": null,
    "check_name": "Ensure that S3 bucket has a Public Access block",
    "check_result": {
        "result": "FAILED",
        "entity": {
            "aws_s3_bucket": {} // aws results
        },
        "evaluated_keys": [
            "block_public_policy",
            "block_public_acls",
            "resource_type"
        ]
    },
    "code_block": [], // my tf code
    "file_path": "/../../app/tfplan.json",
    "file_abs_path": "/app/tfplan.json",
    "repo_file_path": "/app/tfplan.json",
    "file_line_range": [
        1437,
        1458
    ],
    "resource": "", // my resource
    "evaluations": null,
    "check_class": "checkov.common.graph.checks_infra.base_check",
    "fixed_definition": null,
    "entity_tags": {}, // my entity
    "caller_file_path": null,
    "caller_file_line_range": null,
    "resource_address": "", // my resource
    "severity": null,
    "bc_category": null,
    "benchmarks": {},
    "description": null,
    "short_description": null,
    "vulnerability_details": null,
    "connected_node": null,
    "guideline": null
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants