โ ๏ธRisk Register
Known risks, their impact, evidence, and mitigations. Updated as new risks are discovered and existing ones are resolved.
๐
10
Total Risks
๐ด
4
Active
๐ก
4
Mitigated
๐ฃ
2
Accepted
โ ๏ธ
7
Critical+High
โ ๏ธ Priority Risks (Active / Critical)
๐ฆ
Docker build context too large (794 MB) causes deploy timeouts
๐ด CriticalMitigateddeploymentR-001
Description: fly deploy uploads the entire build context (794 MB across 46,340 files) to the remote builder on every deploy. The largest paths are node_modules/ (510 MB), .next/ (233 MB), and .mimocode/ (51 MB). This causes the build to exceed the 10-minute timeout and fail with 'context deadline exceeded' / 'failed to solve: Canceled'.
Impact: Deploys to fly.io fail or time out. The app cannot reach production. Every retry re-uploads the full context, wasting bandwidth and builder time.
Evidence:
WARN Build context is 794 MB across 46,340 files... error releasing builder: deadline_exceeded: context deadline exceeded... Error: failed to fetch an image or build from source: error building: failed to solve: Canceled: context canceled
Mitigation: Added .dockerignore excluding node_modules/, .next/, .mimocode/, .git/, and docs. Build context drops from 794 MB to ~5 MB. Dockerfile reinstalls deps and rebuilds Next.js inside the container from source only.
๐ค rifaterdemsahin๐
2026-10-24
๐
Cosmos DB free tier may not be available on the subscription
๐ก MediumActivecostR-003
Description: Azure Cosmos DB free tier (1,000 RU/s + 25 GB) is limited to one account per subscription. If the subscription already has a free-tier account, a serverless account must be used instead.
Impact: Serverless Cosmos costs ~$0.25/million RU + $0.25/GB/month. Small additional cost but breaks the 'zero fixed monthly' goal if provisioned throughput is accidentally created (~$23/month minimum).
Mitigation: If free tier unavailable, create serverless account (no fixed fee). Fixed-cost guard on the Costs page detects paid provisioned accounts and raises a red banner + task. Azure budget alert at $5/month.
๐ค rifaterdemsahin๐
2026-10-24
๐
Fly.io Machine has no stable egress IP
๐ก MediumActivesecurityR-004
Description: Fly Machines do not have a stable egress IP by default. IP allow-listing on Cosmos DB and other Azure services is not possible without allocating a static egress IP.
Impact: Cannot restrict Cosmos DB access by IP. Must rely on TLS + Entra ID/key auth only.
Mitigation: Protect Cosmos with TLS + Entra ID RBAC (or key auth as fallback). Optionally allocate a Fly static egress IP if IP allow-listing is required. Never expose Cosmos keys outside Key Vault.
๐ค rifaterdemsahin๐
2026-10-24
๐พ
Google Drive OAuth refresh token may expire or be revoked
๐ HighActivedataR-005
Description: If the Google OAuth app is in 'Testing' mode, refresh tokens expire after 7 days. The backup system depends on a valid refresh token for info@pexabo.com.
Impact: Nightly backups silently fail. Data loss risk if the primary database is compromised.
Mitigation: Set the OAuth app to Internal (Google Workspace) so refresh tokens don't expire. Failed backups raise a system notification + task. Optional Azure Blob second copy. Weekly test restore verifies backup integrity.
๐ค rifaterdemsahin๐
2026-10-24
๐
API token compromise
๐ด CriticalMitigatedsecurityR-007
Description: If an API token is leaked (in logs, browser history, or third-party scripts), an attacker gains read/write access to the workspace.
Impact: Unauthorized data access, modification, or deletion. Activity log shows api_token actor but damage may already be done.
Mitigation: Tokens stored as HMAC-SHA256 hashes with pepper from Key Vault. Shown once at creation. Scoped (read/write per-resource). Revocable with immediate effect. Rate-limited per token. IP allow-lists available. Token management is Blocked to the agent. Review 'last used' monthly.
๐ค rifaterdemsahin๐
2026-10-24
๐ง
In-memory stores lost on redeploy
๐ด CriticalActivedataR-010
Description: Current implementation uses in-memory Maps for tasks, spaces, goals, chat history, and API tokens. These are wiped on every redeploy or Machine restart.
Impact: All user data, chat history, and API tokens are lost on redeploy. Not production-ready.
Mitigation: TODO: Wire repositories to Cosmos DB (lib/db/repo/* is ready). Set DB_MODE=cosmos and configure connection string. Add seed-on-first-boot if needed. This is the highest-priority production blocker.
๐ค rifaterdemsahin๐
2026-10-24
๐ Full Risk Register
๐ฆ
Docker build context too large (794 MB) causes deploy timeouts
๐ด CriticalMitigateddeploymentR-001
Description: fly deploy uploads the entire build context (794 MB across 46,340 files) to the remote builder on every deploy. The largest paths are node_modules/ (510 MB), .next/ (233 MB), and .mimocode/ (51 MB). This causes the build to exceed the 10-minute timeout and fail with 'context deadline exceeded' / 'failed to solve: Canceled'.
Impact: Deploys to fly.io fail or time out. The app cannot reach production. Every retry re-uploads the full context, wasting bandwidth and builder time.
Evidence:
WARN Build context is 794 MB across 46,340 files... error releasing builder: deadline_exceeded: context deadline exceeded... Error: failed to fetch an image or build from source: error building: failed to solve: Canceled: context canceled
Mitigation: Added .dockerignore excluding node_modules/, .next/, .mimocode/, .git/, and docs. Build context drops from 794 MB to ~5 MB. Dockerfile reinstalls deps and rebuilds Next.js inside the container from source only.
๐ค rifaterdemsahin๐
2026-10-24
๐ค
MiMo Token Plan key restricted to interactive use
๐ HighAcceptedcomplianceR-002
Description: Xiaomi MiMo's Token Plan terms limit the key to interactive use with AI coding/agent tools. Using it for automated scripts or application backends may result in subscription suspension or key revocation.
Impact: The app's background agent jobs (scheduled tasks, change-feed hooks, data-source syncs) would lose LLM access if Xiaomi enforces the restriction.
Evidence:
Token Plan notice: 'may not be used for automated scripts or application backends' โ https://platform.xiaomimimo.com/docs/tokenplan/subscription
Mitigation: Owner-accepted risk. keyMode setting (token_plan | payg) with automatic fallback to pay-as-you-go key on 401/403/quota errors. tokenPlanScope=chat_only option limits Token Plan to chat prompts only. Cost page shows fallback events.
๐ค rifaterdemsahin๐
2026-10-24
๐
Cosmos DB free tier may not be available on the subscription
๐ก MediumActivecostR-003
Description: Azure Cosmos DB free tier (1,000 RU/s + 25 GB) is limited to one account per subscription. If the subscription already has a free-tier account, a serverless account must be used instead.
Impact: Serverless Cosmos costs ~$0.25/million RU + $0.25/GB/month. Small additional cost but breaks the 'zero fixed monthly' goal if provisioned throughput is accidentally created (~$23/month minimum).
Mitigation: If free tier unavailable, create serverless account (no fixed fee). Fixed-cost guard on the Costs page detects paid provisioned accounts and raises a red banner + task. Azure budget alert at $5/month.
๐ค rifaterdemsahin๐
2026-10-24
๐
Fly.io Machine has no stable egress IP
๐ก MediumActivesecurityR-004
Description: Fly Machines do not have a stable egress IP by default. IP allow-listing on Cosmos DB and other Azure services is not possible without allocating a static egress IP.
Impact: Cannot restrict Cosmos DB access by IP. Must rely on TLS + Entra ID/key auth only.
Mitigation: Protect Cosmos with TLS + Entra ID RBAC (or key auth as fallback). Optionally allocate a Fly static egress IP if IP allow-listing is required. Never expose Cosmos keys outside Key Vault.
๐ค rifaterdemsahin๐
2026-10-24
๐พ
Google Drive OAuth refresh token may expire or be revoked
๐ HighActivedataR-005
Description: If the Google OAuth app is in 'Testing' mode, refresh tokens expire after 7 days. The backup system depends on a valid refresh token for info@pexabo.com.
Impact: Nightly backups silently fail. Data loss risk if the primary database is compromised.
Mitigation: Set the OAuth app to Internal (Google Workspace) so refresh tokens don't expire. Failed backups raise a system notification + task. Optional Azure Blob second copy. Weekly test restore verifies backup integrity.
๐ค rifaterdemsahin๐
2026-10-24
๐ก๏ธ
Prompt injection via ingested external data
๐ HighMitigatedsecurityR-006
Description: External data sources (REST APIs, webhooks, CSV uploads, RSS feeds) may contain adversarial text that attempts to manipulate the AI agent into performing unauthorized actions.
Impact: Agent could execute unintended actions, exfiltrate data, or corrupt the workspace.
Mitigation: All ingested content is wrapped as untrusted data (never instructions). Tool permission tiers (Auto/Confirm/Blocked) are enforced server-side. Destructive actions require human confirmation. Per-space model allow-lists restrict sensitive spaces.
๐ค rifaterdemsahin๐
2026-10-24
๐
API token compromise
๐ด CriticalMitigatedsecurityR-007
Description: If an API token is leaked (in logs, browser history, or third-party scripts), an attacker gains read/write access to the workspace.
Impact: Unauthorized data access, modification, or deletion. Activity log shows api_token actor but damage may already be done.
Mitigation: Tokens stored as HMAC-SHA256 hashes with pepper from Key Vault. Shown once at creation. Scoped (read/write per-resource). Revocable with immediate effect. Rate-limited per token. IP allow-lists available. Token management is Blocked to the agent. Review 'last used' monthly.
๐ค rifaterdemsahin๐
2026-10-24
โ๏ธ
Cloudflare Flexible SSL causes redirect loops with Fly.io
๐ HighMitigateddeploymentR-008
Description: If Cloudflare SSL/TLS encryption mode is set to 'Flexible', Cloudflare connects to Fly.io over HTTP. But Fly.io forces TLS (301 redirect to HTTPS), causing an infinite redirect loop (ERR_TOO_MANY_REDIRECTS).
Impact: The entire site becomes inaccessible in browsers.
Mitigation: MUST set Cloudflare SSL/TLS encryption mode to 'Full (strict)' before enabling the orange cloud (proxy). Initially use DNS-only (grey cloud) to verify TLS cert issuance on Fly, then switch to Proxied. Documented in /setup/cloudflare page.
๐ค rifaterdemsahin๐
2026-10-24
โ๏ธ
Single Fly Machine is a single point of failure
๐ข LowAcceptedreliabilityR-009
Description: MVP runs web + agent + worker on one Fly Machine. If the Machine crashes or is unavailable, everything is down.
Impact: Temporary downtime. No high availability.
Mitigation: Accepted for MVP (cost optimization). Fly auto-start on traffic. Health check at /api/health. Split into separate process groups when load requires it. Nightly backups to Google Drive provide data safety.
๐ค rifaterdemsahin๐
2026-10-24
๐ง
In-memory stores lost on redeploy
๐ด CriticalActivedataR-010
Description: Current implementation uses in-memory Maps for tasks, spaces, goals, chat history, and API tokens. These are wiped on every redeploy or Machine restart.
Impact: All user data, chat history, and API tokens are lost on redeploy. Not production-ready.
Mitigation: TODO: Wire repositories to Cosmos DB (lib/db/repo/* is ready). Set DB_MODE=cosmos and configure connection string. Add seed-on-first-boot if needed. This is the highest-priority production blocker.
๐ค rifaterdemsahin๐
2026-10-24