We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e6b5040 commit 1904b02Copy full SHA for 1904b02
actions/ql/lib/codeql/actions/Bash.qll
@@ -81,7 +81,9 @@ class BashShellScript extends ShellScript {
81
"qstr:" + k + ":" + i + ":" + j + ":" + quotedStr.length() + ":" +
82
quotedStr.regexpReplaceAll("[^a-zA-Z0-9]", "")
83
)
84
- )
+ ) and
85
+ // Only do this for strings that might otherwise disrupt subsequent parsing
86
+ quotedStr.regexpMatch("[\"'].*[$\n\r'\"" + Bash::separator() + "].*[\"']")
87
}
88
89
private predicate rankedQuotedStringReplacements(int i, string old, string new) {
0 commit comments