Skip to content

[Enhancement] Validate with -o json does not return all the metadata within the JSON Payload #343

@fabiodouek

Description

@fabiodouek

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

Currently when invoking cfn-guard validate --rules <RULES_DIR> --data <DATA_DIR> -o json, some of the relevant metadata is not in the JSON Payload. This scenario is in the scope of CFN Template evaluation. As follows:

The data file is not specified in the JSON payload, therefore if you are running cfn-guard validate against multiple data files, it's not possible to know which result refers to each file.

A side note that when evaluating a non-CFN Template data file e.g: AWS Config, then the JSON result is completely different and it has an JSON attribute called data_from.

Describe the solution you'd like

When using -o json, I would like to have a valid JSON object with the relevant metadata, including the data file path.

Describe alternatives you've considered

As a workaround, I'm invoking validate with -o json --show-summary all. It then has a reference to the data file outside of the JSON Payload. I've built a cfn post processor, to join the data file in the JSON, but it's an intensive processing depending on the number of evaluations.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions