Components
avidtools.datamodels.components
Component data classes used in AVID report and vulnerability datamodels.
- class LangValue(*, lang: str, value: str)[source]
Bases:
BaseModelGeneric class to store a string with its language specified.
- model_config = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class Artifact(*, type: ArtifactTypeEnum, name: str)[source]
Bases:
BaseModelType and name of an affected artifact.
- model_config = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class Detection(*, type: MethodEnum, name: str)[source]
Bases:
BaseModelMethod to detect a specific issue.
- model_config = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class Affects(*, developer: List[str], deployer: List[str], artifacts: List[Artifact])[source]
Bases:
BaseModelInformation on Artifact(s) affected by this report.
- model_config = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class Problemtype(*, classof: ClassEnum, type: TypeEnum | None = None, description: LangValue)[source]
Bases:
BaseModelDescription of the problem a report/vuln is concerned with.
- model_config = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class Metric(*, name: str, detection_method: Detection, results: Dict)[source]
Bases:
BaseModelQuantification of the issue in a specific report.
- model_config = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class Reference(*, type: str | None = None, label: str, url: str)[source]
Bases:
BaseModelDetails for a reference of a report/vulnerability.
- model_config = {'fields': {'type': {'exclude': True}}}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class AtlasTaxonomy(*, tactic: str | None = None, technique: str | None = None, description: str | None = None)[source]
Bases:
BaseModelATLAS taxonomy mappings representing attack procedure steps.
- model_config = {'fields': {'description': {'exclude': True}, 'tactic': {'exclude': True}, 'technique': {'exclude': True}}}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class AvidTaxonomy(*, vuln_id: str | None = None, risk_domain: List[str], sep_view: List[SepEnum], lifecycle_view: List[LifecycleEnum], taxonomy_version: str)[source]
Bases:
BaseModelAVID taxonomy mappings of a report/vulnerability.
- model_config = {'fields': {'vuln_id': {'exclude': True}}}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class CVSSScores(*, version: str, vectorString: str, baseScore: float, baseSeverity: str, attackVector: str | None = None, attackComplexity: str | None = None, privilegesRequired: str | None = None, userInteraction: str | None = None, scope: str | None = None, confidentialityImpact: str | None = None, integrityImpact: str | None = None, availabilityImpact: str | None = None)[source]
Bases:
BaseModelCVSS v3.0/v3.1 severity metrics.
- model_config = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class CWETaxonomy(*, cweId: str, description: str | None = None, lang: str | None = None)[source]
Bases:
BaseModelCWE (Common Weakness Enumeration) taxonomy mapping.
- model_config = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class JailbreakTaxonomyItem(*, Category: str | None = None, Strategy: str | None = None, Technique: str | None = None)[source]
Bases:
BaseModel0DIN Jailbreak Taxonomy item with Category, Strategy, and Technique.
- model_config = {'fields': {'Category': {'exclude': True}, 'Strategy': {'exclude': True}, 'Technique': {'exclude': True}}}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class OdinTaxonomy(*, SocialImpactScore: str | None = None, JailbreakTaxonomy: List[JailbreakTaxonomyItem] | None = None)[source]
Bases:
BaseModel0DIN taxonomy mapping for AI security disclosures.
- model_config = {'fields': {'JailbreakTaxonomy': {'exclude': True}, 'SocialImpactScore': {'exclude': True}}}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class Impact(*, avid: AvidTaxonomy | None = None, atlas: List[AtlasTaxonomy] | None = None, cvss: CVSSScores | None = None, cwe: List[CWETaxonomy] | None = None, odin: OdinTaxonomy | None = None)[source]
Bases:
BaseModelImpact information of a report/vulnerability.
E.g. different taxonomy mappings, harm and severity scores.
- model_config = {'fields': {'atlas': {'exclude': True}, 'avid': {'exclude': True}, 'cvss': {'exclude': True}, 'cwe': {'exclude': True}, 'odin': {'exclude': True}}}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].