bugcrowd-vrt
A comprehensive Rust library for working with the Bugcrowd Vulnerability Rating Taxonomy (VRT), including CWE mappings and CVSS v3 scoring.
Features
- VRT Taxonomy - Type-safe deserialization of Bugcrowd's vulnerability taxonomy
- CWE Mapping - Map VRT categories to Common Weakness Enumeration (CWE) identifiers
- CVSS v3 - Get CVSS v3 vectors and scores for vulnerabilities
- Smart Categorization - Automatically categorize vulnerability findings
- Zero Dependencies (core) - Minimal footprint with optional features
- Well Tested - 50+ tests covering edge cases and integrations
Quick Start
Add to your Cargo.toml:
[]
= "1.17"
Basic Usage
use ;
Scanner Integration
Perfect for vulnerability scanners - automatically categorize findings:
use ;
Output:
VRT: SQL Injection
Priority: P1
CWEs: ["CWE-89"]
CVSS: Some("AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:L/A:N")
Use Cases
1. Vulnerability Scanners
Categorize security findings with industry-standard taxonomies:
// Your scanner finds a vulnerability
let scanner_output = "Reflected XSS in search parameter";
// Automatically categorize it
if let Some = categorizer.categorize_by_description
2. Security Reporting
Generate standardized vulnerability reports:
// Export to JSON
let report = json!;
3. Bug Bounty Platforms
Validate and categorize bug bounty submissions:
// Search for matching categories
let matches = categorizer.search_by_name;
println!;
// Get details for each
for vrt_id in matches
API Overview
VRT Taxonomy
use ;
let taxonomy = load_vrt_from_file?;
// Navigate the hierarchy
for category in &taxonomy
// Find by ID
if let Some = taxonomy.find_by_id
CWE Mapping
use load_cwe_mapping_from_file;
let cwe_mapping = load_cwe_mapping_from_file?;
// Lookup CWE IDs for a VRT entry
if let Some = cwe_mapping.lookup_cwe
// Get statistics
let stats = cwe_mapping.statistics;
println!;
CVSS v3 Vectors
use ;
use FromStr;
let cvss_mapping = load_cvss_v3_mapping_from_file?;
// Get CVSS vector for a vulnerability
if let Some = cvss_mapping.lookup_cvss
// Parse CVSS vectors
let vector = from_str?;
assert!;
Vulnerability Categorization
use VulnerabilityCategorizer;
let categorizer = with_all_mappings;
// Method 1: Automatic categorization by description
let finding = categorizer.categorize_by_description?;
// Method 2: Direct lookup by VRT ID
let finding = categorizer.categorize_by_id?;
// Method 3: Search and select
let matches = categorizer.search_by_name;
let finding = categorizer.categorize_by_id?;
// Access all data
println!;
println!;
println!;
println!;
println!;
println!;
Examples
Run the included examples:
# Load and explore VRT taxonomy
# Explore CWE mappings
# Explore CVSS v3 mappings
# Complete scanner integration example
Data Files
You'll need the VRT data files (included in the repo):
vrt.json- Bugcrowd VRT taxonomy (287 vulnerability variants)cwe.mappings.json- VRT to CWE mappings (117 unique CWEs)cvss_v3.json- VRT to CVSS v3 mappings (252 entries)
Download the latest from Bugcrowd's VRT repository.
Documentation
- Scanner Integration Guide - Complete guide for vulnerability scanner integration
- API Documentation - Full API reference
- Examples Directory - Working code examples
Type Safety
All types are fully documented and use Rust's type system for safety:
Performance
- Loading VRT data: ~50ms (one-time at startup)
- Categorization by ID: O(1) - instant lookup
- Categorization by description: ~1ms (keyword matching)
- Search operations: ~5ms (full taxonomy scan)
Suitable for high-throughput scanners processing thousands of findings.
Testing
Comprehensive test coverage with 50+ tests:
# Run all tests
# Run specific test suites
# Run with output
Test categories:
- ✅ VRT taxonomy parsing and navigation
- ✅ CWE mapping and lookups
- ✅ CVSS v3 parsing and validation
- ✅ Edge cases (empty data, invalid formats, deep nesting)
- ✅ Categorization accuracy
- ✅ Integration examples
Project Structure
bugcrowd-vrt/
├── src/
│ ├── lib.rs # Main library exports
│ ├── types.rs # VRT taxonomy types
│ ├── cwe_mapping.rs # CWE mapping types
│ ├── cvss_v3.rs # CVSS v3 types and parsing
│ └── categorization.rs # Vulnerability categorization
├── tests/
│ ├── vrt_tests.rs
│ ├── types_tests.rs
│ ├── cwe_mapping_tests.rs
│ ├── cvss_v3_tests.rs
│ └── edge_cases_tests.rs
├── examples/
│ ├── load_vrt.rs
│ ├── cwe_mapping.rs
│ ├── cvss_v3_mapping.rs
│ └── scanner_integration.rs
├── vrt.json # VRT taxonomy data
├── cwe.mappings.json # CWE mappings
├── cvss_v3.json # CVSS v3 mappings
└── SCANNER_INTEGRATION.md # Integration guide
Contributing
Contributions welcome! Please:
- Add tests for new features
- Update documentation
- Follow existing code style
- Run
cargo fmtandcargo clippy
License
MIT License - see LICENSE file for details.
Acknowledgments
Related Projects
- Bugcrowd VRT - Official VRT repository
- CVSS Calculator - Official CVSS v3.1 calculator
Support
- 📖 Documentation
- 💬 Issues
- 📧 Contact: trapdoorsec.com
Made with ❤️ for the security community