feat(gnoweb): community-realm notice on packages outside a trusted list - #6191
Draft
alexiscolin wants to merge 6 commits into
Draft
alexiscolin wants to merge 6 commits into
alexiscolin wants to merge 6 commits into
Conversation
…sted list Every /r/ and /p/ page whose path is not under a trusted entry renders a warning strip under the site-wide banner, on render, $source, $help and ?state views alike. The gnoweb binary enables it by default (-no-realm-notice, -trusted-paths, GNOWEB_REALM_NOTICE_TEXT); the library default leaves it off so gnodev is unaffected. See gno.land/adr/prxxxx_gnoweb_realm_notice.md.
$source&file=..%2F..%2Fother%2Fpkg%2Frender.gno was path-joined onto the package path and rendered another package's file under this one's chrome. Package files are flat, so a separator or dot segment is never a file name.
Collaborator
🛠 PR Checks Summary🔴 Changes related to gnoweb must be reviewed by its codeowners Manual Checks (for Reviewers):
Read More🤖 This bot helps streamline PR reviews by verifying automated checks and providing guidance for contributors and reviewers. ✅ Automated Checks (for Contributors):🔴 Changes related to gnoweb must be reviewed by its codeowners ☑️ Contributor Actions:
☑️ Reviewer Actions:
📚 Resources:Debug
|
… files /u/<name> renders that user's home realm, so a third-party realm reached gnoweb's chrome without the notice. A missing or rejected file name now maps to 404 like a missing package. The file-name guard is a predicate tested in both directions. The ADR corrects which default names are registered to ownerless seed addresses versus not registered, and states that a vouched namespace covers everything its key deploys.
21 tasks
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.
What
gnoweb shows a "community realm" notice on every
/r/,/p/and/u/page whose namespace is outside a trusted list, on render,$source,$help,?stateand the user profile alike. It renders as a warning strip under the site-wide banner, never instead of it. Third-party realms now deploy on mainnet with the same chrome as the team's own, so the site read as an endorsement.On by default in the
gnowebbinary (-no-realm-noticeto disable), list in-trusted-paths, text inGNOWEB_REALM_NOTICE_TEXT. Off in the library default, so gnodev never shows it. Entries are namespaces or package paths without/r/or/p/; one entry covers both trees and everything under it.Trust by namespace holds on mainnet: enforcement is enabled and open registration only accepts
nym-[a-z]{5,13}\d{3}, so a plain name cannot be squatted. Rationale and alternatives ingno.land/adr/pr6191_gnoweb_realm_notice.md.Changes
realm_notice.gomatcher, hook inGet, config plumbing mirroring the existing banner and aliases, flags and env var.ui/banner.htmland rendered twice;.b-banner--warningon existing tokens;public/main.cssregenerated.$source&file=..%2F..%2F…path-joined into another package and rendered its file under this package's chrome;rpcClient.Filenow rejects separators and dot segments, and a missing file answers 404 instead of 500.Not in this PR
Verified
gnoweb and cmd test suites, repo-pinned golangci-lint, biome,
make generatereproduces the committed assets. Not done: a visual check of the strip in a browser.Follow-up:
?state&oid=renders any object regardless of the page's realm, pre-existing, to be tracked in its own issue.AI-assisted; every finding was verified against the code before landing.
🤖 Generated with Claude Code