mirror of
https://github.com/RooVetGit/Roo-Code.git
synced 2026-08-28 05:27:24 +00:00
Potential fix for code scanning alert no. 189: Inefficient regular expression
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
This commit is contained in:
parent
37faf01202
commit
c9c4333589
1 changed files with 1 additions and 1 deletions
|
|
@ -127,7 +127,7 @@ export function containsDangerousSubstitution(source: string): boolean {
|
|||
// Check for $"..." string interpolation with command substitution
|
||||
// $"..." is a bash feature for translated strings that allows command substitution inside
|
||||
// Handle escaped quotes within $"...": use (?:\\.|[^"])* to avoid premature termination on \"
|
||||
const bashTranslatedStringWithSubstitution = /\$"(?:\\.|[^"])*(?:\$\(|`)(?:\\.|[^"])*"/.test(source)
|
||||
const bashTranslatedStringWithSubstitution = /\$"(?:\\.|[^\\"])*(?:\$\(|`)(?:\\.|[^\\"])*"/.test(source)
|
||||
|
||||
// Return true if any dangerous pattern is detected
|
||||
return (
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue