Skip to content

fix(cli): Redact onboarding run tokens from telemetry - #2116

Open
Abdkhan14 wants to merge 2 commits into
mainfrom
abdullahkhan/cli-redact-run-token
Open

Abdkhan14 wants to merge 2 commits into
mainfrom
abdullahkhan/cli-redact-run-token

Conversation

@Abdkhan14

Copy link
Copy Markdown
Contributor

The sentry-docs onboarding progress guide tells agents to call sentry api organizations/<org>/onboarding/agent/status/ -f 'runToken=<code>'. That puts the run token in the flag.raw-field telemetry tag. The existing redactCredentialText function covers Bearer tokens and sntry*_ credentials but not run tokens.

Add a RUN_TOKEN pattern that matches runToken=<value>, "runToken":"<value>", and their JSON-escaped forms, and replace the value with [REDACTED]. redactTelemetryEnvelope already runs this function over every string in every outgoing envelope, so the fix covers all telemetry paths — flag tags, flag.data, unknown-command argv, and error messages.

Refs VDY-366

Verification

  • New test.each cases fail without the pattern (token visible in output) and pass with it
  • Existing 46 tests continue to pass
  • pnpm run typecheck && pnpm run lint clean

The docs guide for onboarding progress tells agents to pass the run token as a -f flag to sentry api. That puts the value in the flag.raw-field telemetry tag. Add a RUN_TOKEN pattern to redactCredentialText so the token is replaced with [REDACTED] in every outgoing envelope.

Refs VDY-366

Co-authored-by: Cursor <cursoragent@cursor.com>
@vercel

vercel Bot commented Nov 9, 2026 •

Copy link
Copy Markdown

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

1 Skipped Deployment
Project Deployment Actions Updated
sentry-local Skipped Skipped Nov 9, 2026 6:16pm UTC

Request Review

@linear-code

linear-code Bot commented Nov 9, 2026

Copy link
Copy Markdown

VDY-366

@Abdkhan14
Abdkhan14 marked this pull request as ready for review November 9, 2026 18:11
Co-authored-by: Cursor <cursoragent@cursor.com>
@github-actions github-actions Bot added the risk: medium PR risk score: medium label Nov 9, 2026

This branch was previously deployed

1 inactive deployment
Preview — 983e14f2 Deployed Nov 9, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

risk: medium PR risk score: medium

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants