You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Running 'cfn_nag_scan' on below template (generated using the AWS CDK, and is deployable to AWS) results in the following error:
Traceback (most recent call last):
14: from C:/Ruby26-x64/bin/cfn_nag_scan:23:in <main>' 13: from C:/Ruby26-x64/bin/cfn_nag_scan:23:in load'
12: from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/cfn-nag-0.6.7/bin/cfn_nag_scan:11:in <top (required)>' 11: from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/cfn-nag-0.6.7/lib/cfn-nag/cfn_nag_executor.rb:30:in scan'
10: from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/cfn-nag-0.6.7/lib/cfn-nag/cfn_nag_executor.rb:50:in execute_aggregate_scan' 9: from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/cfn-nag-0.6.7/lib/cfn-nag/cfn_nag.rb:34:in audit_aggregate_across_files_and_render_results'
8: from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/cfn-nag-0.6.7/lib/cfn-nag/cfn_nag.rb:64:in audit_aggregate_across_files' 7: from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/cfn-nag-0.6.7/lib/cfn-nag/cfn_nag.rb:64:in each'
6: from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/cfn-nag-0.6.7/lib/cfn-nag/cfn_nag.rb:67:in block in audit_aggregate_across_files' 5: from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/cfn-nag-0.6.7/lib/cfn-nag/cfn_nag.rb:86:in audit'
4: from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/cfn-model-0.5.1/lib/cfn-model/parser/cfn_parser.rb:43:in parse' 3: from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/cfn-model-0.5.1/lib/cfn-model/parser/cfn_parser.rb:86:in parse_without_parameters'
2: from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/cfn-model-0.5.1/lib/cfn-model/parser/cfn_parser.rb:164:in transform_hash_into_model_elements_with_numbers' 1: from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/cfn-model-0.5.1/lib/cfn-model/parser/cfn_parser.rb:164:in each'
C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/cfn-model-0.5.1/lib/cfn-model/parser/cfn_parser.rb:167:in block in transform_hash_into_model_elements_with_numbers': undefined method new' for AWS:Module (NoMethodError)
I think --strongly emphasises 'think'-- that the problem is when the cloudformation contains a Custom::AWS resource, as in the example from @KyleMuellerPFG and mine
Thanks for reporting. As a workaround, setting resourceType on your custom resource in CDK to something like Custom::MyCustomResource should work until we have a fix released for this.
arothian
added a commit
to arothian/cfn_nag
that referenced
this issue
Oct 12, 2020
cfn-nag version: 0.6.7
cfn-model version: 0.5.1
Running 'cfn_nag_scan' on below template (generated using the AWS CDK, and is deployable to AWS) results in the following error:
Template:
The text was updated successfully, but these errors were encountered: