diagnose-windows-sandbox-acl
Warn
Audited by Gen Agent Trust Hub on Oct 23, 2026
Risk Level: MEDIUMDYNAMIC_EXECUTIONCOMMAND_EXECUTIONPRIVILEGE_ESCALATIONINDIRECT_PROMPT_INJECTION
Full Analysis
- [DYNAMIC_EXECUTION]: The script
scripts/diagnose-windows-sandbox-acl.ps1utilizes theAdd-Typecmdlet to compile C# source code into the PowerShell session at runtime. This embedded code provides access to low-level Windows APIs via P/Invoke (advapi32.dllandkernel32.dll) to check token integrity levels and directly manipulate security descriptors usingSetNamedSecurityInfoW. - [COMMAND_EXECUTION]: The skill invokes the Windows system utility
icacls.exeto read and remove Access Control Entries (ACEs). It also dynamically generates and writes recovery scripts to the disk to allow for permission rollbacks. - [PRIVILEGE_ESCALATION]: The skill is designed to modify file system permissions, including granting "Full Control" to the current user and removing package-specific restrictions. Although it does not attempt to bypass User Account Control (UAC) or run with Administrative privileges, the ability to alter security policy is a sensitive capability. The script attempts to mitigate this risk through several checks: enforcing a user-defined
-AllowRootboundary, explicitly refusing to touch drive roots, the Windows directory, or the user profile, and blocking the traversal of reparse points (symbolic links/junctions) to prevent path manipulation attacks. - [INDIRECT_PROMPT_INJECTION]: The skill processes untrusted path data which could theoretically be used to target sensitive files if the validation logic is bypassed.
- Ingestion points: File paths provided via the
-Pathand-AllowRootparameters inscripts/diagnose-windows-sandbox-acl.ps1. - Boundary markers: The
SKILL.mdfile requires the agent to generate a plain-language approval request for the user, detailing the specific folder and permissions being modified. - Capability inventory: The script possesses DACL write capabilities and system command execution permissions.
- Sanitization: The script implements path normalization and validation against a list of "dangerous roots" and prevents execution on reparse points.
Audit Metadata