Subject: | Security: Test generates predictable filename in /tmp |
Today I took a glance at the source of t/Bomb.t for a (probably unrelated) separate issue, I discovered the test creates a file in /tmp with a predictable filename:
https://metacpan.org/source/DAV/Test-Bomb-0.007/t/Bomb.t#L7
https://metacpan.org/source/DAV/Test-Bomb-0.007/t/Bomb.t#L12
https://metacpan.org/source/DAV/Test-Bomb-0.007/t/Bomb.t#L108
May I suggest that this be amended to use File::Temp to produce (1) unpredictable files?
Predictable filenames in /tmp have rather nasty security implications when people run the tests as root so should be avoided. You can read up on the topic at http://www.linuxsecurity.com/content/view/115462/151/
Thanks!