While the Federal "Magnusson Act" is clear that merely putting on an aftermarket part does not necessarily void a warranty, there is plenty of "gray area." For example, let's say you ad an electronic gizmo that causes significant voltage drop, then your voltage regulator fails. GM is going to deny your warranty claim for a new voltage regulator, blaming your "added on" electronic part. The company that sold you that electronic gizmo is going to say,"nonsense, our part didn't cause the voltage regular to fail, for it............." And guess who is then in the middle, trying to get a voltage regular (and labor of course) replaced, with both sides saying, "it isn't my fault."
I have done 30 mods to my Corvette, but pick and choose which ones I have installed. I know a new motor on my Z06 would cost about $15K, so I haven't touched its insides, haven't opened it up, nor had a professional tech do that. But I did change the air filter. I also added an aftermarket exhaust cat-back system.
We each need to consider the potential consequences of aftermarket parts before proceeding. Most of the time, all goes perfectly. Some of the time????