This repository was archived by the owner on Oct 13, 2026. It is now read-only.
Repository navigation
feat: source field decides who may read a service nook's code - #5
Merged
Merged
Conversation
A static nook's files reach every viewer's browser, so they are readable by anyone who can open it. A service nook's run code never reaches a browser, and should not become readable just because someone was shared the nook. source is "editors" (owner and editors) by default, or "viewers" to opt in to the static behaviour. Parse writes the default out explicitly, so a pull or an export of a service nook states who can read it rather than leaving it implied. nookd enforces this on /_nook/source, pull, and remix.
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Follow-up to #3, implementing the decision on ENG-24: a service nook's run code is readable by the owner and editors only, unless the manifest opts in.
{ "name": "board", "type": "service", "source": "viewers", "run": "python app.py", "port": 8000 }"editors"(default) or"viewers". Anything else is rejected by name —"public"and"everyone"are the guesses an agent would make, and both are covered by the tests.Parsewrites the default out explicitly for service nooks, so anook pullor export states who can read the code instead of leaving it implied. Static nooks carry nosourcefield at all.SourceVisibleToViewers()is the single predicate nookd enforces on/_nook/source,pull, and remix. Static nooks always answer true, since their files reach the browser anyway.sourceon a static nook is an error, like the other service-only fields.Needs a
v0.4.1tag before nookd can enforce it.Part of ENG-24