Repository navigation
fix(host-kit): accept a group-writable script directory the user owns - #4799
Conversation
The destination rule refused every non-sticky group-writable directory. Under umask 002 every directory a user creates is 0775, so a --save-script path in an ordinary checkout was refused until the chain was closed with chmod g-w. The owner of a directory chose its group, so the rule now accepts a group-writable directory the current non-root user owns, to pass through, to hold the entry and to hold a link. Still refused: a directory another user owns, a non-sticky world-writable directory, a group-writable directory root owns, and the entry directly inside a shared sticky directory. Private ancestry and the daemon state root keep refusing every group-writable directory. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Size Report
Startup median (7 runs, lower is better):
|
The decision tables name fixed user ids, so no answer depends on the account that runs the suite. A level this user owns at 0775 that wins the mkdir race is covered as adopted. ADR 0016 and the replay docs now state the exception the rule leaves: the members of the group of a directory this user owns and left group-writable can replace an entry or create the script name first. The rule accepts that group as the owner's responsibility. The creation, state-root and leftover-directory statements match the code. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
|
This PR is ready at 2067a81. The only production change is |
This comment has been minimized.
This comment has been minimized.
There was a problem hiding this comment.
Apex Sentinel: 1 new finding on 2067a81. The verdict and the full list are in the summary comment.
On the script route shared_group_writable now fires only for a directory root owns, and its hint told the caller to run chmod g-w there, which only root can do. The judgment already knows the owner, so it passes that to the refusal: a directory the caller owns keeps the chmod g-w hint, and any other answers to save under a directory the caller owns. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
|
Still ready at dd4a7b5. The |
Apex Sentinel · ✅ Approve · review of
|
| Command | What it does |
|---|---|
@apex-sentinel-staging note <context> |
Adds context; Sentinel re-checks the cited code |
@apex-sentinel-staging pivot <why> |
Says the finding is wrong; Sentinel re-checks the cited code |
@apex-sentinel-staging like |
Marks the finding as useful |
@apex-sentinel-staging dislike <why> |
Marks it as not useful, so it is not raised again |
On this conversation, comment @apex-sentinel-staging review to run a full review once again.
* origin/main: (70 commits) refactor(apple-runner): one RUNNER_ERROR_CODES row per runner error code with parity/docs gates (callstack#4774) fix(android): require acknowledgements for test IME typing (callstack#4722) feat(scroll): add scroll refresh for pull-to-refresh (callstack#4770) refactor(host-kit): add request Scope and use it for the wait capture deadline (callstack#4794) fix(android): let permission all change nothing on an app that declares no permissions (callstack#4796) fix(cli): replace the CLI session and generated remote config instead of rewriting them in place (callstack#4797) fix(host-kit): accept a group-writable script directory the user owns (callstack#4799) fix(cli): escape control characters at the CLI's stdout and stderr writes (callstack#4778) fix(audit): do not report rows under a persistent bar that scrolling reveals (callstack#4775) fix(daemon): refuse an unsafe state directory before first use (callstack#4783) refactor: settle remaining single-deadline races through settleWithin (callstack#4788) refactor(host-kit): settle deadline races via settleWithin with R87 race ratchet (callstack#4766) fix(android): authenticate and bound persistent snapshot helper sessions (callstack#4729) fix(daemon): bound upload ingress and finalization (callstack#4721) chore(gates): ratchet wire-published reason literals by value (R89) (callstack#4779) feat(audit): evaluate role-less clickable views on Android (callstack#4780) fix(mutation): keep umask-setting tests out of Stryker's thread pool (callstack#4785) feat(audit): report controls that share one accessible name (callstack#4771) fix(contracts): pair open runtime hints with their apply operation (callstack#4754) refactor(daemon): report startup progress over the launch channel instead of marker files (callstack#4777) ...
* origin/main: feat(gesture): hold before the move with gesture pan --hold-ms (#4767) docs: clarify device verification and security proposals (#4805) fix(daemon-client): say that a hung daemon is stopped before ensureDaemon starts a new one (#4803) test: remove five timing races from CI (#4800) refactor(remote): save a remote script from memory with the local publisher (#4802) refactor(apple-runner): one RUNNER_ERROR_CODES row per runner error code with parity/docs gates (#4774) fix(android): require acknowledgements for test IME typing (#4722) feat(scroll): add scroll refresh for pull-to-refresh (#4770) refactor(host-kit): add request Scope and use it for the wait capture deadline (#4794) fix(android): let permission all change nothing on an app that declares no permissions (#4796) fix(cli): replace the CLI session and generated remote config instead of rewriting them in place (#4797) fix(host-kit): accept a group-writable script directory the user owns (#4799)
Summary
--save-scriptnow accepts a group-writable directory that the current non-root user owns, to pass through, to hold the script and to hold a link. Under umask 002 every directory a user creates is0775, soopen --save-script=./flows/login.adin an ordinary checkout was refused untilchmod g-w. This reverses the group rule from #4565 by maintainer decision: the rule accepts that directory's group as its owner's responsibility.Still refused: a directory another user owns (
foreign_owned), a non-sticky world-writable directory (world_writable), a group-writable directory root owns (shared_group_writable), and the entry directly inside a shared sticky directory (shared_parent). The Swift helper cache and the daemon state root stay as strict as before. No new option. 10 files.Security pass
Reviewed as another non-root local user:
Validation
At dd4a7b5: typecheck, lint, format, layering and
fallow audit --base origin/mainpass. Host-kit, host-swift, daemon-contracts, remote and daemon core suites pass. Each new case fails when its part of the rule is broken.check:affectedwas not run; CI validates the rest.🤖 Generated with Claude Code