Model Context Protocol — Go MCP server + Laravel MCP package
requestURL() now returns (string, error) and rejects absolute or host-bearing URLs BEFORE request construction and BEFORE Authorization header is set. Closes the bearer-key leak vector: a path that ever flows from upstream JSON, config, or a tool argument can no longer spray the Bearer token at attacker-chosen URLs. New() validates apiURL at construction: - https://* always accepted - http://* rejected unless CORE_BRAIN_INSECURE=true is set (explicit dev/test opt-in; production should always be TLS) Cerberus #1052 from workspace-wide sniff. Today's call sites (Remember, Recall, Forget, List) hardcode the path → safe; this closes the API shape that invited future Call(ctx, method, untrustedPath, body) patterns from leaking the bearer. Tests: absolute http:// + https:// paths make zero HTTP calls, good relative path construction works, http:// apiURL rejected by default + accepted with CORE_BRAIN_INSECURE=true. Existing test fixtures converted to TLS to match the new default policy. Co-authored-by: Codex <noreply@openai.com> Closes tasks.lthn.sh/view.php?id=1052 |
||
|---|---|---|
| .core | ||
| .github/workflows | ||
| cmd | ||
| docs | ||
| pkg/mcp | ||
| src/php | ||
| tests/cli/mcp | ||
| .gitattributes | ||
| .gitignore | ||
| CLAUDE.md | ||
| composer.json | ||
| EXCEPTIONS.md | ||
| go.mod | ||
| go.sum | ||
| README.md | ||
mcp
Model Context Protocol — Go MCP server + Laravel MCP package