diff options
Diffstat (limited to 'stdlib/source/lux/world/environment.jvm.lux')
-rw-r--r-- | stdlib/source/lux/world/environment.jvm.lux | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/stdlib/source/lux/world/environment.jvm.lux b/stdlib/source/lux/world/environment.jvm.lux index 2a64c31f8..57ffcd465 100644 --- a/stdlib/source/lux/world/environment.jvm.lux +++ b/stdlib/source/lux/world/environment.jvm.lux @@ -1,5 +1,8 @@ (.module: [lux #* + [control + [security + ["." taint (#+ Dirty taint)]]] [data ["." text] [format @@ -9,6 +12,9 @@ [io (#- run)] [host (#+ import:)]]) +## Do not trust the values of environment variables +## https://wiki.sei.cmu.edu/confluence/display/java/ENV02-J.+Do+not+trust+the+values+of+environment+variables + (import: java/lang/String) (import: (java/util/Map$Entry k v) @@ -41,9 +47,10 @@ (Map$Entry::getValue entry)]) (def: #export read - (IO Context) + (IO (Dirty Context)) (io (|> (System::getenv) Map::entrySet Set::iterator (consume-iterator entry-to-kv) - (dictionary.from-list text.Hash<Text>)))) + (dictionary.from-list text.Hash<Text>) + taint))) |