| name | otm-validation-guidance |
| description | Detailed validation rules for OTM files. Use when validating trust zone IDs, component types, and filtering deprecated components. Critical for preventing import failures. |
OTM Validation Guidance
When to Use This Skill
Call this skill when you need detailed guidance on:
- Validating trust zone IDs from trust-zones.json
- Validating component types from components.json
- Filtering deprecated components
- Understanding validation requirements
This skill provides detailed validation instructions and examples.
Critical Validation Rules
Trust Zone IDs - Must Use UUIDs from trust-zones.json
ABSOLUTE RULE: EVERY trust zone ID MUST come from .iriusrisk/trust-zones.json
Process:
- Open
.iriusrisk/trust-zones.json (downloaded by sync())
- Search for the zone you need by reading
name field
- Copy the COMPLETE
id field value (UUID format)
- Use that exact UUID in your OTM
Example from trust-zones.json:
{
"id": "b61d6911-338d-46a8-9f39-8dcd24abfe91",
"referenceId": "public-cloud",
"name": "Public Cloud",
"risk": {"trustRating": 60}
}
In your OTM:
trustZones:
- id: "b61d6911-338d-46a8-9f39-8dcd24abfe91"
name: "Public Cloud"
risk: {trustRating: 60}
components:
- id: "my-service"
parent:
trustZone: "b61d6911-338d-46a8-9f39-8dcd24abfe91"
WRONG:
trustZones:
- id: "public-cloud"
- id: "internet-tz"
- id: "application"
Component Types - Must Use Complete referenceId from components.json
ABSOLUTE RULE: EVERY component type MUST be the COMPLETE referenceId from .iriusrisk/components.json
Process:
- Open
.iriusrisk/components.json (downloaded by sync())
- Search for keywords (e.g., "ECS", "database", "Flask")
- Filter out deprecated:
- Skip if
category.name == "Deprecated"
- Skip if
name starts with "Deprecated - "
- Find the matching ACTIVE component
- Copy the COMPLETE
referenceId field (do NOT abbreviate)
- Use that exact referenceId in your OTM
Example from components.json:
{
"name": "AWS ECS Cluster",
"referenceId": "CD-V2-AWS-ECS-CLUSTER",
"category": {"name": "Container Orchestration"}
}
In your OTM:
components:
- id: "my-cluster"
type: "CD-V2-AWS-ECS-CLUSTER"
WRONG:
components:
- id: "my-cluster"
type: "CD-AWS-ECS"
type: "ecs-cluster"
type: "CD-V2-ECS"
type: "CD-V2-AWS-ECS"
Filtering Deprecated Components
~40% of components are deprecated - you MUST filter them out:
for component in components:
if component['category']['name'] == 'Deprecated':
continue
if component['name'].startswith('Deprecated - '):
continue
referenceId = component['referenceId']
Example deprecated component:
{
"name": "Deprecated - Azure Web Apps",
"referenceId": "microsoft-azure-web-apps",
"category": {"name": "Deprecated"}
}
Use the active version instead:
{
"name": "Azure Web Apps",
"referenceId": "CD-V2-AZURE-WEB-APPS",
"category": {"name": "Microsoft Azure"}
}
Validation Checklist
Before creating OTM, verify:
Trust Zones:
- ☐ Opened trust-zones.json
- ☐ For EACH trust zone: Found exact UUID in file
- ☐ Copied complete
id field (not referenceId or name)
- ☐ Did NOT invent any trust zone IDs
Component Types:
- ☐ Opened components.json
- ☐ For EACH component: Searched for matching type
- ☐ Filtered out deprecated components
- ☐ Copied COMPLETE
referenceId (not abbreviated)
- ☐ Did NOT invent any component types
Structure:
- ☐ Every component has a parent (trustZone or component)
- ☐ Every dataflow source/destination exists in components list
- ☐ No dataflows use trust zone IDs (only component IDs)
Common Mistakes
Mistake 1: Using referenceId instead of id for trust zones
trustZone: "public-cloud"
trustZone: "b61d6911-338d-46a8-9f39-8dcd24abfe91"
Mistake 2: Abbreviating component types
type: "CD-AWS-ECS"
type: "CD-V2-AWS-ECS-CLUSTER"
Mistake 3: Using deprecated components
type: "microsoft-azure-web-apps"
type: "CD-V2-AZURE-WEB-APPS"
Mistake 4: Inventing IDs
trustZone: "internet-tz"
trustZone: "application-layer"
type: "flask-api"
type: "postgres-db"
trustZone: "f0ba7722-39b6-4c81-8290-a30a248bb8d9"
type: "CD-V2-PYTHON-FLASK"
type: "CD-V2-POSTGRESQL-DATABASE"
How to Search the Files
Trust zones - search by name:
grep -i "internet" .iriusrisk/trust-zones.json
Components - search by keywords:
grep -i "flask" .iriusrisk/components.json
Validation is Mandatory
The backend validates OTM files against JSON schema before import. But schema validation does NOT check:
- Whether trust zone UUIDs exist in trust-zones.json
- Whether component types exist in components.json
- Whether components are deprecated
You MUST do this validation yourself before creating the OTM.