Skip to content
This repository was archived by the owner on Oct 23, 2026. It is now read-only.

fix(auth): name .sentryclirc as token source in ignored-token hint - #1346

Merged
BYK merged 2 commits into
mainfrom
issue-1345-sentryclirc-token-hint
Aug 3, 2026
Merged

BYK merged 2 commits into
mainfrom
issue-1345-sentryclirc-token-hint

Conversation

@jared-outpost

@jared-outpost jared-outpost Bot commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

The env-token-ignored hint claimed the user set a SENTRY_AUTH_TOKEN env var even when the token actually came from a [auth] token in .sentryclirc (the shim copies it into SENTRY_AUTH_TOKEN at boot). The shim now records the injecting .sentryclirc path and the hint names it instead, so the source is accurate.

Scoped to the incorrect-source bug from #1345. The larger behavior proposal in the issue (trust org/host-embedded tokens, only fall back to the stored DB token when the other fails/can't be trusted) is a separate design change and isn't included here.

Testing

pnpm exec vitest run test/lib/auth-hint.test.ts test/lib/sentryclirc.test.ts (39 passed), plus pnpm run typecheck and pnpm run lint clean.

Closes #1345

@github-actions

github-actions Bot commented Aug 3, 2026 •

Copy link
Copy Markdown
Contributor
PR Preview Action v1.8.1
Preview removed because the pull request was closed.
2026-08-03 11:19 UTC

@jared-outpost
jared-outpost Bot marked this pull request as ready for review August 3, 2026 10:37
@jared-outpost
jared-outpost Bot requested a review from BYK August 3, 2026 10:37
@jared-outpost

jared-outpost Bot commented Aug 3, 2026

Copy link
Copy Markdown
Contributor Author

marked ready — all required checks are green (Build/Unit Tests, Lint & Typecheck, Warden, Semgrep, Secret Scan, Dependency Review). self-review turned up nothing. @BYK, tagged you since you filed the issue; this only fixes the incorrect source in the hint, the token-trust/precedence rework is left for a separate discussion.

@BYK BYK left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Looks good except for the one question I asked.

When you are done with this PR, move on to the other one. Make sure we don't violate our security model in that.

Comment thread packages/cli/src/lib/sentryclirc.ts Resolved
jared-outpost Bot added 2 commits August 3, 2026 11:09
When a token is set in .sentryclirc, the env shim copies it into
SENTRY_AUTH_TOKEN. The env-token-ignored hint then claimed the user
set a SENTRY_AUTH_TOKEN env var, which is misleading — the source was
a config file. Record the injecting .sentryclirc path in the shim and
have the hint name it instead.

Fixes #1345
Collapse the redundant getter JSDoc into a one-liner and note the
module-local + getter mirrors the pinnedHost snapshot pattern already
used in env-token-host.ts, per review feedback.
@jared-outpost
jared-outpost Bot force-pushed the issue-1345-sentryclirc-token-hint branch from 6878e04 to 913102c Compare August 3, 2026 11:09
@jared-outpost
jared-outpost Bot requested a review from BYK August 3, 2026 11:10
@jared-outpost

jared-outpost Bot commented Aug 3, 2026

Copy link
Copy Markdown
Contributor Author

heads up: the required warden: security-review check failed on 913102c with "Skill execution failed" — that's a crash in Warden's own agent, not a finding. It passed on the prior commit (6878e04), and 913102c is a docs-only JSDoc change (no code-behavior diff), so there's nothing in the diff to flag. I can't re-trigger the org-level required workflow from here; a maintainer re-run should clear it. Everything else (Build/Unit Tests, Lint & Typecheck, Semgrep, Secret Scan, Dependency Review, Socket) is green.

@BYK
BYK merged commit df7542d into main Aug 3, 2026
29 of 32 checks passed
@BYK
BYK deleted the issue-1345-sentryclirc-token-hint branch August 3, 2026 11:19
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Incorrect warning on .sentryclirc token

1 participant