Takes the original template literal, extracts its arguments and creates a new expression calling the tplOperator taint tracking function, using a new template literal but with the new extracted variables.
// original
const a = `Hello ${b}`
// rewritten
const a = (__datadog_test_0 = b, _ddiast.tplOperator(`Hello ${__datadog_test_0}`, __datadog_test_0))
Template literal rewriting is configurable via new csi method property (the same way as the + operator):
{ src: 'tplOperator', operator: true },
Motivation
Additional Notes
Describe how to test your changes
Checklist
[ ] The CHANGELOG.md has been updated
[ ] Unit tests have been updated and pass
[ ] If known, an appropriate milestone has been selected
What does this PR do?
tplOperator
taint tracking function, using a new template literal but with the new extracted variables.{ src: 'tplOperator', operator: true },
Motivation
Additional Notes
Describe how to test your changes
Checklist