in reply to Insecure dependency in system under -T, with list form invocation
my ($owner) = grep s%^.*/(.*)$%$1%, $ct->argv(qw(des -fmt "%[owner]p"), "vob:$vob")->qx; # snip system('/usr/bin/ssh', '-l', $owner, $host, $binct, @op, @lbtype);
You're passing user input ($owner) directly into system() which is bad.
See perldoc perlsec about Laundering-and-Detecting-Tainted-Data. You may also need to clean up %ENV as well.
Update: Sorry, I thought the culprit was $owner but your regex should clean that one. In any case, I suspect that you've got an arg that's tainted. You can easily test a variable for taintedness with tainted EXPR in Scalar::Util
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Insecure dependency in system under -T, with list form invocation
by cramdorgi (Acolyte) on Sep 10, 2008 at 19:30 UTC | |
by mr_mischief (Monsignor) on Sep 10, 2008 at 23:55 UTC |