| Crates.io | riskcalc |
| lib.rs | riskcalc |
| version | 0.1.0 |
| created_at | 2025-05-08 00:51:48.480085+00 |
| updated_at | 2025-05-08 00:51:48.480085+00 |
| description | A library for risk analysis and Monte Carlo simulation |
| homepage | https://schwaberow.de |
| repository | https://github.com/vschwaberow/riskcalc |
| max_upload_size | |
| id | 1664720 |
| size | 164,299 |
A modular and extensible Rust library for information security risk analysis, inspired by real-world CISO experience. It provides structures and traits for defining risk components and performing qualitative, quantitative, and FAIR-based analysis.
QualitativePolicy.QualitativePolicy to customize risk matrix logic and specify how control effectiveness levels reduce likelihood/impact.RiskAnalyzer, ControlEffectivenessCalculator, RiskCalculator, CvssProvider) to implement custom logic and integrate alternative calculation methods.rust_decimal for currency) to enhance correctness and prevent errors.thiserror for clear and manageable error reporting.Add riskcalc to your Cargo.toml:
[dependencies]
riskcalc = { git = "https://github.com/vschwaberow/riskcalc.git" } # Or path = "path/to/riskcalc" for local dev
rust_decimal = "1.35" # Ensure compatible version
rust_decimal_macros = "1.35"
Runnable examples demonstrating the different analysis types are available in the examples/ directory.
You can run them using Cargo:
# Run the qualitative analysis example
cargo run --example qualitative_analysis
# Run the quantitative (ALE) analysis example
cargo run --example quantitative_analysis
# Run the FAIR analysis example
cargo run --example fair_analysis
(Note: The FAIR example uses Monte Carlo simulation and may take a few seconds to run depending on the number of iterations configured.)
Contributions are welcome! Please open an issue or submit a pull request.
This project is licensed under the MIT License - see the LICENSE file for details.