fix(cli): validate issue repository before signing - #7076
Open
johnely19 wants to merge 1 commit into
Open
Conversation
`buzz issues create` accepted any hex-shaped --repo-owner and signed it straight into the event's a and p tags. Two real incidents (2026-08-24, 2026-08-27) permanently archived issues under corrupted owner keys — one a genuine product task invisible to every listing tool for six days. The create path now resolves an exact kind-30617 repository announcement for the supplied owner/id pair (kinds/authors/#d/limit:1, the same filter shape as fetch_own_repo_announcement) and refuses before any event construction or signing when none exists or the returned event does not match the pair. Resolution runs through a gated seam (cmd_create_issue_gated) so build/sign ordering is unit-asserted: zero constructions on any invalid arm, exactly one on success. Signed-off-by: John Ely <john@heyricordo.com>
🔐 Codex Security Review
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
buzz issues createpreviously accepted any hex-shaped--repo-ownerand signed that owner/id pair directly into the issue event. A typo or stale owner could therefore publish an issue under a repository address that no repository announcement resolves.This change resolves the exact kind-30617 repository announcement for the supplied owner and repo id before constructing or signing the issue event. It fails closed when the relay query fails or the response does not contain the requested kind/author/
dtuple, and names the rejected owner/id pair in the error. The valid path still constructs and signs exactly once.Related issue
N/A — no matching open issue or PR found.
Testing
cargo fmt --all -- --checkcargo test -p buzz-cli— 415 passed, 0 failedd, wrong-owner, and wrong-kind announcements all refused before publishcargo build --release -p buzz-cli