The car has a leak in the firewall. When parked uphill at all and it rains, they have to shop vac standing water out of the passenger side of the floor pan.
There's a piece under the cowling on the passenger side that may have become dislodged. With the wiper(s) removed, you can lift the grate off and reposition the piece. That may cure the leaking.
In the past, its just refused to take the key, it would do the typical flash security when attempting to crank. "Fixing" it was her waiting for 15 minutes and trying again.
That's in line with the typical security problem. A few pins in the connector at the BCM develop too much resistance causing the BCM to mis-read the "key detector". I believe the key detector is a hall-effect sensor, which detects the presence of metal. Regardless of the technology, if it's not working correctly, the SECURITY condition occurs and the car won't crank.
There's a TSB on this that I don't have handy. But the fix is to clean the connector contacts simply by disconnecting and reconnecting the BCM connectors a few times (with the battery disconnected!). The BCM is over the driver's left foot, and has three connectors with pinch handles. Pinch one and slide it out, then re-insert it. Do that 2 or 3 times, to each of the 3 connectors. That should fix any lingering SECURITY issue.
There is also a bypass that some folks would do wherein they put a resistor between two of the 3 wires going to the key detector. The details escape me, but they're searchable on the forum.
I attribute the increasing resistance to galvanic corrosion. As I understand it, if the metal platings on the connector pins are not perfectly compatible, the corrosion can form causing the mis-read of the key detector.
About six months ago the ignition lock packed it in and froze up. Had to tow it home and my brother and I pulled the dash apart and replaced the cylinder (just the lock with its embedded sensor, not the ignition switch). It's behaved since in terms of the SECURITY light tripping.
As I recall, the key detector inserts into the side of the lock cylinder above the switch portion. If you are still getting the SECURITY, I would inspect the cylinder to be sure the detector is still in place.
All that said, re-reading your post, you have a 2006. The SECURITY issue was mostly confined to the 2000-2005 models.
I'd almost buy a bad ignition switch except for the fact that the pump engages at the run position until the line is pressurized then stops. If it can read the switch as on without the engine running, i'd expect it to read it as on with the engine running. The engine will run until the fuel pressure in the line drops then it starves out and dies.
Once pressure it built up, the fuel pump is supposed to shut off on this model. I suggest getting a fuel pressure gauge and hooking it up to the fuel rail in the intake and watching it to see exactly what it's doing. IIRC, it should be close to 50 psi.
[Edit]Looking at my manual, there is a fuel pressure regulator for this motor. If yours has gone bad, it may be letting the pressure drop too low for the injectors. Again, the fuel pressure gauge can help verify that. If you have to replace it, unlike the previous generation of Impalas where it's under the hood, for the 2006 3.9, the regulator is part of the fuel sending unit in the tank, so the tank has be dropped to service it.