Harden localbrain security defaults#1
Draft
michaelzenkay wants to merge 1 commit into
Draft
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.
What changed
Why
Docker Desktop published ports were not reliably restricted to loopback, and the previous MCP function held a service-role key while allowing every connected agent to capture, update, and delete memories. Retrieved memories could also carry prompt-injection text without a clear trust boundary.
Impact
MCP clients can search and list memories but cannot write. Users capture explicitly with
node scripts/localbrain-cli.mjs capture .... Existing installs must apply the new migration, switch.envfromSUPABASE_SERVICE_ROLE_KEYtoSUPABASE_ANON_KEY, and install the Windows firewall rule before the hardened startup helper will run.Validation
git diff --checkpassedA live Ollama/Edge Function smoke test was not run in the public checkout because startup intentionally requires the administrator-installed local firewall rule.