Skip to content

Config Validation: 5 critical config issues found (TRINITY_PASSWORD P0, 4x undocumented vars) #692

Closed

Description

@vybe

Automated Config Validation Report

Date: 2026-05-07
Result: 5 must-fix config issues found


P0 — Security + Functionality: TRINITY_PASSWORD local/prod divergence

docker-compose.yml:144: TRINITY_PASSWORD=${TRINITY_PASSWORD:-} — undocumented variable, empty default. The MCP server code (server.ts:85) falls back to "changeme" when the var is empty. In local dev, the MCP server authenticates to the backend with "changeme", which only works if ADMIN_PASSWORD is also "changeme" (insecure) — otherwise MCP auth silently fails for every local developer.

docker-compose.prod.yml:213: TRINITY_PASSWORD=${ADMIN_PASSWORD:-changeme} — correctly reads ADMIN_PASSWORD but :-changeme means a misconfigured production MCP server falls back to the well-known password.

Root cause: Two compose files use different variable names for the same credential. The fix is simple:

# docker-compose.yml:144
-      - TRINITY_PASSWORD=${TRINITY_PASSWORD:-}  # Match ADMIN_PASSWORD in .env
+      - TRINITY_PASSWORD=${ADMIN_PASSWORD:-}

# docker-compose.prod.yml:213 — remove the dangerous fallback
-      - TRINITY_PASSWORD=${ADMIN_PASSWORD:-changeme}
+      - TRINITY_PASSWORD=${ADMIN_PASSWORD}

P1 — Undocumented: GOOGLE_API_KEY missing from .env.example

Referenced in docker-compose.yml:19 and docker-compose.prod.yml:40, and used in:

  • config.py:104 — fallback for GEMINI_API_KEY
  • services/agent_service/crud.py:398 — injected into new agent containers
  • services/settings_service.py:84 — Gemini key retrieval

Users who want Gemini-powered agents have no .env.example guidance. Should be added alongside GEMINI_API_KEY.


P1 — Duplicate: FRONTEND_URL appears twice in .env.example

Lines 129 and 154 both define FRONTEND_URL=. The two occurrences have different surrounding documentation (one under "SERVICE URLS", one under "PUBLIC ACCESS CONFIGURATION"), creating confusion about which to use. The second occurrence should be removed.


P1 — Undocumented: Log management vars in docker-compose.yml but not .env.example

These are forwarded by docker-compose.yml as user-configurable variables but have no .env.example entry:

Variable Default Location
LOG_RETENTION_DAYS 90 docker-compose.yml:35, routers/logs.py:83
LOG_ARCHIVE_ENABLED true docker-compose.yml:36, routers/logs.py:84
LOG_CLEANUP_HOUR 3 docker-compose.yml:37, routers/logs.py:85

Should be added to the log/archive section of .env.example.


P1 — Undocumented: TRINITY_DATA_PATH missing from .env.example

docker-compose.prod.yml:64,157 use ${TRINITY_DATA_PATH:-./trinity-data} as the bind-mount path for backend and scheduler /data volumes. Production operators need to configure this to an absolute path (e.g., /opt/trinity/data) but there is no .env.example entry.


Recommended Actions (prioritized)

  1. Fix TRINITY_PASSWORD divergence — change docker-compose.yml:144 to ${ADMIN_PASSWORD:-}, remove :-changeme from docker-compose.prod.yml:213
  2. Remove duplicate FRONTEND_URL from .env.example (keep the one on line 129 under SERVICE URLS; update the PUBLIC ACCESS section to reference it)
  3. Add GOOGLE_API_KEY to .env.example alongside GEMINI_API_KEY
  4. Add log config vars (LOG_RETENTION_DAYS, LOG_ARCHIVE_ENABLED, LOG_CLEANUP_HOUR) to .env.example
  5. Add TRINITY_DATA_PATH to .env.example production section

Generated by scheduled /validate-config run

Activity

  1. added
    priority-p1
    type-bug
    on May 7, 2026
  2. added and removed
    status-in-progress
    on May 8, 2026
  3. vybe commented on May 8, 2026

    @vybe
    ContributorAuthor

    Fixed by PR #718 (squash-merged to dev as 1a1980e).

  4. added
    complexity-low
    theme-security
    on Jun 3, 2026
  5. added a commit that references this issue on Jun 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

complexity-lowpriority-p1theme-securitytype-bug

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions