stelligent / cfn_nag

Linting tool for CloudFormation templates
MIT License
1.25k stars 209 forks source link

Budgets Action Issue #625

Open kyleego opened 5 months ago

kyleego commented 5 months ago

Does cfn_nag support AWS Budgets Actions? It returns errors when I run it with the Budget Action included in the CFN template. If I remove the Budget action code from the template though, it works as expected with no errors. Here are the errors it returns:

/opt/homebrew/Cellar/gem-cfn-nag/0.8.10/gems/cfn-model-0.6.6/lib/cfn-model/validator/reference_validator.rb:26:in `block in post_process_special_refs': undefined method `match' for an instance of Hash (NoMethodError)
        from /opt/homebrew/Cellar/ruby/3.3.0/lib/ruby/3.3.0/set.rb:547:in `block in delete_if'
        from /opt/homebrew/Cellar/ruby/3.3.0/lib/ruby/3.3.0/set.rb:501:in `each_key'
        from /opt/homebrew/Cellar/ruby/3.3.0/lib/ruby/3.3.0/set.rb:501:in `each'
        from /opt/homebrew/Cellar/ruby/3.3.0/lib/ruby/3.3.0/set.rb:547:in `select'
        from /opt/homebrew/Cellar/ruby/3.3.0/lib/ruby/3.3.0/set.rb:547:in `delete_if'
        from /opt/homebrew/Cellar/gem-cfn-nag/0.8.10/gems/cfn-model-0.6.6/lib/cfn-model/validator/reference_validator.rb:25:in `post_process_special_refs'
        from /opt/homebrew/Cellar/gem-cfn-nag/0.8.10/gems/cfn-model-0.6.6/lib/cfn-model/validator/reference_validator.rb:17:in `unresolved_references'
        from /opt/homebrew/Cellar/gem-cfn-nag/0.8.10/gems/cfn-model-0.6.6/lib/cfn-model/parser/cfn_parser.rb:227:in `validate_references'
        from /opt/homebrew/Cellar/gem-cfn-nag/0.8.10/gems/cfn-model-0.6.6/lib/cfn-model/parser/cfn_parser.rb:75:in `parse_without_parameters'
        from /opt/homebrew/Cellar/gem-cfn-nag/0.8.10/gems/cfn-model-0.6.6/lib/cfn-model/parser/cfn_parser.rb:43:in `parse'
        from /opt/homebrew/Cellar/gem-cfn-nag/0.8.10/gems/cfn-nag-0.8.10/lib/cfn-nag/cfn_nag.rb:87:in `audit'
        from /opt/homebrew/Cellar/gem-cfn-nag/0.8.10/gems/cfn-nag-0.8.10/lib/cfn-nag/cfn_nag.rb:68:in `block in audit_aggregate_across_files'
        from /opt/homebrew/Cellar/gem-cfn-nag/0.8.10/gems/cfn-nag-0.8.10/lib/cfn-nag/cfn_nag.rb:65:in `each'
        from /opt/homebrew/Cellar/gem-cfn-nag/0.8.10/gems/cfn-nag-0.8.10/lib/cfn-nag/cfn_nag.rb:65:in `audit_aggregate_across_files'
        from /opt/homebrew/Cellar/gem-cfn-nag/0.8.10/gems/cfn-nag-0.8.10/lib/cfn-nag/cfn_nag.rb:35:in `audit_aggregate_across_files_and_render_results'
        from /opt/homebrew/Cellar/gem-cfn-nag/0.8.10/gems/cfn-nag-0.8.10/lib/cfn-nag/cfn_nag_executor.rb:50:in `execute_aggregate_scan'
        from /opt/homebrew/Cellar/gem-cfn-nag/0.8.10/gems/cfn-nag-0.8.10/lib/cfn-nag/cfn_nag_executor.rb:30:in `scan'
        from /opt/homebrew/Cellar/gem-cfn-nag/0.8.10/gems/cfn-nag-0.8.10/bin/cfn_nag_scan:11:in `<top (required)>'
        from /opt/homebrew/bin/cfn_nag_scan:6:in `load'
        from /opt/homebrew/bin/cfn_nag_scan:6:in `<main>'