Repository navigation
fix(security): reject inherited writes at Windows creation parents - #8011
Conversation
|
No actionable comments were generated in the recent review.
|
| Layer / File(s) | Summary |
|---|---|
ACL policy semantics and validation src/lib/windows-owner-acl.ts, tests/windows/windows-codex-cli-job-store.test.ts, structure/codex-cli-update.md, structure/remote-link.md |
write-private evaluates inherit-only ACEs, while trusted-ancestry skips them on existing ancestors. The code allows broad create rights under trusted-ancestry only for non-inherit-only ACEs of sticky trusted owners. Tests cover inherit-only grants and mixed-policy batches. Documentation describes the policies and the separate requirements for direct creation parents. |
Priority:
Estimated code review effort: 2 (Simple) | ~10 minutes
Change: Bug fix
Possibly related issues
- Issue 7872 in
lidge-jun/opencodex: The ACL helper and Windows updater tests overlap with its parent-admission scope. This change addresses the creation-parent ACL portion, but does not establish completion of the synchronous recovery refactor or all follow-up items. - Issue 2811 in
lidge-jun/opencodex: This change covers an ACL check within the broader update workflow. It does not implement the complete provenance-aware update manager.
Suggested reviewers: lidge-jun
Merge Risk: 
Minimal · up to 966a1
-
Windows ACL checks now reject inherited write/create grants at directories where new children are created, while inherit-only templates on existing trusted ancestors are still ignored. No concrete merge-blocking risk was established. A rare edge case with an explicit inherit-only CREATOR OWNER template may be refused, and it can be handled as a follow-up policy decision.
Pre-merge checks: 
5
-
Full details: Title check
-
Explanation
The title names the main change: rejecting inherited write grants at Windows creation parents. The raw summary confirms the changes in windows-owner-acl.ts, the docs, and the tests all target that behavior. The title is 66 characters, which is within a reasonable length for a single-sentence title and uses the conventional fix(security) prefix.
Full details: Docstring Coverage
-
Explanation
Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 1 functions across 2 files. (2 skipped: 2 unsupported.)
-
Finishing Touches
-
🧪 Generate unit tests (beta)
-
- Create a new PR
-
- Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
Comment @coderabbitai help to get the list of available commands.
|
✅ Deterministic PR hygiene checks passed. |
|
Maintainer integration into
Thanks for the fix. |
Summary
Reject inherited write/create grants at Windows child-creation parents before a new child can be hardened. Keep inherit-only templates permitted on existing trusted ancestors, so a standard volume-root template does not reject an otherwise private descendant chain. Private leaf/directory validation remains unchanged.
Recovery drivers retain
write-privatefor actual creation parents andprivatefor created directories/leaves. The ACL change is limited to four files.Current validation
Head:
966a1d78efab1499558c7e356e5940b61b614120.Scope and limitations
Native fixtures substitute trusted ancestry above their private root. Cross-account and ARM64 behavior remain unverified. Tests use isolated homes; the explicit real-home deny-list handoff was verified for the follow-up, not retrospectively for the first run. Full import-graph coverage ran in hosted CI due to local Windows execution cost.
Two baseline findings are handled separately: #8009 covers feature-toggle selection ownership and remains open; #8010 covers hosted-tool eligibility and was merged into dev. Neither fix is part of this four-file ACL head. No host ACL, live configuration, account or permission mode was changed.
Checklist
Summary by CodeRabbit
Bug Fixes
Documentation