Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Cvss3VectorMocker

A mocking service for generating random CVSS v2 vectors.

Hierarchy

  • CvssVectorMocker
    • Cvss3VectorMocker

Index

Constructors

constructor

  • new Cvss3VectorMocker(includeTemporal?: boolean, includeEnvironmental?: boolean): Cvss3VectorMocker
  • 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 Cvss3VectorMocker

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 getRandomAttackComplexity

Static Private getRandomAttackVector

Static Private getRandomExploitCodeMaturity

Static Private getRandomImpact

Static Private getRandomPrivilegesRequired

Static Private getRandomRemediationLevel

Static Private getRandomReportConfidence

Static Private getRandomScope

  • getRandomScope(): Scope

Static Private getRandomSecurityRequirement

Static Private getRandomUserInteraction

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