feat(win): icacls ACLs for secret files (#43-B) → 1.30.0 - #118
Merged
Conversation
POSIX mode bits (0o600/0o700) are no-ops on NTFS — secret files were unprotected on native Windows. New cross-platform secure-perms helper: chmod on POSIX, 'icacls /inheritance:r /grant:r <user>:F' on Windows (strip inheritance, grant only the current user). Wired into the secret stores: memory.db + dir, mcp-tokens.json + dir, elevation.key, totp-secret. POSIX behavior byte-identical (63 perm tests still green on macOS); Windows branch verified via the probe. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
✅ Docker image built successfully
|
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.
Your call on #43-B (full ACLs). POSIX
0o600/0o700are no-ops on NTFS → kit's secret files were unprotected on native Windows.New
src/utils/secure-perms.ts:secureFile/secureDir—chmodon POSIX,icacls /inheritance:r /grant:r <user>:Fon Windows (strip inheritance, grant only the current user;(OI)(CI)for dirs). Wired into the secret stores:memory.db(+dir),mcp-tokens.json(+dir),elevation.key,totp-secret.windows-latestprobe.The remaining Windows test gaps (build ✓, 1526/1542 pass) are fully mapped on #43 with exact files/lines, split into: real path fixes (clone, mise-path, memoryDirInsideRepo, plugin loader, resolveTool), accept-the-gap skips (bumblebee binary unavailable on win32; BitLocker state in disk-encryption), and perm-test mode-bit assertions to make platform-aware. That's a focused dedicated port (with some accept-the-gap judgment calls), now scaffolded by the probe + verify-loop.
🤖 Generated with Claude Code