# CodexDominion — Platform Security Report

> This is a platform-security posture for DEMO and PILOT evaluation. It does not certify production security — production requires verified session identity, a persistent database, tenant isolation, backups, and managed secrets.

## Platform
- Platform: CodexDominion Command Console
- Environment: production
- Generated by: Security Control Plane (deterministic, no external calls)

## Security Score
- Score: 0 / 100
- Overall status: BLOCKED
- Demo-secure: no
- Pilot-secure: no
- Production: BLOCKED

## Critical Risks
- [CRITICAL] Identity & session verification — Identity is an unsigned mock/pilot actor — not a verified session.
- [HIGH] Tenant isolation — Per-tenant data isolation is not yet verified.
- [HIGH] Secrets management — Production secrets are not configured.
- [HIGH] Persistent database — No persistent database — running on in-memory / seed data.
- [HIGH] Backups & recovery — Backups and recovery are not verified.

## Warnings
- API security (validation & rate limiting) — Inputs are validated, but rate limiting is not yet enabled.

## Policy Results
- [FAIL] Verified identity required (BLOCKED) — VIOLATION: Actions must be attributable to a verified, signed session.
- [PASS] No pilot fallback in production (SECURE) — The pilot actor fallback must be disabled in production.
- [PASS] RBAC required (SECURE) — Every protected action must be permission-gated.
- [PASS] Audit required (SECURE) — Governed actions must be recorded in a verifiable audit trail.
- [FAIL] Tenant isolation required (BLOCKED) — VIOLATION: Tenants must not be able to access each other's data.
- [FAIL] Persistent database required (BLOCKED) — VIOLATION: Customer data requires a persistent, access-controlled store.
- [FAIL] Backups required (BLOCKED) — VIOLATION: Backups and a tested recovery path are required.
- [FAIL] Secrets configured (BLOCKED) — VIOLATION: Production secrets must be sourced from the environment / a vault.
- [PASS] No hardcoded secrets (SECURE) — Secrets must never be committed to code.
- [PASS] Proof packet export gated (SECURE) — Evidence export requires explicit authorization.
- [PASS] Approval gated (SECURE) — Approvals require the APPROVE_DECISION permission.
- [PASS] AI never finalizes decisions (SECURE) — AI is advisory-only; a human always finalizes.
- [PASS] Research manually reviewed (SECURE) — Research sources must be human-reviewed, never auto-ingested.
- [PASS] Truth Engine required (SECURE) — Claims must be confidence-scored before they reach a proof packet.
- [PASS] Human approval required (SECURE) — A human must approve before any decision is finalized.

## Threat Model
- Broken Access Control [ACCESS_CONTROL] likelihood=POSSIBLE impact=CRITICAL severity=HIGH status=SECURE (mitigated) — RBAC guard gates every protected action; deny-by-default.
- Privilege Escalation [ACCESS_CONTROL] likelihood=UNLIKELY impact=CRITICAL severity=HIGH status=AT_RISK (OPEN) — Permissions derive from role matrix; no client-controlled role elevation.
- Prompt Injection [AI_SECURITY] likelihood=LIKELY impact=HIGH severity=HIGH status=SECURE (mitigated) — AI is advisory-only; human approval required; inputs constrained.
- Malicious Research [RESEARCH_SECURITY] likelihood=POSSIBLE impact=HIGH severity=HIGH status=SECURE (mitigated) — Research is manually captured and reviewed — no autonomous crawling.
- Document Poisoning [DOCUMENT_SECURITY] likelihood=POSSIBLE impact=HIGH severity=HIGH status=SECURE (mitigated) — Veritaxis verifies documents before they influence decisions.
- Fake Citations [RESEARCH_SECURITY] likelihood=POSSIBLE impact=MEDIUM severity=MEDIUM status=SECURE (mitigated) — Truth Engine confidence-scores claims; proof packets require verified citations.
- Unauthorized Export [EXPORT_SECURITY] likelihood=POSSIBLE impact=HIGH severity=HIGH status=SECURE (mitigated) — Export requires EXPORT_PROOF_PACKET and a resolved identity.
- Tenant Leakage [TENANT_ISOLATION] likelihood=POSSIBLE impact=CRITICAL severity=HIGH status=AT_RISK (OPEN) — Per-tenant isolation enforced at the data layer.
- Database Exposure [DATABASE] likelihood=UNLIKELY impact=CRITICAL severity=HIGH status=AT_RISK (OPEN) — Persistent DB with least-privilege access; no public exposure.
- API Abuse [API_SECURITY] likelihood=LIKELY impact=MEDIUM severity=MEDIUM status=WARNING (OPEN) — Input validation on every route; rate limiting (planned).
- Credential Theft [SECRETS] likelihood=POSSIBLE impact=CRITICAL severity=HIGH status=AT_RISK (OPEN) — Verified sessions; no hardcoded secrets; secrets from environment.
- Secret Leakage [SECRETS] likelihood=POSSIBLE impact=CRITICAL severity=HIGH status=SECURE (mitigated) — No secrets in code or surfaced to clients; environment-sourced only.
- Replay Attack [IDENTITY] likelihood=UNLIKELY impact=HIGH severity=MEDIUM status=WARNING (OPEN) — Verified, signed sessions with expiry (Phase 5).
- Supply Chain Attack [DEPENDENCIES] likelihood=POSSIBLE impact=HIGH severity=HIGH status=SECURE (mitigated) — Dependencies pinned/locked; no known-vulnerable packages.
- Dependency Attack [DEPENDENCIES] likelihood=POSSIBLE impact=HIGH severity=HIGH status=SECURE (mitigated) — Lockfile integrity; patched dependencies.
- Audit Tampering [AUDIT] likelihood=UNLIKELY impact=HIGH severity=MEDIUM status=SECURE (mitigated) — Hash-chained, tamper-evident audit events with integrity verification.
- Model Hallucination [AI_SECURITY] likelihood=LIKELY impact=MEDIUM severity=MEDIUM status=SECURE (mitigated) — Truth Engine scoring + human approval; AI never finalizes.
- Unauthorized AI Action [AI_SECURITY] likelihood=POSSIBLE impact=CRITICAL severity=HIGH status=SECURE (mitigated) — AI is advisory-only; every consequential action needs human approval.
- Insider Threat [AUDIT] likelihood=UNLIKELY impact=HIGH severity=MEDIUM status=SECURE (mitigated) — Least-privilege RBAC + immutable audit trail attributes every action.
- Denial of Service [API_SECURITY] likelihood=POSSIBLE impact=MEDIUM severity=MEDIUM status=WARNING (OPEN) — Rate limiting + upstream protections (planned).
- Configuration Drift [CONFIGURATION] likelihood=POSSIBLE impact=MEDIUM severity=MEDIUM status=SECURE (mitigated) — Pinned configuration with drift detection.

## Route Protection Review
| Route | Method | Permission | Identity | Audit | Rate Limited | Prod-Ready | Risk |
| --- | --- | --- | --- | --- | --- | --- | --- |
| /api/financial-governance/proof-packet/export | GET | EXPORT_PROOF_PACKET | yes | yes | no | no | WARNING |
| /api/financial-governance/decision-record/approve | POST | APPROVE_DECISION | yes | yes | no | no | WARNING |
| /api/security/report | GET | — | no | no | no | yes | SECURE |

## Production Blockers
- [IDENTITY] Identity & session verification
- [TENANT_ISOLATION] Tenant isolation
- [SECRETS] Secrets management
- [DATABASE] Persistent database
- [BACKUPS] Backups & recovery

## Recommended Actions
- [IDENTITY] Integrate a verified session provider (Phase 5) before production.
- [TENANT_ISOLATION] Verify row-level / tenant scoping before storing multi-tenant data.
- [SECRETS] Configure secrets via the environment / a secrets manager before production.
- [DATABASE] Configure a persistent (non-SQLite-file) DATABASE_URL with least-privilege access.
- [BACKUPS] Configure automated backups and verify recovery before production.
- Policy 'Verified identity required': VIOLATION: Actions must be attributable to a verified, signed session.
- Policy 'Tenant isolation required': VIOLATION: Tenants must not be able to access each other's data.
- Policy 'Persistent database required': VIOLATION: Customer data requires a persistent, access-controlled store.
- Policy 'Backups required': VIOLATION: Backups and a tested recovery path are required.
- Policy 'Secrets configured': VIOLATION: Production secrets must be sourced from the environment / a vault.
