IBM / scc-go-sdk

GoLang SDK for IBM Cloud Security and Compliance Center
https://cloud.ibm.com/docs/security-compliance
Apache License 2.0
2 stars 9 forks source link

AdditionalTargetAttributes Value field is a *string rather than *[]string #142

Closed SergioGabeteSysdig closed 4 months ago

SergioGabeteSysdig commented 5 months ago

Describe the bug AdditionalTargetAttributes Value field should be []string and not string

To Reproduce List the steps that can be used to demonstrate the bug. Include the name of the service and operation that you're trying to invoke, if applicable. Be sure to describe any relevant info regarding parameter values used with your API invocation.

Expected behavior A clear and concise description of what you expected to happen.

Screenshots If applicable, add screenshots to help explain your problem.

Must gather (please complete the following information):

Additional context Add any other context about the problem here.
Were you able to avoid the problem by changing your application code slightly?

tyao117 commented 5 months ago

rule to replicate the problem on:

{
                "created_on": "2022-11-17T10:23:49Z",
                "created_by": "IBM",
                "updated_on": "2024-04-23T03:46:20Z",
                "updated_by": "IBM",
                "id": "rule-f9137be8-2490-4afb-8cd5-a201cb167eb2",
                "account_id": "IBM",
                "description": "Check whether Virtual Private Cloud (VPC) network access control lists don't allow ingress from wildcard IP addresses to SSH port",
                "type": "system_defined",
                "version": "1.0.4",
                "import": {
                    "parameters": [
                        {
                            "name": "ssh_port",
                            "display_name": "Network ACL rule for allowed IPs to SSH port",
                            "description": "",
                            "type": "numeric"
                        }
                    ]
                },
                "target": {
                    "service_name": "is.network-acl",
                    "service_display_name": "Network ACL",
                    "resource_kind": "rule",
                    "additional_target_attributes": [
                        {
                            "name": "traffic_direction",
                            "operator": "string_equals",
                            "value": "inbound"
                        },
                        {
                            "name": "protocol",
                            "operator": "string_equals",
                            "value": [
                                "tcp",
                                "udp"
                            ]
                        }
                    ]
                },
                "required_config": {
                    "or": [
                        {
                            "property": "source_cidr_block",
                            "operator": "is_empty"
                        },
                        {
                            "property": "source_cidr_block",
                            "operator": "ips_not_equals",
                            "value": [
                                "0.0.0.0/0"
                            ]
                        },
                        {
                            "property": "match_traffic_allow",
                            "operator": "string_not_equals",
                            "value": "allow"
                        },
                        {
                            "or": [
                                {
                                    "property": "destination_port_min",
                                    "operator": "num_greater_than",
                                    "value": "${ssh_port}"
                                },
                                {
                                    "property": "destination_port_max",
                                    "operator": "num_less_than",
                                    "value": "${ssh_port}"
                                }
                            ]
                        }
                    ]
                },
                "labels": []
            }