gstack/browse
IntegriGit 6fd1ef383a fix(browse): grant Windows ACLs to token SID, not bare username
restrictFilePermissions / restrictDirectoryPermissions passed
os.userInfo().username straight to `icacls /grant`. On a domain-joined
Windows host that also has a *local* account of the same login name,
icacls resolves the bare name to the LOCAL account (e.g. HOST\user), not
the domain account the process runs as (e.g. DOMAIN\user). Combined with
`/inheritance:r`, the new single-entry ACL is granted to an account the
process is NOT, locking it out of the .gstack state dir it just created.
The browse daemon then can't create its lock/state file and startup fails
with a misleading "Another instance is starting... Timed out."

Fix: resolve the current process token SID via System32\whoami.exe
(absolute path, so a shadowing Unix `whoami` on PATH can't hijack it) and
grant `*<SID>`, which is immune to local-vs-domain name collisions. Fall
back to USERDOMAIN\username, then bare username, if the SID lookup is
unavailable. Cached per process.

Adds a regression test asserting the resolved principal is a SID literal
(*S-1-5-...) on Windows and a non-empty name-based fallback off-Windows.

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-07-04 00:15:21 -04:00
..
bin feat: multi-agent support — gstack works on Codex, Gemini CLI, and Cursor (v0.9.0) (#226) 2026-03-19 18:20:50 -07:00
scripts fix: ngrok Windows build + close CI error-swallowing gap (v0.18.0.1) (#1024) 2026-04-16 13:49:04 -07:00
src fix(browse): grant Windows ACLs to token SID, not bare username 2026-07-04 00:15:21 -04:00
test fix(browse): grant Windows ACLs to token SID, not bare username 2026-07-04 00:15:21 -04:00
PLAN-snapshot-dropdown-interactive.md fix: snapshot -i auto-detects dropdown/popover interactive elements (#845) 2026-04-05 22:57:45 -07:00
SKILL.md v1.58.5.0 feat: first-run activation scaffold + gstack router front door (#2078) 2026-06-25 09:42:45 -07:00
SKILL.md.tmpl v1.57.8.0 feat: browse js/eval --out render-to-file (canonical Chromium for offline rendering) (#1929) 2026-06-09 21:02:30 -07:00