Skip to content

test: guard CLI errors against stack trace leaks - #133

Draft
cursor[bot] wants to merge 2 commits into
mainfrom
cursor/missing-test-coverage-90a0
Draft

test: guard CLI errors against stack trace leaks#133
cursor[bot] wants to merge 2 commits into
mainfrom
cursor/missing-test-coverage-90a0

Conversation

@cursor

@cursor cursor Bot commented Aug 13, 2026

Copy link
Copy Markdown

Risky behavior now covered

  • Rejected CLI commands must exit unsuccessfully while emitting only the safe error message.
  • Source locations, stack frames, and other exception details must not leak to users.
  • The failure path must not write anything to stdout.

Test files

  • Added test/cli.test.ts, a black-box subprocess test of the real CLI entrypoint.

Regression value

This directly protects the recent CLI information-disclosure fix. Replacing the guarded parseAsync() rejection handler with the previous bare call makes the test fail on the emitted source location and stack trace, proving the test detects the security regression without changing production behavior.

Validation

  • npm exec vitest -- run — 133 tests passed
  • npm run build — passed
  • npm exec prettier -- --check test/cli.test.ts — passed
Open in Web View Automation 

cursoragent and others added 2 commits August 13, 2026 10:03
Co-authored-by: Parvez Kose <koseparvez@gmail.com>
Co-authored-by: Parvez Kose <koseparvez@gmail.com>
@vercel

vercel Bot commented Aug 13, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
polyagent Ready Ready Preview Aug 13, 2026 10:07am

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