fix(agent): the Windows sandbox check says why a read-only folder was writable #63
No reviewers
Labels
No labels
kind
bug
kind
chore
kind
docs
kind
feature
kind
performance
kind
question
priority
critical
priority
high
priority
low
risk
high
risk
low
risk
medium
status
blocked
status
confirmed
status
duplicate
status
invalid
status
needs-info
status
wontfix
ci: approved
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
MagicBeanDev/Beanstalk!63
Loading…
Reference in a new issue
No description provided.
Delete branch "HumanBean/Beanstalk:fix/sandbox-check-why"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Why
In Longshot #1118, a tester's
beanstalk-agent sandbox-check(Windows 10.0.26200, Intel UHD, nightly-110) failedwrite_granted: the sandbox wrote a file in the folder it was only given to read. The check failed closed, as it should, so that PC has no sandbox and the farm sends it no jobs. But the report can't say why, and everything else in AppContainer mode passed.The agent sets only its own explicit permission entries (ACEs). If the folder inherits one from a parent folder that lets the sandbox write, or the drive keeps no permissions at all (FAT32, exFAT), the folder isn't read-only for the sandbox.
What changed
When
write_grantedfails, the check addsINFO write_granted_why:WinAcl.Sddl). This PC's account ids are cut (WinPipes.MaskSids) and the sandbox's SID is shown as<sandbox>. That shows which entry, inherited from where, lets it write.It's information only; what the farm requires doesn't change. The pipe lines in that report are expected: the plain pipe names can't be made in the sandbox, and the local name, which Longshot uses, works.
Testing
dotnet build agent/App -c Release: 0 warnings.sandbox-checkon a nightly with this gives the explanation.