perltaint

Is Perl's taint mode useful?


perl -T

Do you use it? Does it help you finding security holes in your Perl scripts?


Solution

  • More than that :) it stops your security issues before they become one. It is not a security silver bullet of course... we used to use it (a few years back when I was involved in Perl projects) in any script that was exposed externally (i.e. any mod_perl app) and we found it very useful and made it our policy. It does a few checks and it is handy.. (anything makes things automated)

    Perl Security - perlsec recommends it strongly too:

    This flag [Taint mode] is strongly suggested for server programs and any program run on behalf of someone else, such as a CGI script. Once taint mode is on, it's on for the remainder of your script.