I had similar issue and found out it was a bad ground. I would get weak starts and notifications from OnStar that the vehicle was sensing a possible bad battery, alternator or starter. I took it to at least 3 different shops and all checks showed the items as good. I started looking at ground points and noticed one near the starter which was good and another attached to the frame in the right front wheel well behind the wheel well panel. It looked fine at first, but once I removed it, I found a ton of the wax from the frame under that ground point, and some corrosion on the exposed metal surface which wasn't much surface area. I used sand paper to remove the wax from the grounding point and some dielectric grease and reinstalled. Ever since that fix, I have not had one problem and she starts like a champ and no OnStar diagnostic warnings.
That one grounding point had me thinking the whole controller network was taking a dump on me. When your ground isn't good, it can wreak havoc on the onboard computers making you think it's a different issue. Just as others have mentioned, check your grounds and cables. Pay special attention to the one attached to the frame in the right front wheel well.