pub fn check_interpreter(
script_path: &Path,
allowed: &[String],
) -> Result<String>Expand description
Determines the interpreter for a script by reading its shebang line or inferring from the file extension, then checks against the whitelist. Returns the absolute path to the interpreter to prevent PATH hijacking.