8000 docs(spec): a box's stored spec is readable only by the daemon's user (spec 29) by agent-137 · Pull Request #3772 · gominimal/minimal · GitHub
[go: up one dir, main page]

Skip to content

docs(spec): a box's stored spec is readable only by the daemon's user (spec 29) - #3772

Merged
mitodrummer merged 1 commit into
mainfrom
docs/box-store-owner-only
Nov 24, 2026
Merged

mitodrummer merged 1 commit into
mainfrom
docs/box-store-owner-only

Conversation

@agent-137
@agent-137 agent-137 commented Nov 24, 2026 •
Copy link
Copy Markdown
Member

Spec 29 amendment for #3761, on Karl's decision of 2026-11-24.

What changes

  • BOX-232 (new): a box's stored spec is readable and writable only by the user that runs minimald, under a box directory and a store directory that only that user can enter, whatever the user's umask.
  • BOX-232 sub-bullet: when the store opens and finds a stored spec, or a box or store directory, that other users can read or enter, it restricts it to that user before it serves any request. This fixes files that an earlier release wrote with the default mode.
  • The comment cites BOX-230: the stored spec holds every env_vars value as written, so on a shared host another local user must not read it. On unix this is mode 0600 for the file and 0700 for the directories.

Not in this PR

The code (crates/boxes/src/store.rs) follows as the plan task T139 once this merges. #3766, the follow-up task the runtime refused for missing triage provenance, is closed as superseded by it. Karl approved this route on 2026-11-24.

spec-lint: P004 only (tests not written yet).

Refs #3761. Refs #2236.

🤖 Generated with Claude Code

https://claude.ai/code/session_016CYvTvep9ZaSf5pJMB2hQA

Summary by CodeRabbit

  • Documentation
    • Updated the local-first specification to require that stored specs and their parent directories be accessible only to the user running the service, including when correcting permissions on existing files and directories.

… (spec 29)

BOX-232 writes the stored spec owner-only under directories only the
daemon's user can enter, whatever the umask, and tightens wider ones
when the store opens. Karl's decision of 2026-11-24 on #3761.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016CYvTvep9ZaSf5pJMB2hQA
@agent-137
agent-137 requested a review from a team as a code owner November 24, 2026 17:25
@agent-137
Copy link
Copy Markdown
Member Author

/arch-review

@coderabbitai
coderabbitai Bot commented Nov 24, 2026 •
Copy link
Copy Markdown
Contributor

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

Spec 29 adds BOX-232, which requires stored specs and their parent directories to be accessible only to the minimald user. It also requires the store to restrict broader access when it opens, before serving requests.

Changes: Stored spec access

Layer / File(s) Summary
Specify stored spec access
docs/specs/29-spec-box-local-first/29-spec-box-local-first.md
Adds BOX-232 requirements for owner-only access to stored specs and their parent directories, regardless of umask. Existing broader access must be restricted before the store serves requests.

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

Possibly related issues

Suggested reviewers: mitodrummer, norrietaylor

Merge Risk: Minimal · up to 150c6

This documentation-only change specifies owner-only access to stored box specs. It changes no runtime behavior. The code change is planned as a follow-up, so merging carries no meaningful risk.

Pre-merge checks: Passed 4

Check name Status Explanation
Title check Passed The title uses a Conventional Commit form (docs(spec): ...) and describes the main change: a box's stored spec becomes readable only by the daemon's user, per spec 29. This matches the amendment that …
Description check Passed The description covers the change (BOX-232 and its sub-bullet), the rationale (env_vars exposure on shared hosts), and the scope (code deferred to T139). It links related issues (Refs #3761, Refs #223…
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: Title check

Explanation

The title uses a Conventional Commit form (docs(spec): ...) and describes the main change: a box's stored spec becomes readable only by the daemon's user, per spec 29. This matches the amendment that adds BOX-232. It is a bit long at 79 characters, but it is specific and related to the changeset.

Full details: Description check

Explanation

The description covers the change (BOX-232 and its sub-bullet), the rationale (env_vars exposure on shared hosts), and the scope (code deferred to T139). It links related issues (Refs #3761, Refs #2236). It omits the template's Testing section and the Checklist, and it does not state whether the 'Docs updated' item applies. Its content is otherwise complete for a documentation-only change.

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

Warning

Some tools did not complete. Review the errors below.

Vale (3.24.0)

{
"Line": 13,
"Path": ".vale.ini",
"Text": "Style 'ste' isn't on the StylesPath (/styles). If it's a package, run vale sync.",
"Code": "E201",
"Span": 23
}

I am a rabbit; I read the new rule.
Specs stay tucked where only their owner may roam.
Store doors close to the proper mode.
Old paths are tightened before requests begin.
I thump my paws: BOX-232 is in place!

Recent review info

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Essentials
  • Run ID: 88bb638e-e51e-4171-a397-16527622047c
Commits

Reviewing files that changed from the base of the PR and between 5d1b0e5 and 150c615.

Files selected for processing: 1

  • docs/specs/29-spec-box-local-first/29-spec-box-local-first.md

Included review availability: This review used your included allowance. 2 included reviews remain after this review. Your included PR review attempts over the past 7 days set your current allowance at 3 review 8000 s per hour.

@github-actions
Copy link
Copy Markdown
Contributor

Spec lint

docs/specs/29-spec-box-local-first/29-spec-box-local-first.md — 24 finding(s)

docs/specs/29-spec-box-local-first/29-spec-box-local-first.md:72: P004 BOX-004 names test 'name_belongs_to_one_box_on_host_until_reaped_or_renamed', which was not found in the repository
docs/specs/29-spec-box-local-first/29-spec-box-local-first.md:91: P004 BOX-212 names test 'derived_name_taken_takes_smallest_free_number_never_refused', which was not found in the repository
docs/specs/29-spec-box-local-first/29-spec-box-local-first.md:101: P004 BOX-220 names test 'create_without_written_name_derives_from_project_and_entry_for_every_client', which was not found in the repository
docs/specs/29-spec-box-local-first/29-spec-box-local-first.md:114: P004 BOX-218 names test 'concurrent_creations_never_share_a_name', which was not found in the repository
docs/specs/29-spec-box-local-first/29-spec-box-local-first.md:122: P004 BOX-219 names test 'create_failure_before_run_leaves_no_box_and_frees_name', which was not found in the repository
docs/specs/29-spec-box-local-first/29-spec-box-local-first.md:126: P004 BOX-221 names test 'numbered_creation_returns_name_not_taken_and_reason', which was not found in the repository
docs/specs/29-spec-box-local-first/29-spec-box-local-first.md:131: P004 BOX-227 names test 'box_name_never_read_from_stored_spec_rename_changes_record_only', which was not found in the repository
docs/specs/29-spec-box-local-first/29-spec-box-local-first.md:136: P004 BOX-228 names test 'record_keeps_name_origin_written_or_derived', which was not found in the repository
docs/specs/29-spec-box-local-first/29-spec-box-local-first.md:141: P004 BOX-217 names test 'name_comparison_ignores_case', which was not found in the repository
docs/specs/29-spec-box-local-first/29-spec-box-local-first.md:148: P004 BOX-223 names test 'upgrade_keeps_legacy_names_including_default', which was not found in the repository
docs/specs/29-spec-box-local-first/29-spec-box-local-first.md:152: P004 BOX-005 names test 'unqualified_name_resolves_to_the_box_that_has_it', which was not found in the repository
docs/specs/29-spec-box-local-first/29-spec-box-local-first.md:160: P004 BOX-007 names test 'written_name_not_label_reserved_or_id_form_exit3', which was not found in the repository
docs/specs/29-spec-box-local-first/29-spec-box-local-first.md:327: P004 BOX-232 names test 'spec_json_is_written_owner_only', which was not found in the repository
docs/specs/29-spec-box-local-first/29-spec-box-local-first.md:346: P004 BOX-158 names test 'list_returns_every_retained_record_with_state_project_and_entry', which was not found in the repository
docs/specs/29-spec-box-local-first/29-spec-box-local-first.md:398: P004 BOX-229 names test 'expanded_spec_entry_names_its_entry', which was not found in the repository
docs/specs/29-spec-box-local-first/29-spec-box-local-first.md:403: P004 BOX-214 names test 'project_name_declared_else_root_directory', which was not found in the repository
docs/specs/29-spec-box-local-first/29-spec-box-local-first.md:407: P004 BOX-215 names test 'project_name_from_directory_bytes_is_dns_label', which was not found in the repository
docs/specs/29-spec-box-local-first/29-spec-box-local-first.md:412: P004 BOX-216 names test 'invalid_project_name_exit3_not_converted', which was not found in the repository
docs/specs/29-spec-box-local-first/29-spec-box-local-first.md:420: P004 BOX-224 names test 'singular_entry_table_exit3_names_plural', which was not found in the repository
docs/specs/29-spec-box-local-first/29-spec-box-local-first.md:536: P004 BOX-230 names test 'loadout_env_var_literal_stored_as_written', which was not found in the repository
docs/specs/29-spec-box-local-first/29-spec-box-local-first.md:541: P004 BOX-231 names test 'credential_like_env_var_name_warns', which was not found in the repository
docs/specs/29-spec-box-local-first/29-spec-box-local-first.md:594: P004 BOX-182 names test 'loadout_file_ask_without_terminal_denied', which was not found in the repository
docs/specs/29-spec-box-local-first/29-spec-box-local-first.md:620: P004 BOX-225 names test 'allow_dns_hosts_rule_for_sibling_without_that_name_warns', which was not found in the repository
docs/specs/29-spec-box-local-first/29-spec-box-local-first.md:625: P004 BOX-226 names test 'expansion_reports_name_and_project_name_provenance', which was not found in the repository

Advisory. None of this blocks the merge; the review decides.

Advisory, and never a merge gate. Linter: gominimal/foundry@8acb0663, spec format: How Minimal Writes Specs.

@minimal-foundry
minimal-foundry Bot commented Nov 24, 2026 •
Copy link
Copy Markdown
Contributor

Approved: no findings at 150c615283c9.

Nothing to do.

Clobber: none.

@minimal-arch minimal-arch Bot left a comment
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

arch-review: PASS · the full ruling

BOX-232 makes the stored spec readable and writable only by the user that runs minimald. The design gives the box record to minimald alone (architecture.md line 521) and keeps secrets out of specs (line 1023). The design names no file mode, so this amendment narrows access and contradicts no line. The sub-bullet tightens old wide files before the store serves a request, so it fails closed. The code follows as plan task T139, filed on #3761.

Ruled at 150c615 against gominimal/arch@4f2eb87d5d12 by claude-opus-5-5.

@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.

Panel: 3 of 3 personas ran (correctness, security, supply-chain).

@minimal-foundry minimal-foundry Bot added the review:approved minimal-review approved the current head label Nov 24, 2026
@mitodrummer mitodrummer left a comment
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Approved.

@mitodrummer
mitodrummer added this pull request to the merge queue Nov 24, 2026
Merged via the queue into main with commit 31e5769 Nov 24, 2026
42 checks passed
@mitodrummer
mitodrummer deleted the docs/box-store-owner-only branch November 24, 2026 19:36
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

0