The 10 minute relearn fixing the problem is a good indication that the resistance value in the ignition cylinder has began to drift. Sometimes they will get bad enough that you have to do a relearn every time you start the car. Replacing the lock cylinder will probably fix the problem.
I have bypassed a ton of these in-dash passlocks by soldering in a resister. Very common failure on G. Ams and Aleros, etc.
About a week ago, my own car, a 2005 Pontiac Grand Am, had the Security light come on solid while I was driving down the road for some reason. Got to where I was going and turn the ignition off, then restarted it to see if it would start. It did and the light was out and stayed out for several days. 2 days ago, parked it over night, went to start and no start. Full battery and no crank, Security light starts flashing. Okay, 10minutes with ignition in "on" position and light goes out, vehicle starts. No problems since.
I'm thinking loose wire someplace myself on mine as it just started and real intermittent. Will have to go searching if/when it does it again.
Grounds! These and several GM models are notorious for bad grounds .Will cause no stars intermittent problems.Had a Chevy Cruze a few months back they replaced ECM,BCM still same issues . Ended up being main engine ground corroded.