Remove ScriptBlock exemption for AuthSessionBroker#190
Merged
Conversation
- Remove ValidateAuthSession ScriptBlock property from broker object - Call Assert-IdleAuthSessionMatchesType directly instead of via stored ScriptBlock - Remove exemption for IdLE.AuthSessionBroker in Assert-IdleNoScriptBlock - Update tests to reflect new boundary enforcement - Add comprehensive trust boundary enforcement tests Co-authored-by: blindzero <13959569+blindzero@users.noreply.github.com>
- Format multi-line assertion for better readability - Use explicit code block for improved clarity Co-authored-by: blindzero <13959569+blindzero@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Minimize and document ScriptBlock exemptions for AuthSessionBroker
Remove ScriptBlock exemption for AuthSessionBroker
Feb 13, 2026
blindzero
approved these changes
Feb 13, 2026
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
Contributor
There was a problem hiding this comment.
Pull request overview
This PR eliminates the ScriptBlock exemption for AuthSessionBroker objects, strengthening IdLE's security boundaries by ensuring uniform ScriptBlock validation across all data-only inputs.
Changes:
- Removed
ValidateAuthSessionScriptBlock property from broker objects, replaced with direct function calls toAssert-IdleAuthSessionMatchesType - Deleted type-based exemption logic in
Assert-IdleNoScriptBlock, achieving zero exemptions - Added comprehensive regression tests verifying ScriptBlocks are rejected in workflows, provider maps, lifecycle requests, and broker properties
- Documented trust boundaries in
security.mddistinguishing untrusted data inputs from trusted extension points
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| src/IdLE.Core/Public/Assert-IdleNoScriptBlock.ps1 | Removed IdLE.AuthSessionBroker exemption logic and updated comment-based help to remove outdated .NOTES section |
| src/IdLE.Core/Public/New-IdleAuthSessionBroker.ps1 | Eliminated ValidateAuthSession property, removed cached Get-Command call, replaced with direct Assert-IdleAuthSessionMatchesType calls |
| tests/Core/Assert-IdleNoScriptBlock.Tests.ps1 | Added regression tests for trust boundary enforcement including broker validation, workflow rejection, provider map validation, and lifecycle request checks |
| docs/about/security.md | Documented trust boundaries, defined untrusted vs trusted inputs, specified AuthSessionBroker trust model and ScriptBlock handling rules |
| docs/extend/extensibility.md | Added security reference pointing to trust boundaries documentation |
blindzero
approved these changes
Feb 13, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
AuthSessionBroker objects stored a validation ScriptBlock as a property, requiring an exemption in
Assert-IdleNoScriptBlock. This exemption created boundary confusion between trusted extension points and untrusted data inputs.Changes
Eliminated ScriptBlock storage
ValidateAuthSessionproperty from broker objectsAssert-IdleAuthSessionMatchesTypedirectly inAcquireAuthSessionmethodRemoved exemption logic
IdLE.AuthSessionBrokerinAssert-IdleNoScriptBlockDocumented trust boundaries
docs/about/security.mdAdded regression tests
Security Impact
ScriptBlock exemptions: 1 → 0
No increase in allowed ScriptBlock surface for untrusted inputs. Broker external contract unchanged.
Original prompt
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.