diff --git a/libraries/botbuilder-lg/src/evaluationOptions.ts b/libraries/botbuilder-lg/src/evaluationOptions.ts index 87092ea052..a2cac51423 100644 --- a/libraries/botbuilder-lg/src/evaluationOptions.ts +++ b/libraries/botbuilder-lg/src/evaluationOptions.ts @@ -87,10 +87,7 @@ export class EvaluationOptions { this.strictMode = true; } } else if (key.toLowerCase() === this.replaceNullKey.toLowerCase()) { - // eslint-disable-next-line @typescript-eslint/no-unused-vars - this.nullSubstitution = (path) => - // eslint-disable-next-line security/detect-eval-with-expression - eval('`' + value.replace(this.nullKeyReplaceStrRegex, '${path}') + '`'); // CodeQL [SM04509] Eval on content that is from a trusted source + this.nullSubstitution = (path) => value.replace(this.nullKeyReplaceStrRegex, `${path}`); } else if (key.toLowerCase() === this.lineBreakKey.toLowerCase()) { this.LineBreakStyle = value.toLowerCase() === LGLineBreakStyle.Markdown.toString().toLowerCase()