Overview
This guide provides comprehensive sample data for testing Risk Legion end-to-end. All data structures align with the current implementation and can be used for API testing, demonstrations, and development.For a complete demo scenario using Brazilian banking context, see the DEMO_DATA_INPUT_GUIDE.md in the repository.
Key Data Model Notes
Products no longer have Category field
Products no longer have Category field
Products are now defined by their attributes only: customer types, geographic operations, distribution channels, and transaction types. The category field has been removed.
Sub-Controls: Creation vs Assessment
Sub-Controls: Creation vs Assessment
Sub-Controls are created in Governance with only name and description. The ToD/ToE effectiveness ratings are assessed separately in Control Assurance. This separates control definition from control assessment.
Risk Appetite Snapshot
Risk Appetite Snapshot
When a BRA transitions to
in_progress, the current risk appetite level is captured as snapshot_appetite_level. This ensures changes to enterprise risk appetite don’t affect assessments already in progress.Quick Start
1. Create Test Users
Use the provided script to create test users with different roles:2. Get JWT Tokens
Retrieve JWT tokens for API testing:Sample Enterprises
Sample Organization Structure
Legal Entities
Business Units
Products
Products no longer have a
category field. Instead, they are defined by their attributes: customer types, geographic operations, distribution channels, and transaction types.Valid Enum Values for Products
| Field | Valid Values |
|---|---|
| customer_types | Financial Institution, Fintech, High-Net-Worth Individual, Large Corporate, Merchant, Public Sector Entity, Retail Customer, Small & Medium Enterprise, Sole Proprietor |
| geographic_operations | Americas, Asia–Pacific, Europe, Middle East & North Africa, Sub-Saharan Africa (or specific countries) |
| distribution_channels | API / Embedded Integration, Broker / Intermediary, Call Center / Assisted, In-Branch / Physical Office, Mobile App, Online / Web Platform, Partner Platform / Marketplace, Third-Party Sales Agent |
| transaction_types | Card Payments (POS), Card-Not-Present (E-Commerce), Cash Deposits, Cash Withdrawals, Direct Debits / Standing Orders, Domestic Payments, Internal Transfers (A2A), International / Cross-Border Payments, Investment Transactions, Loan Disbursements, Loan Repayments, Merchant Settlements, Mortgage Disbursements, Refunds / Chargebacks |
Sample Risk Library
Risk Scenarios
Risk Scenarios support multiple risk groups and categories (stored as comma-separated values or arrays). Use the valid enum values below.
Valid Enum Values for Risk Scenarios
| Field | Valid Values |
|---|---|
| risk_group | Customer Risk, Delivery Channel Risk, Employee Risk, Geographic Risk, Governance & Control Risk, Operational Risk, Product & Service Risk, Technology & Cyber Risk, Third-Party / Outsourcing Risk, Transactional Risk |
| category | Bribery & Corruption, Cybercrime, Fraud, Misconduct / Insider Risk, Money Laundering, Proliferation Financing, Sanctions Risk, Tax Crime / Tax Evasion, Terrorist Financing |
Key Controls
Sub-Controls
Sub-Controls are created in Governance with only name and description. The ToD/ToE ratings are assessed separately in Control Assurance after the sub-control is created. This separates the control definition from the control assessment workflow.
Step 1: Create Sub-Controls (Governance)
Step 2: Assess Sub-Controls (Control Assurance)
Risk Triggers
Sample Business Risk Assessment
Create BRA
When a BRA transitions from
draft to in_progress, the system captures the current risk appetite level as snapshot_appetite_level. This ensures that changes to the enterprise’s risk appetite don’t affect assessments already in progress.BRA Status Workflow
| Status | Description | Risk Appetite |
|---|---|---|
draft | Initial creation, not started | Uses current enterprise appetite |
in_progress | Assessment underway | Uses snapshot_appetite_level (frozen) |
pending_review | Submitted for review | Uses snapshot_appetite_level |
approved | Reviewed and approved | Uses snapshot_appetite_level |
rejected | Returned for revisions | Uses snapshot_appetite_level |
Add Risk Scenarios to BRA
Create Risk Ratings
Sample Risk Appetite
Risk Appetite is configured at the enterprise level. When a BRA is created and transitions to
in_progress, the current appetite level is captured as snapshot_appetite_level on the BRA. This ensures that subsequent changes to the enterprise’s risk appetite don’t affect assessments already in progress.Risk Appetite Snapshot Behavior
| Scenario | Behavior |
|---|---|
| Enterprise changes appetite from Medium → High | Existing in_progress BRAs keep their snapshot_appetite_level (Medium) |
| New BRA created | Captures current enterprise appetite as snapshot_appetite_level |
BRA in draft status | Uses current enterprise appetite (not yet snapshotted) |
BRA transitions to in_progress | snapshot_appetite_level is captured and frozen |
Sample Mitigation Actions
API Testing Examples
Create BRA via API
Add Risk Scenario via API
Create Risk Rating via API
Create Product via API
Update Control Effectiveness via API (Control Assurance)
Create Sub-Control via API (Governance)
Approve BRA via API
Verification Queries
Check Data Counts
Check BRA Status
Check Control Effectiveness
Data Model Reference
ToD Rating Scale
| Grade | Meaning |
|---|---|
| A | Excellent - Comprehensive design |
| B | Good - Well-structured with minor gaps |
| C | Adequate - Meets minimum requirements |
| D | Weak - Significant gaps |
| E | Inadequate - Fundamentally flawed |
ToE Rating Scale
| Grade | Meaning |
|---|---|
| 1 | Highly Effective (95%+) |
| 2 | Effective (85-95%) |
| 3 | Moderately Effective (70-85%) |
| 4 | Less Effective (50-70%) |
| 5 | Ineffective (<50%) |
Risk Matrix
Risk level is determined by the combination of Impact and Likelihood using the following 5×5 matrix:| Impact ↓ / Likelihood → | A (Rare) | B (Unlikely) | C (Possible) | D (Likely) | E (Frequent) |
|---|---|---|---|---|---|
| 5 - Severe | Medium | High | Very High | Very High | Very High |
| 4 - High | Medium | High | High | Very High | Very High |
| 3 - Moderate | Low | Medium | High | High | Very High |
| 2 - Minor | Low | Low | Medium | High | High |
| 1 - Negligible | Low | Low | Low | Medium | Medium |
Risk Level Colors
| Level | Color | Meaning |
|---|---|---|
| Low | Green | Acceptable risk, monitor only |
| Medium | Yellow | Requires attention, consider mitigation |
| High | Orange | Significant risk, mitigation required |
| Very High | Red | Critical risk, immediate action required |