Using boto3 securityhub.get_findings() to export from SecurityHub to Excel

2.9k Views Asked by At

I am looking for indepth information on using boto3's AWS Security Hub modules. I have looked over the documentation but do not understand how to use the filters or how to understand the structure of the get_findings output.

It would be helpful to find some sample code where the securityhub.getfindings() output is manipulated to create meaningful extracts and reports.

Any, tips or suggestions would be helpful.

All the best, Kenny

1

There are 1 best solutions below

0
On

You can find the full syntax documented here. Example:

_filter = Filters={
    'ComplianceStatus': [
        {
            'Value': 'FAILED',
            'Comparison': 'EQUALS'
        },
        {
            'Value': 'WARNING',
            'Comparison': 'EQUALS'
        }
    ],
}
client.get_findings(Filters=_filter)