Report

avidtools.datamodels.report

A report is one example of a particular vulnerability occurring, and is potentially more granular and reproducible based on the references provided in that report.

Class definitions for AVID report.

class ReportMetadata(*, report_id: str)[source]

Bases: BaseModel

Metadata class for a report.

model_config = {}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class Report(*, data_type: str = 'AVID', data_version: str | None = None, metadata: ReportMetadata | None = None, affects: Affects | None = None, problemtype: Problemtype | None = None, metrics: List[Metric] | None = None, references: List[Reference] | None = None, description: LangValue | None = None, impact: Impact | None = None, credit: List[LangValue] | None = None, reported_date: date | None = None)[source]

Bases: BaseModel

Top-level class to store an AVID report.

data_type: str

Namespace for the report. Set to AVID by default, change this only if you’re adopting these datamodels to stand up your own vulnerability database.

data_version: str | None

Latest version of the data.

metadata: ReportMetadata | None

Metadata for the report.

affects: Affects | None

Information on Artifact(s) affected by this report.

problemtype: Problemtype | None

Description of the problem a report is concerned with.

metrics: List[Metric] | None

Quantitative results pertaining to the issues raised in a specific report.

model_config = {}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

references: List[Reference] | None

References and their details.

description: LangValue | None

High-level description.

impact: Impact | None

Impact information, e.g. different taxonomy mappings, harm and severity scores.

credit: List[LangValue] | None

People credited for this report.

reported_date: date | None

Date reported.

save(location)[source]

Save a report as a json file.

Parameters:

location (str) – output *.json filename including location.