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

Error: TypeError: Cannot read properties of undefined (reading 'to') #178

Open
thijsdev opened this issue Sep 28, 2023 · 0 comments
Open

Comments

@thijsdev
Copy link

When I run a cdk synth with the controlTowerRulesEnabled enabled I run into the following error.

Performing Policy Validations

Validation Report
-----------------

╔════════════════════════════════════╗
║           Plugin Report            ║
║   Plugin: cdk-validator-cfnguard   ║
║   Version: 0.0.54                  ║
║   Status: failure                  ║
╚════════════════════════════════════╝


Metadata:
	error: Validation plugin 'cdk-validator-cfnguard' failed:
        CfnGuardValidator plugin failed processing cfn-guard results.
        Please create an issue https://github.com/cdklabs/cdk-validator-cfnguard/issues/new
        Error: TypeError: Cannot read properties of undefined (reading 'to')

Policy Validation Report Summary

╔════════════════════════╤═════════╗
║ Plugin                 │ Status  ║
╟────────────────────────┼─────────╢
║ cdk-validator-cfnguard │ failure ║
╚════════════════════════╧═════════╝

Validation failed. See the validation report above for details

Subprocess exited with error 1

When I run the template agains the cfn-guard executable directly I get:

synthed.yml Status = FAIL
FAILED rules
ct-rds-pr-11.guard/rds_instance_deployed_in_vpc_check    FAIL
---
Evaluation of rules ct-rds-pr-11.guard against data synthed.yml
--
Property traversed until [] in data [synthed.yml] is not compliant with [rds_instance_deployed_in_vpc_check] due to retrieval error. Error Message [Could not find key AWSTemplateFormatVersion inside struct at path [L:0,C:0]]
Parameterized Rule check failed for synthed.yml. Reason ;         [CT.RDS.PR.11]: Require an Amazon RDS database instance to have a VPC configuration;         [FIX]: Set a 'DBSubnetGroupName'.;
--
Rule [rds_instance_deployed_in_vpc_check] is not applicable for template [synthed.yml]
--
synthed.yml Status = FAIL
FAILED rules
ct-rds-pr-13.guard/rds_instance_deletion_protection_enabled_check    FAIL
---
Evaluating data synthed.yml against rules ct-rds-pr-13.guard
Number of non-compliant resources 1
...

Not sure why this is going on.

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

No branches or pull requests

1 participant