Files
ScadaBridge/docs
Joseph Doherty 29192eeb44 fix(script-analysis): inspect ?. member bindings and CreateDelegate in the trust gate (CMN-1, WP1 task 1.1)
The reflection-gateway check ran only in VisitMemberAccessExpression, so
recv?.GetMethod(...) (a MemberBindingExpression) was never inspected and
Delegate.CreateDelegate turned the MethodInfo into a callable delegate:
one character defeated the trust gate on all four call sites.

- HardeningWalker gains VisitMemberBindingExpression with the same check.
- CreateDelegate joins ReflectionGatewayMembers.
- Pass 1 also flags a gateway-named framework member reached as a bare
  identifier (using static System.Delegate / System.Type).

Tests: the review's probe script (compiles clean, now rejected, also on
the minimal fallback set), the ?. variant of every .-form rejection test,
every gateway member via ?., and legitimate ?. use stays clean.
2026-12-03 09:43:55 -05:00
..