Skip to content

Commit 9adf028

Browse files
committed
PS: Fix environment variables.
1 parent bf9ed3b commit 9adf028

File tree

1 file changed

+5
-2
lines changed
  • powershell/ql/lib/semmle/code/powershell/ast/internal

1 file changed

+5
-2
lines changed

powershell/ql/lib/semmle/code/powershell/ast/internal/Synthesis.qll

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -675,8 +675,11 @@ private module LiteralSynth {
675675
s = "null" and
676676
child = SynthChild(NullLiteralKind())
677677
or
678-
Raw::isEnvVariableAccess(va, s) and
679-
child = SynthChild(EnvVariableKind(s))
678+
exists(string s0 |
679+
s = "env:" + s0 and
680+
Raw::isEnvVariableAccess(va, s0) and
681+
child = SynthChild(EnvVariableKind(s0))
682+
)
680683
or
681684
isAutomaticVariableAccess(va, s) and
682685
child = SynthChild(AutomaticVariableKind(s))

0 commit comments

Comments
 (0)