-
-
Notifications
You must be signed in to change notification settings - Fork 8
Description
It would be very good to run PlantUML in a mode with minimal access privileges, in order to contain any potential security issues.
Luckily, PlantUML provides readily available means for this, as documented here.
Basically, it should be sufficient for PlantUML to have access to the input file to convert and the path to which it should write the result of the conversion.
This can be achieved as follows:
java -DPLANTUML_SECURITY_PROFILE=ALLOWLIST -D<list_of_paths> ...
The list of paths need to be combined using the ;
(on Windows) or :
(Linux/OSX) separator, like so
java -DPLANTUML_SECURITY_PROFILE=ALLOWLIST -Dplantuml.allowlist.path=/usr/common/:/usr/plantuml/ ...
I assume that the JRE needs access to only
- the folder than contains the PlantUML
.jar
file, - the folder with the current document or a temporary file from the figure source code,
- the target folder (
plots/
).
I have not yet tested this on my machine, and the details may need to be fine-tuned, but my main point is that it should be made the default behavior. Otherwise, any vulnerability in PlantUML puts the entire Pandoc machine at risk.