nccgroup / ScoutSuite

Multi-Cloud Security Auditing Tool
GNU General Public License v2.0
6.57k stars 1.05k forks source link

GCP CloudSQL Error #1322

Open WeipingGan opened 3 years ago

WeipingGan commented 3 years ago

When I run ScoutSuite scanner for our GCP project, it reports this error: scout[153] ERROR Unknown Cloud SQL instance IP address type: OUTGOING

And we check this part of code: https://github.com/nccgroup/ScoutSuite/blob/db827e3d8e36e3bc7adcb8c62f2453960353c2ef/ScoutSuite/providers/gcp/resources/cloudsql/database_instances.py#L55

Find ScoutSuite doesn't support outgoing type IP for CloudSQL.

# network interfaces
        instance_dict['public_ip'] = None
        instance_dict['private_ip'] = None
        for address in raw_instance.get('ipAddresses', []):
            if address['type'] == 'PRIMARY':
                instance_dict['public_ip'] = address['ipAddress']
            elif address['type'] == 'PRIVATE':
                instance_dict['private_ip'] = address['ipAddress']
            else:
                print_exception('Unknown Cloud SQL instance IP address type: {}'.format(address['type']))
WeipingGan commented 3 years ago

Here is the console output:

image

joaohenriquepda commented 3 years ago

I have the same problem. Does anyone know how I can remove this bug. CircleCI shows an error message even without an error

chargraves85 commented 2 years ago

Is this still active? We are seeing the same problem.