Languages: English | ็ฎไฝไธญๆ
CVSS Parser is a Go library for parsing, calculating, and processing CVSS (Common Vulnerability Scoring System) vectors. It supports CVSS 3.0 and 3.1 versions, providing comprehensive functionality for vulnerability management and security assessment.
๐ Complete Documentation Website
Visit our comprehensive documentation website for:
- ๐ API Reference - Complete API documentation
- ๐ก Examples & Tutorials - Practical usage examples
- ๐ Quick Start Guide - Get started in 5 minutes
- ๐ ไธญๆๆๆกฃ - Chinese documentation
- Support for CVSS 3.0 and 3.1 vector parsing and calculation
- Calculate base, temporal, and environmental scores
- JSON output and formatting capabilities
- Vector comparison and similarity calculation
- Strict and tolerant parsing modes
- Complete documentation and examples
- High test coverage
go get github.com/scagogogo/cvss
Parse and calculate CVSS scores:
package main
import (
"fmt"
"log"
"github.com/scagogogo/cvss-parser/pkg/cvss"
"github.com/scagogogo/cvss-parser/pkg/parser"
)
func main() {
// Parse CVSS vector
p := parser.NewCvss3xParser("CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H")
cvssVector, err := p.Parse()
if err != nil {
log.Fatalf("Parse failed: %v", err)
}
// Calculate score
calculator := cvss.NewCalculator(cvssVector)
score, err := calculator.Calculate()
if err != nil {
log.Fatalf("Calculation failed: %v", err)
}
fmt.Printf("CVSS Score: %.1f\n", score)
fmt.Printf("Severity: %s\n", calculator.GetSeverityRating(score))
}
For more examples, see the examples directory.
- 5-Minute Quick Start - Fastest way to get started
- Basic Examples - Simple usage examples
- CVSS Package Guide - Core functionality introduction
- Parser Usage - String parsing
- Vector Analysis - Advanced analysis features
- JSON Processing - Data serialization
- Batch Processing - Batch vector parsing
- Similarity Analysis - Vector comparison
We welcome code contributions, issue reports, and improvement suggestions! Please check our:
- GitHub Issues - Report issues or suggestions
- Contributing Guide - Learn how to contribute code
- Development Documentation - Development environment setup
This project is licensed under the MIT License - see the LICENSE file for details.