Other than RATS, are there any other Perl security scanners?
Possibly also any STATIC only perl code graph engine which has an ability to follow data-flow or otherwise tainted input?
Other than RATS, are there any other Perl security scanners?
Possibly also any STATIC only perl code graph engine which has an ability to follow data-flow or otherwise tainted input?
Perl::Critic implements a number of security checks largely based upon the book Perl Best Practices. Given that Perl::Critic is written using the PPI parser, it probably can achieve much greater introspection than RATS can.
That said, no code scanner or utility is going to find security errors that are the result of just poor programming practices. A few simple best practices can go a long way. The perlsec manpage goes into detail about many Perl security issues, and has some good practical advice.
From my own experience auditing mountains of bad code:
-T
flag)use strict
use warnings
eval
whenever possible; it's inefficient, anyway. Never put user input into an eval
string.I'm sure there's more that I'm not remembering at the moment, but it's late. :)
With respect to a graph engine, I just found PPI
Parse, Analyze and Manipulate Perl (without perl)
Key features include;