#! /bin/secure
rather than the usual
#! /bin/sh
Secure determines if a script can be safely run by looking in /etc/secure. This is a list of secure shell scripts, and the numeric user id that the script is to be run with. A typical line from /etc/secure might be
/usr/script 0
which would mean that /usr/script should be run as root.
Because secure will only exec a pathname beginning with '/', that comes from /etc/secure, it cannot be used to illegally gain root access.
In addition, for the sake of security, secure sets the PATH environment variable back to a simple default, and deletes the IFS environment variable.