use-security is a RustUse workspace for small, focused Rust 2024 utility crates around security identifiers, taxonomy labels, metadata, and primitive validation helpers.
Every crate in this workspace is experimental while the release line remains below 0.3.0. Expect incremental API cleanup as the first wave settles.
use-security: feature-gated umbrella crate for the full workspaceuse-cve: CVE identifier and vulnerability metadata primitivesuse-cwe: CWE weakness identifier and category primitivesuse-cvss: CVSS severity, vector, and score metadata primitivesuse-owasp: OWASP category and application-security taxonomy primitivesuse-security-risk: generic cybersecurity risk primitivesuse-threat: threat modeling and threat-category primitivesuse-security-finding: security finding and remediation metadata primitivesuse-authn: authentication metadata primitivesuse-authz: authorization, role, scope, claim, and permission metadata primitivesuse-secret: secret classification, masking, and secret-reference primitivesuse-crypto: cryptographic algorithm and key metadata labelsuse-security-header: web security header and browser-policy primitivesuse-sbom: software bill of materials and supply-chain metadata primitives
- Validated identifiers and labels such as CVE IDs, CWE IDs, CVSS scores, and security header names.
- Small enums and metadata models for risk, threats, findings, authentication, authorization, secrets, cryptographic labels, and supply-chain records.
- Lightweight helpers that are transparent, dependency-light, and suitable for application glue code, docs tooling, test fixtures, and CLIs.
- Security scanning, vulnerability database mirroring, advisory lookup, or registry access.
- Cryptographic operations, key generation, hashing, token generation, or certificate generation.
- Authentication servers, authorization engines, policy engines, WAFs, SIEMs, linters, compliance products, or SBOM generators.
- Complete standards implementations for CVSS, OWASP, CWE, CycloneDX, SPDX, CSP, or browser behavior.
[dependencies]
use-security = { version = "0.0.1", default-features = false, features = ["cve", "cwe", "cvss"] }use use_security::{CveId, CweId, CvssScore, severity_from_score};
let cve: CveId = "CVE-2024-12345".parse()?;
let cwe: CweId = "CWE-79".parse()?;
let score = CvssScore::new(9.8)?;
assert_eq!(cve.as_str(), "CVE-2024-12345");
assert_eq!(cwe.as_str(), "CWE-79");
assert_eq!(severity_from_score(score).as_str(), "critical");
# Ok::<(), Box<dyn std::error::Error>>(())Licensed under either of the following, at your option:
- Apache License, Version 2.0
- MIT license