Hello all, hope everyone is doing well.
I've just recently started playing around with Forseti and the Config Validator Scanner. I wanted to test it with monitoring compliance of GKE resources, so I enabled all of the GKE related constraints in the policy library. Then I created a cluster such that it would violate many if not all of the constraints.
I see from the config validator violations CSV file that forseti found all the violations that I would expect it to, but I noticed that only one of those violations showed up in the Security Command Center findings (I have the notifier integration set up).
Debugging a bit, I saw that the notifier's CSCC module was attempting to create the missing findings, but was getting a 409 response code back - it was attempting to create with a finding id that was already present.
From my reading though the code, seems like the finding id that the notifier attempts to use is based on the violation_hash value of the violation and that the violation_hash value is based on the resource's full_name, violation_data (that comes from config validator) and the resource data. The violation_data seems to come from the metadata that is present in the violation, which for the gke related policy templates seems to just contain the resource path. Seems like all of this data is the same across violations against the same cluster resource even though those violations are caused by different policy constraints - leading to different violations having the same violation hash and therefore duplicate CSCC finding ids.
I feel like there must be something I am missing or misunderstanding.
Can anyone shed some light on what I may be doing wrong?
Thanks,
John