In the msa regs it says it's ok but not sure for what as rally cars have lines inside the cabin to protect against rocks and stones and all filters etc have to be covered.
C(b)15.1-3
All vehicles MUST -
Have any fuel lines passing through the
driver/passenger compartment protected and, if nonmetallic,
to be internally or externally metal braided
hydraulic pressure hose or fuel lines complying with
FIA specifications.
In dragracing it is not allowed . Tunnel is the best way and fuel pump next to the tank
Udo