google.cloud.forseti.scanner.scanners.blacklist_scanner module

Blacklist scanner.

class BlacklistScanner(global_configs, scanner_configs, service_config, model_name, snapshot_timestamp, rules)[source]

Bases: google.cloud.forseti.scanner.scanners.base_scanner.BaseScanner

Blacklist scanner.

_abc_cache = <_weakrefset.WeakSet object>
_abc_negative_cache = <_weakrefset.WeakSet object>
_abc_negative_cache_version = 190
_abc_registry = <_weakrefset.WeakSet object>
_find_violations(instances_networks_data)[source]

Find violations in the policies. :param instances_networks_data: instance networks data

to find violations in
Returns:A list of violations
Return type:list
static _flatten_violations(violations)[source]

Flatten RuleViolations into a dict for each RuleViolation member. :param violations: The RuleViolations to flatten. :type violations: list

Yields:dict – Iterator of RuleViolations as a dict per member.
_output_results(all_violations)[source]

Output results. :param all_violations: All violations :type all_violations: list

_retrieve()[source]

Run the data collection. :returns:

A list that contains nested lists of per-instance
InstanceNetworksInterface objects.
Return type:list
get_instance_networks_interfaces()[source]

Get network info from a particular snapshot.

Returns:
A list that contains nested lists of per-instance
InstanceNetworksInterface objects.
Return type:list
run()[source]

Runs scanning.