Skip to content

fix(EverCore): require MinIO credentials from environment (CWE-798)#240

Open
Fearvox wants to merge 1 commit into
EverMind-AI:mainfrom
Fearvox:fix/issue-cwe798-minio-env-creds
Open

fix(EverCore): require MinIO credentials from environment (CWE-798)#240
Fearvox wants to merge 1 commit into
EverMind-AI:mainfrom
Fearvox:fix/issue-cwe798-minio-env-creds

Conversation

@Fearvox
Copy link
Copy Markdown
Collaborator

@Fearvox Fearvox commented Jun 3, 2026

What

methods/EverCore/docker-compose.yaml hardcoded minioadmin / minioadmin as the
MINIO_ACCESS_KEY / MINIO_SECRET_KEY for the Milvus MinIO object store. That is
CWE-798: Use of Hard-coded Credentials
anyone who can read the repo knows the object-store credentials, and a default
docker compose up ships those credentials into a running service.

This PR removes the hardcoded literals and sources the credentials from the
environment, failing loudly if they are not set:

    environment:
-      MINIO_ACCESS_KEY: minioadmin
-      MINIO_SECRET_KEY: minioadmin
+      MINIO_ACCESS_KEY: ${MINIO_ACCESS_KEY:?Set MINIO_ACCESS_KEY in your .env file}
+      MINIO_SECRET_KEY: ${MINIO_SECRET_KEY:?Set MINIO_SECRET_KEY in your .env file}

The new variables are documented in methods/EverCore/env.template next to the
existing Milvus configuration, with change-me-* placeholder values so users are
prompted to set their own:

# MinIO credentials used by Milvus object storage.
# Change these before running docker compose; docker-compose.yaml requires them.
MINIO_ACCESS_KEY=change-me-minio-access-key
MINIO_SECRET_KEY=change-me-minio-secret-key

The ${VAR:?message} form means an operator who forgets to set the variables gets a
clear, actionable error instead of silently booting with well-known credentials.

Why

  • Eliminates a hard-coded credential (CWE-798) from the default infra stack.
  • Keeps the local-dev story intact: copy env.template to .env, set the two
    values, docker compose up works exactly as before.
  • Fail-fast guard prevents an empty/blank credential from booting an
    unauthenticated object store.

Verification

Verified locally with the standalone docker-compose config interpolator against
methods/EverCore/docker-compose.yaml:

Scenario Result
MINIO_ACCESS_KEY / MINIO_SECRET_KEY unset docker-compose config exits 1: required variable MINIO_ACCESS_KEY is missing a value: Set MINIO_ACCESS_KEY in your .env file
both env vars set docker-compose config exits 0 and the rendered config shows the provided values, e.g. MINIO_ACCESS_KEY: testkey123

YAML validity confirmed via yaml.safe_load. No application runtime is required —
this is a static infra-config change.

Attribution

Adopts upstream EverMind-AI/EverOS PR
#206 by @sebastiondev
(Sebastion). Full credit preserved via a Co-authored-by trailer on the commit.

Scope

Two files, +7 / -2 lines, no behavior change for correctly-configured deployments:

  • methods/EverCore/docker-compose.yaml
  • methods/EverCore/env.template

Co-authored-by: Sebastion sebastion@sebastion.dev

docker-compose.yaml hardcoded minioadmin/minioadmin for the Milvus
MinIO object store (CWE-798: Use of Hard-coded Credentials). Replace
the literals with ${MINIO_ACCESS_KEY:?...} / ${MINIO_SECRET_KEY:?...}
so the values are sourced from the environment and compose fails loudly
when they are unset. Document the new variables in env.template.

Adopts upstream EverMind-AI/EverOS PR EverMind-AI#206.

Verified locally with `docker-compose config`:
- unset: errors "required variable MINIO_ACCESS_KEY is missing a value"
- set:   resolves to the provided env values

Co-authored-by: Sebastion <sebastion@sebastion.dev>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings June 3, 2026 02:41
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants