Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Windows sandbox: one PATH folder whose permissions can't be read breaks every later helper start

Open
#163 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
52/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Active
Tech stack
rust, typescript
Domain
desktop, security

Research direction

Read win.rs around RecoveryRecord::undo (1216–1290), recover_abandoned_runs (1293–1335), and the grant logic (1588–1594, 1688–1708). Start by running the Rust tests for sandbox recovery; the issue requests a test where one failed undo does not prevent other records from recovering. Done means access-denied revocation is handled safely and recovery continues per record, quarantining records after repeated failures.

Written by the indexing model from the issue text.

Description

bug platform: windows priority: medium severity: high

Found in the 2026-10-07 code review (traced through the code; not reproduced with a real folder that denies reading its permissions). Related to #152, which has a different trigger.

Problem

  • run records every existing read_only path in record.granted before granting, and ignores grant failures for non-required paths (win.rs:1588-1594, 1688-1708).
  • RecoveryRecord::undo (win.rs:1216-1290) calls edit_acl(path, sid, 0, Revoke) for each one. That starts with GetNamedSecurityInfoW and returns Err when the permissions can't be read.
  • The record is kept, and DeleteAppContainerProfile is skipped. On the next start, recover_abandoned_runs (win.rs:1293-1335) hits the same error, serve sends Error{id:null}, and the helper exits.

Scenario

PATH contains a folder that exists but whose permissions the user can't read (for example an admin's tool folder added machine-wide, or a restricted share). After the first sandboxed command, every sandboxed command fails with "cannot read the permissions of X". This lasts until the user deletes the record under %LOCALAPPDATA%\Patch\sandbox-recovery by hand.

Fix

  • When revoking, treat ERROR_ACCESS_DENIED from GetNamedSecurityInfoW as "nothing to undo". Without READ_CONTROL/WRITE_DAC the grant could never have been applied.
  • Recover each record on its own: log a failure, keep going with the other records, and quarantine a record after N failed attempts instead of aborting the helper.
  • Rust test: one record whose undo fails, with the other records still recovered.
Dominant language
TypeScript
Stars
2
Forks
2
Avg merge
5h 52m
Merged PRs (30d)
18

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from PierrunoYT/patch

All issues in PierrunoYT/patch

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.