Language: Go
Label: vulnerable
CWE: NVD-CWE-noinfo \u2014 

Code:
func OwnerRoleBindingsIndexFunc(obj interface{}) (result []string, err error) {
	rb := obj.(*rbacv1.RoleBinding)

	for _, subject := range rb.Subjects {
		result = append(result, fmt.Sprintf("%s-%s", subject.Kind, subject.Name))
	}

	return result, nil
}