google.cloud.forseti.scanner.scanners.bigquery_scanner module

Scanner for the Big Query rules engine.

class BigqueryAccessControlsData(parent_project, bigquery_acl)

Bases: tuple

__getnewargs__()

Return self as a plain tuple. Used by copy and pickle.

__getstate__()

Exclude the OrderedDict from pickling

__repr__()

Return a nicely formatted representation string

_asdict()

Return a new OrderedDict which maps field names to their values

_fields = ('parent_project', 'bigquery_acl')
classmethod _make(iterable, new=<built-in method __new__ of type object>, len=<built-in function len>)

Make a new BigqueryAccessControlsData object from a sequence or iterable

_replace(**kwds)

Return a new BigqueryAccessControlsData object replacing specified fields with new values

bigquery_acl
parent_project
class BigqueryScanner(global_configs, scanner_configs, service_config, model_name, snapshot_timestamp, rules)[source]

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

Scanner for BigQuery acls.

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

Find violations in the policies.

Parameters:bigquery_acl_data (list) – Big Query data to find violations in
Returns:A list of BigQuery violations
Return type:list
static _flatten_violations(violations)[source]

Flatten RuleViolations into a dict for each RuleViolation member.

Parameters:violations (list) – The RuleViolations to flatten.
Yields:dict – Iterator of RuleViolations as a dict per member.
_output_results(all_violations)[source]

Output results.

Parameters:all_violations (list) – A list of BigQuery violations.
_retrieve()[source]

Retrieves the data for scanner.

Returns:BigQuery ACL data
Return type:list
Raises:ValueError – if resources have an unexpected type.
run()[source]

Runs the data collection.