Skip to content

fix: post-merge review follow-ups (path traversal, Sentry PII, Slack instr guard, MCP join rate-limit)#325

Merged
buremba merged 2 commits into
mainfrom
claude/review-recent-merged-prs-kRyNx
Apr 23, 2026
Merged

fix: post-merge review follow-ups (path traversal, Sentry PII, Slack instr guard, MCP join rate-limit)#325
buremba merged 2 commits into
mainfrom
claude/review-recent-merged-prs-kRyNx

Conversation

@buremba
Copy link
Copy Markdown
Member

@buremba buremba commented Apr 23, 2026

Summary

Follow-ups from an aggregated review of 128 PRs merged between 2026-04-09 and 2026-04-23 (7 parallel review agents, grouped by theme). Five concrete gaps patched in one PR.

⚠️ Scope note: this bundles 5 fixes across 4 packages, which bends the "one branch = one concern" rule in AGENTS.md. Opened as a single PR at the requester's instruction — happy to split if the reviewer prefers.

Fixes

Explicitly skipped

Test plan

  • UploadUserFile with a path containing ../../etc/passwd returns the "outside workspace" error instead of uploading.
  • UploadUserFile with an absolute path outside workspaceDir returns the error.
  • UploadUserFile with a normal relative or absolute-inside-workspace path still uploads.
  • Sentry still captures errors (non-PII). SENTRY_DSN unset → no-op.
  • If ChatInstanceManager.listConnections() throws inside SlackInstructionProvider, session-context assembly returns an empty instruction string instead of surfacing the error.
  • Calling join_organization 11× within an hour yields a rate-limit error on the 11th call.

https://claude.ai/code/session_011oAMBGGtHtsYyUdsqHwr51


Generated by Claude Code

@chatgpt-codex-connector
Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

claude added 2 commits April 23, 2026 16:59
Follow-ups from an aggregated teammate review of 128 PRs merged between
2026-04-09 and 2026-04-23. Five concrete gaps patched:

- worker: constrain UploadUserFile to the workspace root (#203 follow-up).
  path.join allowed `../` and absolute paths to escape the workspace. Now
  resolves and rejects anything outside workspaceDir when one is set.
- core: flip Sentry sendDefaultPii to false (#172 follow-up). User content
  and identifiers flow through this stack; the schema has no scrubbing so
  PII-by-default was unsafe.
- gateway: make SlackInstructionProvider extend BaseInstructionProvider
  (#269 follow-up). Sibling Skills/Network providers are wrapped in a
  try/catch that returns "" on error; Slack was bypassing it and would
  crash session-context assembly if listConnections threw.
- owletto-backend: rate-limit the join_organization MCP tool to match the
  REST endpoint (#296 follow-up). Keyed on userId since MCP calls don't
  carry a client IP.

Skipped one reviewer finding: removing the process.env fallback for API
keys at worker.ts:1099/1109 (the inconsistency with #225 base-URL code).
Embedded/dev workers depend on that fallback since credentialStore is
only populated from gateway-supplied session context.
Second pass on the 2-week PR review. Five more gaps closed:

- gateway: unit tests for verifyOwnedAgentAccess covering owner, cross-tenant,
  cross-platform, agent-scoped, admin-bypass, unknown-agent, and external
  OAuth mismatches (#285 follow-up). Closes the test hole in the cross-tenant
  ownership guard.
- owletto-backend: validate each CSP frame-ancestor entry against a strict
  host-source / scheme-source grammar before joining (#246 follow-up).
  Malformed env entries like `https:// lobu.ai` are now dropped instead of
  silently rendered into the directive.
- owletto-backend: introduce normalizeHost() in utils/public-origin and use
  it from getSubdomainZone, extractSubdomainOrg, getCanonicalRedirectUrl, and
  the BetterAuth trustedOrigins wiring (#234/#224/#214 follow-up). Unifies
  the ad-hoc .toLowerCase()/.replace() patterns and adds IDN→punycode so
  `müller.lobu.ai` matches the ASCII zone configured in env.
- owletto-backend: redact member emails that surface via template_data and
  tab template_data in resolve_path, not only on the single resolved entity
  (#309 follow-up). A dashboard data source that enumerates $member entities
  no longer leaks emails to non-admin callers. New utils/member-redaction
  helper plus unit coverage.
- owletto-backend: treat #311 as already closed — ToolContext.memberRole is
  `string | null` (required, not optional), so TypeScript already catches
  future literal omissions at construction.
@buremba buremba force-pushed the claude/review-recent-merged-prs-kRyNx branch from e09f1f4 to 96646bd Compare April 23, 2026 17:00
@buremba buremba merged commit 3faad40 into main Apr 23, 2026
11 of 13 checks passed
@buremba buremba deleted the claude/review-recent-merged-prs-kRyNx branch April 23, 2026 17:06
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