You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: openspec/changes/v0-3-structured-shell-analysis/specs/bounded-shell-analysis/spec.md
+10-1Lines changed: 10 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -185,7 +185,11 @@ MAY establish those constraints only when it cannot define or mutate loop-bound
185
185
variables or policy-relevant command identities. `-NoProfile -NonInteractive`
186
186
alone SHALL NOT satisfy the contract. Exact and finite
187
187
binding analysis SHALL remain limited to ordinary unscoped names that do not
188
-
case-insensitively collide with automatic, constant, or read-only variables.
188
+
case-insensitively collide with automatic, constant, read-only, typed,
189
+
validated, preference, or configuration variables known to the supported
190
+
PowerShell runtime. The preference inventory SHALL include documented lazy and
191
+
configuration-dependent names even when a fresh `Get-Variable` inventory omits
192
+
them.
189
193
Scoped/provider binding forms SHALL fail closed.
190
194
191
195
Current-runspace groups, `$()`, and static `Invoke-Expression` payloads SHALL
@@ -211,6 +215,11 @@ initial-state assertion.
211
215
-**THEN** default-mode analysis does not claim the authored strings are the effective loop values
212
216
-**THEN** selecting isolated mode for that reused runspace would violate the caller contract
213
217
218
+
#### Scenario: Built-in preference binding is not an ordinary string slot
219
+
-**WHEN** isolated-mode PowerShell parses a loop binding named `ConfirmPreference`, `ErrorActionPreference`, or another known built-in preference or configuration variable
220
+
-**THEN** the complete loop region is unparseable
221
+
-**THEN** the analyzer does not assume assignment avoids type coercion, validation, rejection, or host-behavior changes
222
+
214
223
#### Scenario: Child host does not inherit the parent's assertion
215
224
-**WHEN** isolated-mode PowerShell parses a supported `pwsh -NoProfile -Command` child containing a `foreach`
216
225
-**THEN** the child receives `Unknown` initial state unless the child invocation independently proves the complete constrained-host environment
0 commit comments