Skip to content

Commit 9521467

Browse files
JarLobasgerf
andauthored
Update actions/ql/lib/codeql/actions/Bash.qll
Co-authored-by: Asger F <[email protected]>
1 parent 6d94168 commit 9521467

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

actions/ql/lib/codeql/actions/Bash.qll

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -699,13 +699,13 @@ module Bash {
699699
// VAR2=$(cmd)
700700
// VAR3=$VAR2
701701
// echo "FIELD=${VAR3:-default}" >> $GITHUB_ENV (field, file_write_value)
702+
containsCmdSubstitution(value2, cmd) and
702703
script.getAnAssignment(var2, value2) and
704+
containsParameterExpansion(value3, var2, _, _) and
703705
script.getAnAssignment(var3, value3) and
706+
containsParameterExpansion(expr, var3, _, _) and
704707
not varMatchesRegexTest(script, var2, alphaNumericRegex()) and
705-
not varMatchesRegexTest(script, var3, alphaNumericRegex()) and
706-
containsCmdSubstitution(value2, cmd) and
707-
containsParameterExpansion(value3, var2, _, _) and
708-
containsParameterExpansion(expr, var3, _, _)
708+
not varMatchesRegexTest(script, var3, alphaNumericRegex())
709709
)
710710
or
711711
// var reaches the file write directly

0 commit comments

Comments
 (0)