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.

Details has not been printed

See original GitHub issue

Describe the issue I’m trying to add details to a custom policy, but it has not been printed. Run: On MacOS and on Github Action checkov-action@v12.1943.0 Version: 2.2.168 Additional context

MANDATORY_TAGS = [ “Application”, “Env”, “Team”, ]

class MandatoryTags(BaseResourceCheck):

  def __init__(self):
      name = "Ensure all resources has madatory tags"
      id = "CUSTOM_AWS_001"
      supported_resources = ['aws_kms_key']
      categories = [CheckCategories.GENERAL_SECURITY]
      guideline = "Check page blah blah"
      super().__init__(name=name, id=id, categories=categories,
            supported_resources=supported_resources, guideline=guideline)

  def scan_resource_conf(self, conf):
      if 'tags_all' in conf.keys():
          resource_tags = list(conf['tags_all'][0].keys())
          if not all(tag in resource_tags for tag in MANDATORY_TAGS):
              self.details.append("default_tags need to be set on provider level")
              return CheckResult.FAILED
          return CheckResult.PASSED

check = MandatoryTags()

** output ** "check_id": "CUSTOM_AWS_001", "bc_check_id": null, "check_name": "Ensure all resources has mandatory tags", "check_result": { "result": "FAILED", "evaluated_keys": [] }, "code_block": [...], "file_path": "/plan_fmt.json", "file_abs_path": "/private/tmp/platform-checkov-custom-policies/plan_fmt.json", "repo_file_path": "/plan_fmt.json", "file_line_range": [...], "resource": "aws_kms_key.default", "evaluations": null, "check_class": "CheckMandatoryTags", "fixed_definition": null, "entity_tags": null, "caller_file_path": null, "caller_file_line_range": null, "resource_address": "aws_kms_key.default", "severity": null, "bc_category": null, "benchmarks": null, "description": null, "short_description": null, "vulnerability_details": null, "connected_node": null, "guideline": "", "details": [], "check_len": null },

In the output, it shows the details list as empty.

Issue Analytics

  • State:closed
  • Created 9 months ago
  • Comments:6

github_iconTop GitHub Comments

gruebelcommented, Dec 16, 2022

found the issue, thanks. The details were just added for normal Terraform scans and not for Terraform plan scans.

gruebelcommented, Dec 19, 2022

it should be included with version 2.2.179

Read more comments on GitHub >

github_iconTop Results From Across the Web

has not yet been printed | English examples in context - Ludwig
High quality example sentences with “has not yet been printed” in context from reliable sources - Ludwig is the linguistic search engine that...
Read more >
has it been printed or is it printed? - TextRanch
However, from information submitted it is known that printed matter originating in PRC is mostly comprised of some specific categories of books, children's ......
Read more >
Unable to print or view the print preview of a webpage in ...
When you try to print or view the print preview of a webpage in Internet Explorer the webpage may not print or print...
Read more >
How To Check Your Printed Documents History On Windows 10
If you did send the wrong file to your printing list, you will end up wasting time, ink, and paper. The solution? Check...
Read more >
13 Common Printer Problems and How to Fix Them
Print a test page to see if the clog is gone, print a second one to be sure (sometimes two will do the...
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 Post

No results found

github_iconTop Related Hashnode Post

No results found