web: repository browser resolves kind:30618 refs without filtering by relay pubkey

Open Beginner friendly
#7,433 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
78/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
typescript
Domain
security, web-dev

Research direction

Start in web/src/features/repos/use-repo-refs.ts at lines 54 and 56, including the existing TODO, then compare how other addressable-event lookups are scoped. Determine whether kind:30618 should use the relay or repository owner's pubkey, and verify that refs from other pubkeys are excluded while the intended authority remains visible.

Written by the indexing model from the issue text.

Description

What's wrong

`web/src/features/repos/use-repo-refs.ts` resolves git ref events (kind:30618) without filtering by the relay's own pubkey. The file has a TODO/comment acknowledging this at the exact lines flagged below.

Impact

Any pubkey can publish a kind:30618 event claiming to be a ref for a repo it doesn't own, and the repo browser will display it as if it were authoritative — a ref-spoofing gap.

Location

web/src/features/repos/use-repo-refs.ts:54,56 (existing TODO comment already documents the gap).

Fix

Scope the query/filter to the relay's own pubkey (or the repo owner's pubkey, whichever is the intended authority for kind:30618 in this repo's NIP), matching how other addressable-event lookups in this codebase are scoped.

Provenance

Found during a documentation-corpus review of launchpad/docs/corpus/platforms/web/repository-browser.md (launchpad-26/buzz PR #1981).

Dominant language
Rust
Stars
33.7k
Forks
4.4k
Avg merge
1d 21h
Merged PRs (30d)
239

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from block/buzz

All issues in block/buzz

Similar issues

More Rust issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.