Skip to main content

Architecture Decision Records

This directory contains Architecture Decision Records (ADRs) documenting significant technical decisions made during SecurityV0 development.

ADR Index

ADRTitleStatusDate
ADR-000Documentation StrategyAccepted2026-02
ADR-001MongoDB Only for MVPAccepted2026-01-22
ADR-002Single Entities CollectionAccepted2026-01-27
ADR-003Reject Apache AGEAccepted2026-02-02
ADR-004Import-by-Type Connector ArchitectureAccepted2026-02-10
ADR-005Platform-Only Finding GenerationAccepted2026-02-10
ADR-006Entity Type ReclassificationAccepted2026-02-13
ADR-007Execution Relationship TypesAccepted2026-02-13
ADR-008Execution Chains CollectionAccepted2026-02-13
ADR-009OAA Export Projection (Deferred)Proposed2026-02-13
ADR-010Workload Entity Type RenameAccepted2026-02-17
ADR-011ELK.js Graph Layout EngineAccepted2026-02-22
ADR-012User Authentication StrategyAccepted2026-03
ADR-013Container Registry (GHCR)Accepted2026-03
ADR-014AWS IAM Policy Entity Type — Introduce permission_setAccepted2026-03-11
ADR-015AWS Source System Tenancy SchemeAccepted2026-03-11
ADR-018Deploy-Server Security Posture Before Managed-Platform MigrationAccepted2026-04-20
ADR-020Multi-Region MongoDB Strategy via Per-Region ClustersAccepted2026-05-02
ADR-021Delegated-Agent Audit Log StorageProposed2026-05-04
ADR-024Azure Dev Deployment Lifecycle — Stable Demo + Ephemeral PR-Preview PoolProposed2026-05-14
ADR-026Chain Re-Materialization Triggers — Sync / Evaluation / DeployProposed2026-05-19
ADR-027Automated Connector Pipeline — credential broker, pipeline-run root, deploy-gateDraft2026-05-19
ADR-030CI Cost & Build-Architecture Strategy — amd64-on-PR, concurrency, path-gatingAccepted2026-05-22

ADR Format

Each ADR follows this structure:

  1. Status - Proposed, Accepted, Deprecated, Superseded
  2. Context - What prompted this decision
  3. Decision - What we decided
  4. Consequences - Positive, negative, and trade-offs
  5. When to Reconsider - Triggers for revisiting

Key Decisions Summary

Documentation

ADR-000: Documentation Strategy - Use Markdown + MkDocs + GitHub for private, AI-accessible documentation. mkdocs.yml nav serves as the authoritative manifest; @ai-metadata HTML comments provide token-efficient AI scanning.

Database Architecture

ADR-001: MongoDB Only for MVP - Use MongoDB as the single database for MVP. Graph queries handled via materialized execution paths and application-level traversal. Neo4j to be added later when scale requires it.

ADR-002: Single Entities Collection - Store all entity types (identity, automation, connection, credential, owner, role, permission, resource, execution_evidence) in a single entities collection with entity_type discriminator. Optimizes for security investigation query patterns.

ADR-003: Reject Apache AGE - Do not adopt Apache AGE (PostgreSQL graph extension) due to poor variable-length path performance at scale and lack of AWS managed service availability.

Connector Architecture

ADR-004: Import-by-Type Connector Architecture - Replace pre-linked ExecutionChain objects with flat DiscoveredEntities + EdgeResolver. Connectors discover entities independently and resolve cross-entity relationships in an explicit step.

ADR-005: Platform-Only Finding Generation - All detection/finding logic lives in the platform evaluator. Connectors are pure discovery + classification pipelines. Connector-side detectors (detectors.py) removed.

ADR-015: Python as Connector SDK Language - Python for all connectors in sv0-connectors. Superior API client coverage for enterprise systems (Entra ID, ServiceNow, Azure Foundry) and clean separation of concerns from the TypeScript platform.

Data Model

ADR-006: Entity Type Reclassification - Split autonomous_identity into 4 distinct types: identity (authenticates), automation (executes logic), connection (outbound config), credential (holds secrets). Reduces NHI count inflation 13-18x.

ADR-007: Execution Relationship Types - Add 4 new typed edges (CALLS, INVOKES, USES, AUTHENTICATES_AS) to model the execution chain across reclassified entity types. Deprecates AUTHENTICATES_VIA, narrows EXECUTES_ON.

ADR-008: Execution Chains Collection - New execution_chains MongoDB collection to persist automation chains as durable, listable entities. Chain identity anchored to entry point, composition fingerprint for change detection.

Export

ADR-009: OAA Export Projection (Deferred) - OAA is an export projection layer, not the internal data model. SecurityV0's model is a superset of OAA. Implementation deferred until customer need.

ADR-010: Workload Entity Type Rename - Rename entity_type: "automation" to "workload" to resolve naming collision with the broader "Automation Definition" product concept. Backward-compatible alias during migration.

UI / Visualization

ADR-011: ELK.js Graph Layout Engine - Replace Dagre with ELK.js for graph visualization. Dagre's single-column-per-rank limitation creates unusable layouts at 50+ nodes. ELK's layered algorithm with partitioning distributes same-rank nodes across sub-rows while preserving causal left-to-right ordering.

AWS Connector

ADR-014: AWS IAM Policy Entity Type - Introduce type="permission_set" as the 10th entity type to model AWS IAM Managed Policies, Permission Boundaries, and SCPs. Avoids semantic conflation with type="role" (Azure RBAC assignments, ServiceNow OAuth scopes). Requires materialiser changes before AWS connector Phase 1 ships.

ADR-015: AWS Source System Tenancy Scheme - Use aws_{service}:{account_id} (e.g., aws_lambda:123456789012) as the source_system for all AWS entities. Enables entity uniqueness across multi-account environments, structural cross-account path detection, and per-account rescan scheduling.

Deployment & Security

ADR-018: Deploy-Server Security Posture Before Managed-Platform Migration - Accept audit #392 docker-group risk on Hetzner VPS hosts as a time-limited, explicitly recorded tradeoff. Reverts the brittle sudoers-allowlist mitigation (sv0-platform PR #401) that kept breaking deploys and required human root SSH to repair. Defers structural fix to the upcoming managed-platform migration (ECS / ACI / equivalent).

Detailed analysis behind these decisions is archived in session-notes/ (not published in docs):

  • 2026-01-22-mongodb-vs-neo4j-tradeoffs.md
  • 2026-01-27-collection-architecture-decision.md
  • 2026-02-02-apache-age-evaluation.md