Problem Statement
IdLE enforces a “data-only / no ScriptBlocks” rule for untrusted inputs (workflows, request data, provider maps). At the same time, AuthSessionBroker is a trusted extension point and may contain ScriptMethods/ScriptBlocks by design.
This creates two risks:
- Boundary confusion: contributors may not clearly understand which objects are allowed to contain ScriptBlocks and why.
- Drift risk: exemptions in ScriptBlock validation logic may become too broad over time and accidentally allow ScriptBlocks in untrusted objects.
Proposed Solution
Make ScriptBlock handling around AuthSessionBroker explicit, minimal, and test-protected:
- Audit the current ScriptBlock validation logic and document:
- Exactly where ScriptBlocks are rejected
- Exactly what is exempted and why
- Minimize ScriptBlock surface on the broker object where feasible:
- Prefer not storing ScriptBlocks as properties (e.g., store a function/command name and resolve internally), or
- Keep the current model but ensure the exemption logic is narrowly scoped to trusted broker instances.
- Update security/architecture documentation to clearly define:
- “Trusted extension objects may contain code (ScriptMethods/ScriptBlocks).”
- “Untrusted inputs are data-only and must never contain ScriptBlocks.”
- One canonical place for this rule (other docs must reference it).
- Add tests that:
- Confirm ScriptBlocks are rejected in untrusted inputs (regression protection)
- Confirm the broker exemption is minimal (does not allow arbitrary ScriptBlocks elsewhere)
Alternatives Considered
- Keep everything as-is without explicit documentation/tests.
- Rejected: encourages silent drift and confusion.
- Remove broker concept entirely.
- Rejected: contradicts the host-agnostic auth/session orchestration design.
Impact
- Does this affect existing workflows?
- Potentially none if behavior stays identical; may affect custom brokers if implementation changes.
- Any backward compatibility concerns?
- If broker shape changes, document migration clearly. Prefer keeping external contract stable.
Acceptance Criteria:
- Documentation clearly defines trusted vs untrusted ScriptBlock rules (single source of truth).
- ScriptBlock validation exemptions are demonstrably minimal.
- Pester tests cover both rejection and allowed broker behavior.
Additional Context
Notes:
- This issue must stay within IdLE’s security guardrails: no “shortcuts” that weaken validation.
- Prefer the simplest implementation that reduces exemption complexity.
Definition of Done:
- Code + tests + docs updated.
- No increase in allowed ScriptBlock surface for untrusted inputs.
Problem Statement
IdLE enforces a “data-only / no ScriptBlocks” rule for untrusted inputs (workflows, request data, provider maps). At the same time,
AuthSessionBrokeris a trusted extension point and may contain ScriptMethods/ScriptBlocks by design.This creates two risks:
Proposed Solution
Make ScriptBlock handling around
AuthSessionBrokerexplicit, minimal, and test-protected:Alternatives Considered
Impact
Acceptance Criteria:
Additional Context
Notes:
Definition of Done: