Skip to content

fix: cap per-user logs, never follow redirects, refuse token without panel URL - #9

Merged
ValgulNecron merged 2 commits into
mainfrom
fix/security-hardening-2026-11-24
Nov 24, 2026
Merged

ValgulNecron merged 2 commits into
mainfrom
fix/security-hardening-2026-11-24

Conversation

@ValgulNecron

Copy link
Copy Markdown
Contributor

Security review of the MCP server (2026-11-24). The read-only invariant holds on every path. Fixes, by severity:

Severity Finding Fix
Low the panel client followed redirects; Go keeps Authorization on same-host redirects, so a redirect to http:// would resend the gpmcp_ token in cleartext CheckRedirect returns http.ErrUseLastResponse
Low with GAMEPLANE_MCP_TOKEN set but GAMEPLANE_PANEL_URL missing, serve silently fell back to break-glass (kubeconfig / ServiceAccount) instead of the user's scoped token start-up error
Low per-user pod logs were not capped client-side (spec promises 256 KiB; only the API enforced it) keep the newest 256 KiB with the truncation notice, on a rune boundary
Info the GET-only source tripwire missed string-literal methods in NewRequestWithContext one more forbidden pattern (strengthens the test)

Not changed: break-glass list calls are unpaginated (caller is already admin, availability only); literal env[].value is returned as the API returns it.

New tests: internal/panel/hardening_test.go, main_serve_test.go; source_test.go gains a pattern only. No existing assertion changed (checked by a separate test-diff review). specs.md and README.md updated.


Generated by Claude Code

…panel URL

Per-user mode now trims pod logs to the newest 256 KiB client-side like break-glass, does not follow redirects that could resend the bearer token, and a GAMEPLANE_MCP_TOKEN without GAMEPLANE_PANEL_URL is a start-up error instead of a silent fall back to break-glass. The GET-only source tripwire also catches string-literal methods.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Claude <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Nov 24, 2026 •

Copy link
Copy Markdown

Important

  • Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: adc0e20c-4aba-4b33-a059-066171228d33
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@ValgulNecron ValgulNecron self-assigned this Nov 24, 2026
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Claude <noreply@anthropic.com>
@ValgulNecron
ValgulNecron merged commit 2b513a0 into main Nov 24, 2026
6 checks passed
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