Skip to content

fix(planning): reject non-canonical gateway signatures - #181

Merged
seonghobae merged 2 commits into
mainfrom
fix/planning-canonical-gateway-signature
Aug 10, 2026
Merged

fix(planning): reject non-canonical gateway signatures#181
seonghobae merged 2 commits into
mainfrom
fix/planning-canonical-gateway-signature

Conversation

@seonghobae

Copy link
Copy Markdown
Contributor

RCA

A current exact-head CI failure on the Planning workspace-authority regression exposed an encoding-alias edge case. A SHA-256 HMAC encoded as 43-character base64url has unused low bits in its final character. Node's base64url decoder accepts non-canonical textual aliases whose decoded bytes are identical to the canonical signature. The controller-level tamper regression therefore had a low-probability path where changing only the final character did not change the decoded digest, and the service accepted the altered header.

This is both a flaky-test root cause and a fail-closed authority-integrity gap: signature text should have one canonical representation.

Test-first repair

  1. Add a deterministic regression that constructs a non-canonical final-character alias and proves it decodes to the same bytes as the canonical HMAC.
  2. Require requireTrustedWorkspaceContext to round-trip the decoded digest back to the exact original base64url text before constant-time HMAC comparison.
  3. Preserve the existing length/character, TTL/skew, UUIDv4, secret-availability, and constant-time digest checks.

Scope

Two Planning HTTP-boundary files only. No workflow, dependency, migration, persistence, credential, reviewer, or branch-policy changes. This does not overlap active Planning data-rights PR #179 files.

Acceptance

Require exact-head Planning/full CI, merge-tree compatibility against independently resolved live main, AppGuardrail, SAST Semgrep, Security Scan, Commercial Readiness, CodeRabbit/current review findings, and unchanged-head revalidation before merge.

Refs #176 (observed blocker evidence).

@coderabbitai

coderabbitai Bot commented Aug 10, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@seonghobae, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 37 minutes

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: efbab15a-5a1f-490d-b24c-c0638403b19b

📥 Commits

Reviewing files that changed from the base of the PR and between 65373a7 and 672b7a1.

📒 Files selected for processing (2)
  • apps/planning-service/src/http-boundary.test.ts
  • apps/planning-service/src/http-boundary.ts

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

Comment @coderabbitai help to get the list of available commands.

@seonghobae
seonghobae merged commit 8e7005f into main Aug 10, 2026
36 of 37 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.

1 participant