func New(b []byte) (*Finding, error) {
	var f Finding
	if err := json.Unmarshal(b, &f.anomalousIAM); err != nil {
		return nil, err
	}
	if f.anomalousIAM.GetJsonPayload().GetDetectionCategory().GetRuleName() != "" {
		return &f, nil
	}
	if err := json.Unmarshal(b, &f.anomalousIAMSCC); err != nil {
		return nil, err
	}
	f.UseCSCC = true
	return &f, nil
}
New returns a new finding.
package anomalousiam
import (
	"encoding/json"
	"github.com/googlecloudplatform/security-response-automation/cloudfunctions/iam/revoke"
	pb "github.com/googlecloudplatform/security-response-automation/compiled/etd/protos"
)
func (f *Finding) Name(b []byte) string {
	ff, err := New(b)
	if err != nil {
		return ""
	}
	name := ""
	if ff.UseCSCC {
		name = ff.anomalousIAMSCC.GetFinding().GetSourceProperties().GetDetectionCategory().GetRuleName()
	} else {
		name = ff.anomalousIAM.GetJsonPayload().GetDetectionCategory().GetRuleName()
	}
	if name != "iam_anomalous_grant" {
		return ""
	}
	return name
}