bug(auth): preserve rc tokens before process.env can truncate embedded NULs
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 52/100
- issue の種類
- バグ
- 明瞭さ
- おおむね明確
- 活発さ
- 活発
- 技術スタック
- node.js, typescript
- 領域
- authentication, cli
調査の方向性
Trace token parsing and environment handling through packages/cli/src/lib/ini.ts, packages/cli/src/lib/sentryclirc.ts, packages/cli/src/lib/env.ts, and packages/cli/src/cli.ts, starting with applySentryCliRcEnvShim and the auth selector. Use the suggested regression cases to verify NUL handling, precedence, recovery commands, and CLI/SDK parity; done means the complete credential reaches validation without breaking those behaviors.
索引モデルが issue の本文から書いたものです。
説明
An access token containing an embedded NUL in .sentryclirc can be silently truncated before bearer validation sees it.
Confirmed locally against e0fdee49a347255bbbb072dfc74baf53ae5998de, using synthetic data and no network requests:
- Parse INI content containing
token = synthetic-prefix\u0000synthetic-tailwith an actual NUL byte in the value. parseInipreserves the complete string.- In CLI mode,
getEnv()returnsprocess.env. applySentryCliRcEnvShimassigns the token toenv.SENTRY_AUTH_TOKEN; Node truncates the value at the NUL.- The auth selector and bearer validator receive only
synthetic-prefix, which is printable and passes format validation.
Expected: preserve the complete credential until it is validated, so an internal NUL is rejected without transmitting a truncated prefix. Surrounding padding may follow the shared token-normalization policy.
Do not simply throw from the boot-time shim: that runs before command routing and would also block help/login/logout, or reject an rc token that stored OAuth should ignore. Avoid switching identities by silently dropping the invalid token. A fix should preserve existing environment precedence and recovery commands, and account for context.env and subprocess inheritance if environment storage changes.
Suggested regressions: an embedded NUL in a selected rc token, an invalid rc token shadowed by stored OAuth, explicit env precedence, recovery commands, and parity between CLI/process.env and SDK/in-memory environments.
Relevant files: packages/cli/src/lib/ini.ts, packages/cli/src/lib/sentryclirc.ts, packages/cli/src/lib/env.ts, and packages/cli/src/cli.ts.
- 主要言語
- TypeScript
- スター
- 123
- フォーク
- 14
- 平均マージ
- 1日 48分
- マージ済み PR(30日)
- 76
環境構築
このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
getsentry/cli のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
メンテナーはふだん 1 日以内に返信
-
難易度 4/5 3〜5日 初心者へのやさしさ 64/100
メンテナーはふだん 1 日以内に返信
-
Evaluate Twinkleplop for terminal code highlighting対応中かも @MathurAditya724 が 11 日前に担当しました。 オープンjared
getsentry/cli#1633 · コメント 1 件 · リアクション 2 件 · 担当者 1 名 ·
メンテナーはふだん 1 日以内に返信
-
Evaluate Twinkleplop for local UI JSON highlighting対応中かも @MathurAditya724 が 11 日前に担当しました。 オープンjared
getsentry/cli#1632 · コメント 1 件 · リアクション 2 件 · 担当者 1 名 ·
メンテナーはふだん 1 日以内に返信
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
メンテナーはふだん 4 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 1 日以内に返信