Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Cvss2VectorMocker

A mocking service for generating random CVSS v2 vectors.

Hierarchy

  • CvssVectorMocker
    • Cvss2VectorMocker

Index

Constructors

constructor

  • new Cvss2VectorMocker(includeTemporal?: boolean, includeEnvironmental?: boolean): Cvss2VectorMocker
  • Intializes a new instance of a mocking service for generating random CVSS vectors.

    Parameters

    • includeTemporal: boolean = false

      if true, temporal attributes will be included in geenerated vectors

    • includeEnvironmental: boolean = false

      if true, environmental attributes will be included in generated vectors

    Returns Cvss2VectorMocker

Accessors

includeEnvironmental

  • get includeEnvironmental(): boolean
  • set includeEnvironmental(includeEnvironmental: boolean): void
  • Gets or sets whether or not this instance will generate environmental attributes.

    Returns boolean

  • Gets or sets whether or not this instance will generate environmental attributes.

    Parameters

    • includeEnvironmental: boolean

    Returns void

includeTemporal

  • get includeTemporal(): boolean
  • set includeTemporal(includeTemporal: boolean): void
  • Gets or sets whether or not this instance will generate temporal attributes.

    Returns boolean

  • Gets or sets whether or not this instance will generate temporal attributes.

    Parameters

    • includeTemporal: boolean

    Returns void

Methods

generate

Static Private getRandomAccessComplexity

Static Private getRandomAccessVector

Static Private getRandomAuthentication

Static Private getRandomCollateralDamagePotential

Static Private getRandomExploitability

Static Private getRandomImpact

Static Private getRandomImpactSubscore

Static Private getRandomRemediationLevel

Static Private getRandomReportConfidence

Static Private getRandomTargetDistribution

Static Protected takeRandom

  • takeRandom<T>(array: T[]): T
  • Chooses and returns a random element of the provided array.

    Type parameters

    • T

    Parameters

    • array: T[]

      the array to take a random element from

    Returns T

    a random element from the provided array

Generated using TypeDoc