Scanner for Log Sinks/Exports.

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


Scanner for Log Sinks/Exports.

_abc_cache = <_weakrefset.WeakSet object>
_abc_negative_cache = <_weakrefset.WeakSet object>
_abc_negative_cache_version = 214
_abc_registry = <_weakrefset.WeakSet object>

Find violations in log sinks.

Parameters:log_sink_data (list) – log sink data to find violations in.
Returns:A list of all violations
Return type:list
static _flatten_violations(violations)[source]

Flatten RuleViolations into a dict for each violation.

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

Output results.

Parameters:all_violations (list) – A list of violations

Retrieves the data for scanner.

Returns:List of GCP resources’ log sinks.
Return type:list

Runs the data collection.