I need to read some files, and get some specific information from them using something like regex, at compile time. I don't think this is possible without shell-escape enabled, as i will have to run an external shell script. My problem is that i often compile files without knowing their content, so i am concerned about security.
Is it somehow possible to specify a specific program that is runable from within tex, without making every program runable?
General ⇒ Compiling with shell-escape safely - or equivalent.
- Ijon Tichy
- Posts: 640
- Joined: Mon Dec 24, 2018 10:12 am
Compiling with shell-escape safely - or equivalent.
TeX Live provides a safe list in texmf.cnf → shell_escape_commands. However adding a shell to shell_escape_commands is never really safe. So it would be better to add --shell-escape only to the LaTeX runs of those documents you need it and you know what you are doing.
The LaTeX3 kernel packages provide regular expressions. See part XXVIII in interface3.
The LaTeX3 kernel packages provide regular expressions. See part XXVIII in interface3.
Sorry, but I can no longer participate here as the administrator is trampling on my wishes on one of his other platforms. 

Compiling with shell-escape safely - or equivalent.
Thank you for your answer I did not know regex was possible I'll look into using it with something like texosquery.