Skip to content

feat(win): icacls ACLs for secret files (#43-B) → 1.30.0 - #118

Merged
sandstream merged 2 commits into
mainfrom
windows-ci/acls
Jun 24, 2026
Merged

feat(win): icacls ACLs for secret files (#43-B) → 1.30.0#118
sandstream merged 2 commits into
mainfrom
windows-ci/acls

Conversation

@sandstream

Copy link
Copy Markdown
Owner

Your call on #43-B (full ACLs). POSIX 0o600/0o700 are no-ops on NTFS → kit's secret files were unprotected on native Windows.

New src/utils/secure-perms.ts: secureFile/secureDirchmod on POSIX, icacls /inheritance:r /grant:r <user>:F on 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.

  • POSIX byte-identical (63 perm tests still pass on macOS; new helper unit-tested 2/2).
  • Windows branch exercised by the windows-latest probe.

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

sandstream and others added 2 commits June 24, 2026 20:44
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>
@github-actions

Copy link
Copy Markdown

✅ Docker image built successfully

  • CLI image: docker.io/sandstream/kit:test

@sandstream
sandstream merged commit 021aaef into main Jun 24, 2026
17 checks passed
@sandstream
sandstream deleted the windows-ci/acls branch June 24, 2026 18:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant