Cyber Risk Modeling Language (CRML) tools and validator
Project description
CRML — Cyber Risk Modeling Language
Version: 1.1
Maintained by: Zeron Research Labs
CRML is an open, declarative, implementation-agnostic language for expressing cyber risk models, telemetry mappings, simulation pipelines, dependencies, and output requirements.
CRML is designed for:
- Bayesian cyber risk models (QBER, MCMC-based)
- FAIR-style Monte Carlo engines
- Insurance actuarial risk systems
- Enterprise cyber risk quantification platforms
- Regulatory or audit-ready risk engines
✨ Key Features
- 🛡️ Control Effectiveness Modeling - Quantify how security controls reduce risk with defense-in-depth calculations
- 📊 Intuitive Median-Based Parameterization - Use
mediandirectly instead of log-spacemufor lognormal distributions - 💱 Multi-Currency Support - Model risks across different currencies with automatic conversion (15+ currencies supported)
- 🔄 Auto-Calibration - Provide raw loss data and let CRML calibrate distributions automatically
- ✅ Strict Validation - JSON Schema validation catches errors before simulation
- 🎯 Implementation-Agnostic - Works with any compliant simulation engine
- 📝 Human-Readable YAML - Models are easy to read, review, and audit
📦 Installation
Install CRML from PyPI:
pip install crml-lang
🚀 Quick Start
Validate a CRML File
crml validate path/to/your/model.yaml
Example
crml validate spec/examples/qber-enterprise.yaml
Output:
[OK] spec/examples/qber-enterprise.yaml is a valid CRML 1.1 document.
Model Security Controls
New in CRML 1.1: Quantify how security controls reduce cyber risk.
model:
frequency:
model: poisson
parameters:
lambda: 0.15 # 15% baseline probability
controls:
layers:
- name: "email_security"
controls:
- id: "email_filtering"
type: "preventive"
effectiveness: 0.90 # Blocks 90% of attacks
coverage: 1.0
reliability: 0.95
- name: "endpoint_protection"
controls:
- id: "edr"
type: "detective"
effectiveness: 0.80
coverage: 0.98
severity:
model: lognormal
parameters:
median: "700 000"
currency: USD
sigma: 1.8
Result: Risk reduced from 15% to ~3.5% (76% reduction!)
See docs/controls-guide.md for detailed guidance.
📁 Repository Layout
spec/— CRML specification and example modelssrc/crml/— Python package source code (validator, CLI)src/crml/schemaCRML json schematools/— Legacy validator and CLI utilitiesdocs/— Documentation, roadmap, and diagrams
🛠️ Development
Install from Source
git clone https://github.com/Faux16/crml.git
cd crml
pip install -e .
Run Validator Directly
python tools/validator/crml_validator.py spec/examples/qber-enterprise.yaml
📖 Documentation
For detailed documentation, examples, and the full specification, visit the docs/ directory or check out the specification.
🤝 Contributing
Contributions are welcome! Please feel free to submit issues or pull requests.
📄 License
MIT License — see LICENSE for details.
🔗 Links
- PyPI Package: https://pypi.org/project/crml-lang/
- GitHub Repository: https://github.com/Faux16/crml
- Specification: CRML 1.1
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file crml_lang-1.1.0.tar.gz.
File metadata
- Download URL: crml_lang-1.1.0.tar.gz
- Upload date:
- Size: 30.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.8.0 pkginfo/1.12.1.2 readme-renderer/44.0 requests/2.32.5 requests-toolbelt/1.0.0 urllib3/1.26.19 tqdm/4.67.1 importlib-metadata/8.0.0 keyring/25.7.0 rfc3986/2.0.0 colorama/0.4.6 CPython/3.9.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d23b15144c2d6cfddd29c6ccc040e778ee0b59b160b91292fdb1122a7e40a9c6
|
|
| MD5 |
60d682de47dae44399cbe173f5958607
|
|
| BLAKE2b-256 |
0013c45ac63fe568e2de393a5290d13f017a933485e5edba77c3fcc12bad9f71
|
File details
Details for the file crml_lang-1.1.0-py3-none-any.whl.
File metadata
- Download URL: crml_lang-1.1.0-py3-none-any.whl
- Upload date:
- Size: 26.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.8.0 pkginfo/1.12.1.2 readme-renderer/44.0 requests/2.32.5 requests-toolbelt/1.0.0 urllib3/1.26.19 tqdm/4.67.1 importlib-metadata/8.0.0 keyring/25.7.0 rfc3986/2.0.0 colorama/0.4.6 CPython/3.9.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
16bb902b000c1a4a3d6fc6211f51de9b5aa4360c735ab3c66b3bf3413e379a06
|
|
| MD5 |
479188d6efd4e74e972b775fea6cbdb1
|
|
| BLAKE2b-256 |
ace6c01b817198d57733e08694bd2b4969a12563483f165a30fa6f4b113f423a
|