fix(EverCore): require MinIO credentials from environment (CWE-798)#206
Open
sebastiondev wants to merge 1 commit intoEverMind-AI:mainfrom
Open
fix(EverCore): require MinIO credentials from environment (CWE-798)#206sebastiondev wants to merge 1 commit intoEverMind-AI:mainfrom
sebastiondev wants to merge 1 commit intoEverMind-AI:mainfrom
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
methods/EverCore/docker-compose.yamlships with the literal MinIO vendor defaults (minioadmin/minioadmin) hardcoded asMINIO_ACCESS_KEY/MINIO_SECRET_KEYfor thememsys-milvus-minioservice. The same compose file publishes the MinIO ports9000and9001to the host (the default bind is0.0.0.0). Anyone who follows the EverCore quickstart and runsdocker compose upfrom a fresh clone exposes a MinIO instance on the network with credentials that are publicly known and continuously scanned for by automated bots.This PR makes the credentials required environment variables so compose refuses to start until the operator sets explicit values.
methods/EverCore/docker-compose.yaml(thememsys-milvus-minioservice block)Fix
The
${VAR:?message}form is a Compose/Bash interpolation that aborts startup with a clear error if the variable is unset or empty — failing closed instead of silently inheriting the insecure default.methods/EverCore/env.templateis updated with placeholder entries (change-me-...) and a comment pointing at the compose requirement, so the existingcp env.template .envworkflow continues to work — the operator just has to substitute values.What I tested
docker compose -f methods/EverCore/docker-compose.yaml configwith no.env: aborts with theSet MINIO_ACCESS_KEY in your .env filemessage (fail-closed verified).MINIO_ACCESS_KEY/MINIO_SECRET_KEYset in.env: renders the expected configuration with the operator-supplied values.MINIO_ACCESS_KEY/MINIO_SECRET_KEY(Milvus reads the bucket through its own client config), so this change is self-contained.Why it's exploitable in practice
The preconditions are minimal:
docker compose upagainstmethods/EverCore/docker-compose.yamlwithout overriding the credentials (the documented quickstart path).When both hold, the attacker uses
minioadmin:minioadminagainsthttp://target:9000and gets full bucket access — read/write/delete of any objects Milvus stores there. Internet-wide scanners actively probe for exactly this credential pair.Scope note
There is a separate hardcoded-credentials issue with the MongoDB service in the same file. I'm keeping that change in its own PR so each fix can be reviewed and reverted independently.
Adversarial review
Before submitting I tried to disprove this — looked for an existing mitigation that would make the report moot. There isn't one: the compose file has no
127.0.0.1:host binding on the MinIO ports, no override file ships defaults from the environment, andenv.templatedid not previously containMINIO_*entries, so an operator copying the template would not be prompted to change them. The credentials really are the literal vendor default that bots scan for, and they really are reachable on whatever interface Docker binds to. The fix is the minimal change that converts a silent insecure default into a loud, fail-fast configuration error.cc @lewiswigmore