Repository navigation
fix: harden dashboard sessions and webhook ingress - #340
Conversation
Co-authored-by: ecarreras <ecarreras@users.noreply.github.com>
pilipilisbot
left a comment
There was a problem hiding this comment.
Reviewed f02e243 against #339 and the existing dashboard/webhook trust boundaries. Approve.
The signed session now has an absolute expiry and version, rejects legacy cookies, rechecks configured allowlists on each request, and demotes admins after direct allowlist removal. Cookie-authenticated mutations use a fail-closed same-origin check; the signed webhook and bearer MCP routes remain outside it. Webhook bodies are capped incrementally, and the MCP deployment-global knowledge model is stated explicitly rather than implying a per-user repository ACL.
Validation: PYTHONPATH=src /home/openclaw/.openclaw/workspace/github/github-agent-bridge/.venv/bin/python -m pytest -q tests/test_backend.py tests/test_webhook.py — 175 passed. GitHub Python 3.11/3.12 and dashboard checks are green. The proxy-side 1 MiB cap still needs the nginx configuration deployed, as the PR notes; this is an operational rollout step, not a code-review blocker.
|
Post-merge sync complete: #340 is merged as |
|
Post-merge follow-up: PR #340 is merged at Operational follow-up remains separate from code completion: deploy the updated nginx configuration to enforce the proxy-side 1 MiB webhook cap, then observe it in production. |
Summary
iat/exp, an eight-hour default lifetime, a configurable session version, request-time allowlist/admin demotion checks, and an explicit logout flowOriginorReferermatches the configured dashboard origin; bearer MCP and signed webhook ingress remain outside that checkSecurity and rollout notes
GITHUB_AGENT_BRIDGE_DASHBOARD_SESSION_VERSIONrevokes all outstanding sessions without rotating the signing key.Tests
python3 -m pytest -q— 713 passedcd dashboard && npm test— 79 passedcd dashboard && npm run buildFixes #339