Skip to content

Latest commit

 

History

History
60 lines (47 loc) · 2.02 KB

README.md

File metadata and controls

60 lines (47 loc) · 2.02 KB

Build Status Codacy Badge Maven Central License

CVSS Calculator

CVSS Calculator is a Java library for calculating CVSSv2, CVSSv3, and CVSSv3.1 scores and vectors, including support for base scores, impact scores, and exploitability scores.

Compiling

$ mvn clean package

Usage Example

// Performs a new calculation using CVSSv3
CvssV3 cvssV3 = new CvssV3()
    .attackVector(AttackVector.NETWORK)
    .attackComplexity(AttackComplexity.LOW)
    .privilegesRequired(PrivilegesRequired.HIGH)
    .userInteraction(UserInteraction.NONE)
    .scope(Scope.UNCHANGED)
    .confidentiality(CIA.HIGH)
    .integrity(CIA.HIGH)
    .availability(CIA.HIGH);

Score score = cvssV3.calculateScore();
// Parses an existing CVSS v2 or v3 vector
Cvss cvss = Cvss.fromVector(vector);
Score score = cvss.calculateScore();

Maven Usage

CVSS Calculator is available in the Maven Central Repository.

<dependency>
    <groupId>us.springett</groupId>
    <artifactId>cvss-calculator</artifactId>
    <version>1.4.3</version>
</dependency>

Copyright & License

CVSS Calculator is Copyright (c) Steve Springett. All Rights Reserved.

All other trademarks are property of their respective owners.

Permission to modify and redistribute is granted under the terms of the Apache 2.0 license.