Expand description
§use-security
Feature-gated facade crate for RustUse security primitives.
§Experimental
use-security is experimental while the use-security workspace remains below 0.3.0. Expect small API adjustments during the first release wave.
§Example
[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.to_string(), "CWE-79");
assert_eq!(severity_from_score(score).as_str(), "critical");§Feature Flags
cve: re-exportuse-cvecwe: re-exportuse-cwecvss: re-exportuse-cvssowasp: re-exportuse-owasprisk: re-exportuse-security-riskthreat: re-exportuse-threatfinding: re-exportuse-security-findingauthn: re-exportuse-authnauthz: re-exportuse-authzsecret: re-exportuse-secretcrypto: re-exportuse-cryptosecurity-header: re-exportuse-security-headersbom: re-exportuse-sbomfull: enable all child crates
§Scope
- Facade imports and namespace aliases for focused
use-securitychild crates. - Small primitive metadata APIs for security-related identifiers, labels, and validation helpers.
§Non-goals
- Implementation logic beyond re-exports.
- Security scanning, authentication, authorization, encryption, SBOM generation, or policy enforcement.
§License
Licensed under either of the following, at your option:
- Apache License, Version 2.0
- MIT license