hotfix(middleware): P0 — add missing return after AbortWithStatusJSON in CanvasOrBearer - #2040
Merged
Merged
Conversation
Root cause of PR #1981 E2E failures (step 7 timeout): - hermes-agent install from NousResearch (Node 22 tarball + Python deps from source) + gateway health wait takes 15-25 min on staging - install.sh runs BEFORE molecule-runtime launches, blocking heartbeats - bootstrap-watcher fires at 5 min (cp#245) → workspace=failed - workspace never recovers because molecule-runtime never starts in time Fix: increase WS_DEADLINE from 1200s (20 min) to 1800s (30 min) to give hermes cold-boot enough runway. Also bump job timeout-minutes from 30 → 45 to accommodate the longer wait. Medium-term: fix cp#245 (bootstrap-watcher hermes deadline too short) in molecule-controlplane to reduce false-failed noise. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Root cause of PR #1981 E2E failures (step 7 timeout): - hermes-agent install from NousResearch (Node 22 tarball + Python deps from source) + gateway health wait takes 15-25 min on staging
chore: sync staging to main — 2026-04-24 04h (71 commits)
Contributor
|
[retarget-bot] This PR was opened against Why: per SHARED_RULES rule 8, all feature work targets What changed: just the base branch — no code change. CI will re-run against If this PR is the CEO's staging→main promotion: the Action skipped you (only bot-authored PRs are retargeted). If you see this comment on your CEO PR, that's a bug — please tag @HongmingWang-Rabbit. |
Closed
molecule-ai Bot
added a commit
that referenced
this pull request
Apr 24, 2026
…ne 946 — resolves Platform(Go) CI compile error on PR #2040
…4-24-final chore: promote sync-to-main-final → main (finish #1981)
molecule-ai
Bot
force-pushed
the
hotfix/canvasorbearer-return-main
branch
from
April 24, 2026 18:03
87a5bd7 to
1447f4d
Compare
…asOrBearer P0 security: CanvasOrBearer final else branch aborts with 401 but continues execution to c.Next() — allowing the downstream handler to overwrite the 401 response. Regression tests added to verify the handler is not called after AbortWithStatusJSON in both no-cred and wrong-origin paths. Confirmed on origin/main @ 69408ab and origin/staging @ 6b62391. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…ne 946 — resolves Platform(Go) CI compile error on PR #2040
molecule-ai
Bot
force-pushed
the
hotfix/canvasorbearer-return-main
branch
from
April 24, 2026 18:04
1447f4d to
f715574
Compare
Contributor
Author
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.
P0 Security Fix — CanvasOrBearer Auth Bypass
Severity: P0 | Confirmed by App-QA audit of origin/main @ 69408ab
Bug
CanvasOrBearerfinal else branch callsc.AbortWithStatusJSON(401, ...)withoutreturn. Execution falls through toc.Next(), allowing the downstream handler to overwrite the 401 response.Confirmed on
Fix
+
returnafterc.AbortWithStatusJSON— single line.Regression tests added
TestCanvasOrBearer_TokensExist_NoCreds_Returns401: verifies handler NOT called, body NOT written after abortTestCanvasOrBearer_TokensExist_WrongOrigin_Returns401: same, for wrong-origin pathScope
Cosmetic route only (PUT /canvas/viewport) — CVSS Low per security audit. No sensitive data exposure. Fast-track approval requested.
Labels
securityhotfixp0🤖 Generated with Claude Code