awslabs / aws-config-rules

[Node, Python, Java] Repository of sample Custom Rules for AWS Config.
http://aws.amazon.com/config/
Creative Commons Zero v1.0 Universal
1.58k stars 851 forks source link

Wrong parameter passed to build_evaluation function #342

Open mathieubrun opened 3 years ago

mathieubrun commented 3 years ago

For those rules (other may be having the same issue) :

The build_evaluation function is called with gateway['name'], instead of gateway['id'] For example evaluations.append(build_evaluation(gateway['name'], 'NON_COMPLIANT', event, annotation='The attached policy allows more than the whitelist.'))

This causes an issue in the AWS Config Console > Rules > Rule details, section "Compliance status", the Ressource name is displayed, and when clicking on it, it is not found.

When changing gateway['name'] by gateway['id'] the issue disappears.

I can make a PR later if it helps.