DEV Community

Discussion on: Introducting command-builder

Collapse
 
suckup_de profile image
Lars Moelleken

Hi, thanks for this library. Very good idea. 💡 Maybe you should add escapeshellarg for the arguments: github.com/php/php-src/blob/master...

Collapse
 
anwar_nairi profile image
Anwar • Edited

Amazing, that will save me from escaping by hand! Thanks a lot for sharing!

Track the progress of the issue here

github.com/khalyomede/command-buil...

Collapse
 
suckup_de profile image
Lars Moelleken

Next step add a wrapper method for shell_exec and disallow shell_exec via e.g. php code sniffer, so that everybody in the project need to use command-builder with auto-escaping. === more secure 🔐

Thread Thread
 
anwar_nairi profile image
Anwar • Edited

Nice, I need to get some PoC for this, I will see if I can have something for php-cs-fixer (the one I use the most), thanks a lot for this great input Lars!!