Skip to content

fix(cargo): remove the committed buf registry token - #2204

Merged
norrietaylor merged 1 commit into
mainfrom
fix/remove-buf-registry-token
Oct 16, 2026
Merged

norrietaylor merged 1 commit into
mainfrom
fix/remove-buf-registry-token

Conversation

@norrietaylor

@norrietaylor norrietaylor commented Oct 14, 2026 •

Copy link
Copy Markdown
Member

What

Deletes .cargo/config.toml. Its only content was a [registries.buf] entry whose token line was a bearer credential in plain text, tracked since the initial commit.

Why the whole file

  • No dependency resolves through that registry: Cargo.lock has no buf.build source.
  • No crate manifest names registry = "buf".
  • No workflow, script or justfile recipe reads the entry.

Follow-up for the owner

The token remains in git history. Rotate it at buf.build. If the registry is needed later, supply the credential through CARGO_REGISTRIES_BUF_TOKEN or a gitignored .cargo/credentials.toml, never a tracked file.

Found while surveying the tree for the quality-metrics work (spec 30).

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Chores
    • Removed a project-specific package source setting and its stored access credential. This internal configuration change does not add or remove any user-facing features. No changes to the app’s functionality are included in this release.

.cargo/config.toml held one thing: a `[registries.buf]` entry whose `token`
line was a bearer credential in plain text, tracked since the initial
commit. No dependency resolves through that registry (Cargo.lock has no
buf.build source), no crate names `registry = "buf"`, and no workflow or
script reads it, so the whole file goes rather than the one line.

The token is still in history. Rotate it at buf.build; a later need for
the registry goes through `CARGO_REGISTRIES_BUF_TOKEN` or a gitignored
`.cargo/credentials.toml`, never a tracked file.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@norrietaylor
norrietaylor requested a review from a team as a code owner October 14, 2026 06:19
@coderabbitai

coderabbitai Bot commented Oct 14, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: CHILL
  • Plan: Essentials
  • Run ID: 3b40f0af-36cb-492e-a883-96d327a28db5
📥 Commits

Reviewing files that changed from the base of the PR and between f5bb38c and c3dd7bd.

📒 Files selected for processing: 1
  • .cargo/config.toml
💤 Files with no reviewable changes: 1
  • .cargo/config.toml

Included review availability: This review used your included allowance. Your plan provides up to 5 included reviews per hour; 1 remain after this review.

📝 Walkthrough

The .cargo/config.toml file was deleted. This removed the buf registry’s sparse index configuration, Cargo token credential-provider setting, and embedded bearer token.

Changes: Cargo registry configuration

Layer / File(s) Summary
Remove buf registry settings
.cargo/config.toml
The buf registry’s sparse index URL, token credential-provider setting, and embedded bearer token were removed.

Priority: ⬆️ High

Estimated code review effort: 1 (Trivial) | ~3 minutes

Change: Bug fix

Suggested reviewers: 0chroma

Merge Risk: ⚪ Minimal · up to c3dd7

Removing the committed credential does not appear to disrupt supported builds. The PR is ready to merge after normal checks; the credential should also be rotated because deletion does not remove it from Git history.

Pre-merge checks: Passed 4 · Failed 1

Failed Failed checks: 1 warning

Check name Status Explanation Resolution
Description check Warning The description clearly explains what changed and why, but it omits the required Summary, Testing, and Checklist sections. It provides no test commands or output and does not address the checklist ite… Add the required Summary, Testing, and Checklist sections. Include the commands run and relevant output, such as cargo test or a documented reason why tests were not needed. Complete the checklist and state whether documentation changed and…
Passed Passed checks: 4 passed
Check name Status Explanation
Title check Passed The title is concise, uses the required Conventional Commit format, and clearly identifies removal of the committed Cargo registry token.
Docstring Coverage Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 0…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Description check

Explanation

The description clearly explains what changed and why, but it omits the required Summary, Testing, and Checklist sections. It provides no test commands or output and does not address the checklist items.

Resolution

Add the required Summary, Testing, and Checklist sections. Include the commands run and relevant output, such as cargo test or a documented reason why tests were not needed. Complete the checklist and state whether documentation changed and whether a BREAKING CHANGE footer is required.

  • Fix all pre-merge checks with AI
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

A rabbit checks the Cargo file,
The buf credentials leave in style.
No token hides among the lines,
The config now has cleaner signs.
I nibble clover, then I hop,
This tiny patch is at a stop.

Comment @coderabbitai help to get the list of available commands.

@minimal-foundry

minimal-foundry Bot commented Oct 14, 2026 •

Copy link
Copy Markdown
Contributor

Approved: no findings at c3dd7bdd5180.

Nothing to do.

Clobber: none: git log on the path shows the deletion commit on top of a dependency bump and the squashed initial commit, no fix being reverted.

@minimal-foundry minimal-foundry Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

minimal-review — approved

Verdict APPROVE — No findings.

@minimal-foundry minimal-foundry Bot added the review:approved minimal-review approved the current head label Oct 14, 2026
@norrietaylor
norrietaylor merged commit 813e4e5 into main Oct 16, 2026
36 checks passed
@norrietaylor
norrietaylor deleted the fix/remove-buf-registry-token branch October 16, 2026 15:30
norrietaylor added a commit that referenced this pull request Nov 4, 2026
.cargo/config.toml held one thing: a [registries.buf] entry whose token line was a bearer
credential in plain text. No dependency resolves through that registry, no crate names
registry = "buf", and no workflow or script reads it, so the whole file goes rather than the
one line. The token is still in history and needs rotating at buf.build.

Backport of #2204. Applied unchanged; the line's file matched main's.

(cherry picked from commit 813e4e5)
norrietaylor added a commit that referenced this pull request Nov 5, 2026
.cargo/config.toml held one thing: a [registries.buf] entry whose token line was a bearer
credential in plain text. No dependency resolves through that registry, no crate names
registry = "buf", and no workflow or script reads it, so the whole file goes rather than the
one line. The token is still in history and needs rotating at buf.build.

Backport of #2204. Applied unchanged; the line's file matched main's.

(cherry picked from commit 813e4e5)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

review:approved minimal-review approved the current head

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants