Replies: 6 comments 9 replies
-
Hi @kislyuk, there does exist an |
Beta Was this translation helpful? Give feedback.
-
I think there are two different areas of concern regarding code injection in WDL. One is the case where a string is used by the runtime. For example, if the WDL runtime interprets a File string as a GCS path and generates a I would say that the first set of cases is in the domain of a WDL runtime implementor and may be mentioned in the spec as something to pay attention to, but not as a required part of a WDL implementation. Regarding string interpolation inside a command block, I agree that WDL should provide help so WDL script writers don't have to worry about this problem. The only risk I see in changing string interpolation behavior is that a command block can contain other languages besides a shell script, such as using a |
Beta Was this translation helpful? Give feedback.
-
In chanzuckerberg/miniwdl#496 we have a prototype of evolving the current However, I also have a prototype (#458) of automatically propagating WDL task values into environment variables. I think this might be a slightly better solution to this problem, as you then just have to handle the environment variables using standard bash practices (which admittedly has pitfalls of its own, but at least well-known ones). |
Beta Was this translation helpful? Give feedback.
-
this came up in a product discussion I was having around security today. I would be a very strong advocate for including this behaviour in WDL ASAP |
Beta Was this translation helpful? Give feedback.
-
@kislyuk Hi yes, I understand the concern. I was being mostly facetious. My point was that a WDL script is running a shell script by the engine w/o question anyways - and at that point what are you gaining. That said, I'm not at all opposed to putting up roadblocks. |
Beta Was this translation helpful? Give feedback.
-
Hello all, I did want to come back to this thread and share that there is an open pr for introducing a way to define inputs as environment variables into the WDL specification. You can see and comment on the thread here: #504 |
Beta Was this translation helpful? Give feedback.
-
By default, WDL is not hardened vs. string injection attacks in placeholder expression string interpolations in command blocks, etc. Given malicious input, this can lead to straightforward escape into the enclosing container and possibly beyond, breakage of multi-user isolation boundaries, etc. and so it must be assumed that all WDL inputs are fully trusted. This necessitates comprehensive input validation logic before inputs can be fed to the WDL itself. For usability in environments where the implementer must take reasonable care to defend against malicious input, it would be nice to have a string escape mechanism like
~{quote(var)}
which would emit a double-quoted string with any quotes inside escaped.Beta Was this translation helpful? Give feedback.
All reactions