Object: severitycountsobject.py - Object container for severity counts
- Purpose:
This module provides the object implementation for the
SeverityCountsobject.This object is used as a storage container and accessor to the number of vulnerabilities for each severity class, for a given project or release.
- Platform:
Linux/Windows | Python 3.8+
- Developer:
J Berendt
- Email:
- Comments:
n/a
- class SeverityCountsObject(vulns: list)[source]
Bases:
objectContainer and accessor class for vulnerability severity counts.
- Parameters:
vulns (list) –
A list of dictionary objects containing the vulnerabilities for a given project or release. Note, this is expected to be a
listofdictobjects, each containing at least a'severity'key. The case of the severity string value does not matter.Example expected minimal
vulnsstructure:[ {'severity': 'Low'}, ..., {'severity': 'High'} ]
Expected severity string values:
Low
Moderate or Medium
High
Critical
- property low: int
Accessor to the number of LOW severity class entries.
- property moderate: int
Accessor to the number of MODERATE severity class entries.
This accessor applies to both the MODERATE and MEDIUM classes.
- property high: int
Accessor to the number of HIGH severity class entries.
- property critical: int
Accessor to the number of CRITICAL severity class entries.
- property total: int
Accessor to the TOTAL number of vulnerabilities for a release.