fix(tool-pwsh): scope named-pipe warning

This commit is contained in:
Tianyi Cui
2026-08-10 17:55:09 +08:00
parent 9435ca62a6
commit be880473e2
2 changed files with 2 additions and 2 deletions

View File

@@ -125,7 +125,7 @@ function pwshDescription(backgroundEnabled: boolean, escalationModes: readonly S
+ 'workspace-write stays in FullLanguage unless host policy says otherwise. In read-only, prefer cmdlets and core types (`[string]`, `[datetime]`, `[regex]`, `[guid]`); '
+ '.NET static calls (`[System.IO.*]::`, `[math]::`), `Add-Type`, COM objects, and reflection fail '
+ 'with "only core types" errors. `-f` formatting, property access, and core cmdlets work. '
+ 'In the same modes, programs cannot open named pipes, so a command that captures another '
+ 'In both confined modes, programs cannot open named pipes, so a command that captures another '
+ 'program\'s output through piped stdio (Node.js `child_process.spawn`/`exec` with the default '
+ '`stdio: \'pipe\'`) fails with EPERM, while `stdio: \'inherit\'` and `stdio: \'ignore\'` spawns '
+ 'work and PowerShell\'s own pipelines are unaffected. That EPERM is the documented boundary: '

View File

@@ -560,7 +560,7 @@ describe('sandbox escalation through ctx.approval', () => {
expect(schema.description).toContain('approval prompt')
expect(schema.description).toContain('ConstrainedLanguage')
expect(schema.description).toContain('workspace-write stays in FullLanguage')
expect(schema.description).toContain('named pipes')
expect(schema.description).toContain('In both confined modes, programs cannot open named pipes')
expect(schema.description).toContain('fails with EPERM')
for (const args of [