Human Risk Graph (HRG)
Human Risk Graph (HRG) is a quantitative model for measuring organizational security risk caused by human dependencies, decision concentration, and bus-factor effects.
Unlike traditional security models that focus only on technical assets, HRG treats people as part of the attack surface and models how organizational decisions and emergency processes introduce systemic risk.
Core Idea
Organizations often depend on a small number of individuals for:
- critical decisions,
- emergency bypasses,
- access approvals.
HRG represents these dependencies as a directed graph and computes risk metrics that highlight human single points of failure.
What HRG Measures
- Bus Factor Risk — how fragile the organization is to the loss of key people
- Decision Concentration — how much authority is centralized
- Bypass Risk — how often normal controls are overridden by humans
Repository Structure
src/human_risk_graph/— core implementation (HRG class, metrics, graph algorithms)tests/— comprehensive unit testsexperiments/— synthetic data generation and benchmarkingexamples/— usage demonstrationspaper/— LaTeX source of the paperdocs/— formal model with mathematical definitionsdata/— example organization datasets
Quick Start
Installation
# Install from PyPI (recommended)
pip install human-risk-graph
# Or install from source
git clone https://github.com/LF3551/human-risk-graph.git
cd human-risk-graph
pip install -e .
# With development tools
pip install -e ".[dev]"
Data Format
Create a JSON file describing your organization structure:
{
"people": [
{ "id": "A", "role": "SRE", "criticality": 0.9 },
{ "id": "B", "role": "Security Engineer", "criticality": 0.8 },
{ "id": "C", "role": "Manager", "criticality": 0.7 },
{ "id": "D", "role": "Developer", "criticality": 0.4 }
],
"dependencies": [
{ "from": "A", "to": "B", "type": "approval", "weight": 0.8 },
{ "from": "C", "to": "A", "type": "bypass", "weight": 0.9 }
]
}
Fields:
people.id— unique identifierpeople.role— job title (optional)people.criticality— importance level (0.0-1.0)dependencies.from/to— person IDsdependencies.type— relationship type (approval, bypass, etc.)dependencies.weight— dependency strength (0.0-1.0)
Invalid input (duplicate or unknown IDs, values outside 0.0-1.0) is rejected with an error that points to the offending entry.
CLI Usage
The easiest way to use HRG is through the command-line interface:
# Analyze an organization (generates JSON, Markdown, and HTML reports)
hrg analyze data/example_organization.json
# Generate only HTML report
hrg analyze data/example_organization.json --format html
# Specify output file
hrg analyze data/example_organization.json --format html --output my_report.html
# Generate interactive graph visualization only
hrg visualize data/example_organization.json
Example Output
🔍 Analyzing: data/example_organization.json
⚙️ Running Human Risk Graph analysis...
✅ Generated: data/example_organization_report.json
✅ Generated: data/example_organization_report.md
✅ Generated: data/example_organization_report.html
✅ Generated: data/example_organization_graph.html
============================================================
📊 ANALYSIS SUMMARY
============================================================
Composite HRG Score: 0.269
• Bus Factor Score: 0.113
• Decision Concentration: 0.351
• Bypass Risk Score: 0.394
⚠️ Critical People (Articulation Points): 2
- Ines Silva (Product Security Engineer)
- Johan Lindberg (DevOps Engineer)
✅ Analysis complete! Generated 4 file(s).
Generated files:
- JSON report with detailed metrics
- Interactive HTML graph visualization
- Optional Markdown and HTML reports
Python API Usage
from human_risk_graph import HumanRiskGraph
# Load your organization data
people = [...]
dependencies = [...]
# Create and analyze
hrg = HumanRiskGraph(people, dependencies)
results = hrg.calculate()
print(f"Composite Risk Score: {results['composite_score']:.3f}")
print(f"Critical People: {results['critical_people']}")
Development
# Run tests
pytest tests/ -v
# Run tests with coverage
pytest tests/ --cov=human_risk_graph --cov-report=html
# Code formatting
black src/ tests/ --line-length 100
# Linting
flake8 src/ tests/
# Run experiments
python experiments/generate_data.py
python experiments/run_experiments.py
python experiments/visualize.py
Key Features
- Graph-based analysis using NetworkX
- Three core metrics: Bus Factor, Decision Concentration, Bypass Risk
- Polynomial-time algorithms with proven complexity bounds
- Comprehensive test coverage
- Research paper published on Zenodo (10.5281/zenodo.20260930)
Use Cases
Best suited for: Organizations with 50+ employees, formal security processes, or compliance requirements.
- Security architecture analysis
- Business continuity planning (SOC2, ISO27001 audits)
- Insider threat assessment
- M&A due diligence (key person risk)
- Organizational risk modeling
Note: For small teams (<20 people), managers typically have direct visibility into dependencies. HRG provides the most value when organizational complexity exceeds intuitive understanding.
Status
HRG is in beta (0.x): the metrics and the input format may still change between minor releases. Scores support risk discussions and audits; they do not replace a full risk assessment.
Citation
If you use this software in your research or work, please cite:
@software{aleinikov_2026_hrg,
author = {Aleinikov, Aleksei},
title = {Human Risk Graph: A Quantitative Model for Organizational Security Risk},
year = 2026,
publisher = {Zenodo},
doi = {10.5281/zenodo.18288055},
url = {https://doi.org/10.5281/zenodo.18288055}
}
Or use this text citation:
Aleinikov, A. (2026). Human Risk Graph: A Quantitative Model for Organizational Security Risk. Zenodo. https://doi.org/10.5281/zenodo.18288055
The DOI above always resolves to the latest release; each release also gets its own version DOI on Zenodo.
To cite the model itself, use the paper:
@article{aleinikov_2026_hrg_paper,
author = {Aleinikov, Aleksei},
title = {Human Risk Graph: A Quantitative Model for Organizational Security Risk},
year = 2026,
publisher = {Zenodo},
doi = {10.5281/zenodo.20260930},
url = {https://doi.org/10.5281/zenodo.20260930}
}
License
Licensed under the Apache License, Version 2.0. See the LICENSE file for details.
Metadata
Release files for human-risk-graph 0.3.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| human_risk_graph-0.3.1.tar.gz | 35.2 kB | With provenance | Details for human_risk_graph-0.3.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| human_risk_graph-0.3.1-py3-none-any.whl | Python 3 | none | any | Details for human_risk_graph-0.3.1-py3-none-any.whl |
Total release size: 64.0 kB
Release files / human_risk_graph-0.3.1.tar.gz
| Download URL | human_risk_graph-0.3.1.tar.gz |
|---|---|
| Size | 35.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
882c30f49792f016a246357847da40058832c8643eb2f62f1a674648e35bcdb4
|
|
BLAKE2b-256 checksum How to use checksums |
360a6fa2c70b5ff7307668651e8d70fd4137fba670340f6835a41d9ee91e9c25
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 12, 2026.
Transparency logRelease files / human_risk_graph-0.3.1-py3-none-any.whl
| Download URL | human_risk_graph-0.3.1-py3-none-any.whl |
|---|---|
| Size | 28.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
0c1fa074d55995545460b14b0e9b8c0540115b2294d12388dab40652c9b6011f
|
|
BLAKE2b-256 checksum How to use checksums |
06d6a60fda250ad389f41efc9ebfc8957d1a44be16f050cf5ff1d83c838482b7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 12, 2026.
Transparency logSecurity for human-risk-graph 0.3.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for human_risk_graph-0.3.1.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 12, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.