Skip to content

Implementing direct variable replacement #2207

Answered by hikchoi
tma66 asked this question in General
Discussion options

You must be logged in to vote

What syntax should we adopt for this?

How about the ES2015 template delimiter? ${}

Implementation wise, lodash supports js execution. should we support this as well?

I think we can start off by offering a suite of useful predefined values and only allowing them in literal string substitution.

If we do allow js evaluation, is putting them behind workspace trust enough? Do we need to also add a way to completely disable this even within a trusted workspace?

I am not sure if even that is enough. Personally I think disallowing it is the way to go as to not invite any adversaries / becoming a threat vector. Unfortunately my security knowledge just about ends there so I'm not sure about the…

Replies: 3 comments 1 reply

Comment options

You must be logged in to vote
1 reply
@kevinslin
Comment options

Comment options

You must be logged in to vote
0 replies
Answer selected by tma66
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
4 participants