Skip to content

fix(cursor-top): sanitize Cloud API display fields - #9

Merged
wyvern8 merged 1 commit into
mainfrom
cursor/fix-cloud-api-terminal-injection-cfb4
Jul 5, 2026
Merged

fix(cursor-top): sanitize Cloud API display fields#9
wyvern8 merged 1 commit into
mainfrom
cursor/fix-cloud-api-terminal-injection-cfb4

Conversation

@wyvern8

@wyvern8 wyvern8 commented Jul 5, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Add sanitizeDisplayText() to neutralize terminal control sequences from remote Cloud API strings before rendering.
  • Sanitize Cloud API AgentNode display fields (id, label, title, repo, recentLogs, logSource) at ingestion and URL-encode remote IDs in run request paths.
  • Add Vitest coverage for OSC/CSI/DCS/raw C1 payloads, empty-name fallback, snippet clipping, and hostile path IDs.

Testing

  • pnpm exec tsx -e '<mock fetchCloudAgents exploit proof>' before fix: reproduced 19 surviving control bytes.
  • pnpm exec tsx -e '<mock fetchCloudAgents exploit proof>' after fix: control_count=0.
  • pnpm exec vitest run tests/sanitize.test.ts tests/cloud-api.test.ts
  • pnpm test && pnpm build in plugins/zoto-cursor-top
  • node scripts/validate-template.mjs && node scripts/validate-skills.mjs

Notes

  • pnpm test at repository root still fails in unrelated zoto-eval-system temp/selftest paths; zoto-cursor-top passes within that run before the unrelated failures.
Open in Web Open in Cursor 

Co-authored-by: AV <wyvern8@users.noreply.github.com>
@coderabbitai

coderabbitai Bot commented Jul 5, 2026

Copy link
Copy Markdown

Warning

Review limit reached

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

Next review available in: 15 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

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: ASSERTIVE

Plan: Pro

Run ID: 7760ddd0-48b2-4d25-89a4-38bdb768228d

📥 Commits

Reviewing files that changed from the base of the PR and between d397173 and 964d4fe.

📒 Files selected for processing (4)
  • plugins/zoto-cursor-top/src/discovery/cloud-api.ts
  • plugins/zoto-cursor-top/src/discovery/sanitize.ts
  • plugins/zoto-cursor-top/tests/cloud-api.test.ts
  • plugins/zoto-cursor-top/tests/sanitize.test.ts
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch cursor/fix-cloud-api-terminal-injection-cfb4

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.

@wyvern8
wyvern8 marked this pull request as ready for review July 5, 2026 13:08

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved. Cursor Bugbot was not present on this PR after polling, so that signal was skipped per policy; no other configured automated reviewers reported findings requiring human review. No reviewers were assigned.

Open in Web View Automation 

Sent by Cursor Approval Agent: Pull Request Approver

@wyvern8
wyvern8 merged commit 6cbf1e8 into main Jul 5, 2026
4 of 5 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