CodeGuruSecurity / Client / get_metrics_summary
get_metrics_summary#
- CodeGuruSecurity.Client.get_metrics_summary(**kwargs)#
Returns top level metrics about an account from a specified date, including number of open findings, the categories with most findings, the scans with most open findings, and scans with most open critical findings.
See also: AWS API Documentation
Request Syntax
response = client.get_metrics_summary( date=datetime(2015, 1, 1) )
- Parameters:
date (datetime) –
[REQUIRED]
The date you want to retrieve summary metrics from, rounded to the nearest day. The date must be within the past two years since metrics data is only stored for two years. If a date outside of this range is passed, the response will be empty.
- Return type:
dict
- Returns:
Response Syntax
{ 'metricsSummary': { 'categoriesWithMostFindings': [ { 'categoryName': 'string', 'findingNumber': 123 }, ], 'date': datetime(2015, 1, 1), 'openFindings': { 'critical': 123.0, 'high': 123.0, 'info': 123.0, 'low': 123.0, 'medium': 123.0 }, 'scansWithMostOpenCriticalFindings': [ { 'findingNumber': 123, 'scanName': 'string' }, ], 'scansWithMostOpenFindings': [ { 'findingNumber': 123, 'scanName': 'string' }, ] } }
Response Structure
(dict) –
metricsSummary (dict) –
The summary metrics from the specified date.
categoriesWithMostFindings (list) –
A list of
CategoryWithFindingNum
objects for the top 5 finding categories with the most open findings in an account.(dict) –
Information about a finding category with open findings.
categoryName (string) –
The name of the finding category. A finding category is determined by the detector that detected the finding.
findingNumber (integer) –
The number of open findings in the category.
date (datetime) –
The date from which the metrics summary information was retrieved.
openFindings (dict) –
The number of open findings of each severity in an account.
critical (float) –
The severity of the finding is critical and should be addressed immediately.
high (float) –
The severity of the finding is high and should be addressed as a near-term priority.
info (float) –
The finding is related to quality or readability improvements and not considered actionable.
low (float) –
The severity of the finding is low and does require action on its own.
medium (float) –
The severity of the finding is medium and should be addressed as a mid-term priority.
scansWithMostOpenCriticalFindings (list) –
A list of
ScanNameWithFindingNum
objects for the top 3 scans with the most number of open findings in an account.(dict) –
Information about a scan with open findings.
findingNumber (integer) –
The number of open findings generated by a scan.
scanName (string) –
The name of the scan.
scansWithMostOpenFindings (list) –
A list of
ScanNameWithFindingNum
objects for the top 3 scans with the most number of open critical findings in an account.(dict) –
Information about a scan with open findings.
findingNumber (integer) –
The number of open findings generated by a scan.
scanName (string) –
The name of the scan.
Exceptions
CodeGuruSecurity.Client.exceptions.InternalServerException
CodeGuruSecurity.Client.exceptions.ThrottlingException
CodeGuruSecurity.Client.exceptions.ValidationException
CodeGuruSecurity.Client.exceptions.AccessDeniedException