There is a large grommet for the ECM/TCM loom behind the battery on the cowl that descends to the ECU/TCU that you must access by removing the battery and plastic cowling, arms, etc. That is what leaks when it rains. I pulled it up enough to clean it out good and seal it in with some 3M Super Weatherstrip Adhesive.
https://www.3m.com/3M/en_US/p/d/b40069430/
I parked my 2012 G37 outside overnight not long after I bought it and it rained, didn't think much of it at the time but when I sat down and pushed the button, nothing. -and the floor was soaked.
There was a code P0100 or something and my heart sank.
Ripped out the passenger kick panels and water was literally dripping out of the ECM.
Capillary action from the wires in the loom sucked it right in. After getting it all vacuumed and dried out it started and ran fine.
That's when I realized why it bounced from auction to dealer, back to auction so many times, and I got it cheap.
I removed the roof drains first and getting that last part out at the firewall through the A/C vent was a PITA.
Luckily there was a dead beetle exoskeleton followed by a half inch of dust to make me feel better about doing it. Having a pair of 24" needle nose pliers helps.
Location of grommet at upper end of part 24079: