We have come across this problem a few times here at the shop , so i decided to make a blog post and a short video about it. I can save you guys some money, time and a trip to the dealer.
We do allot of Alarm and Remote starts on these cars and after a couple of the alarm installs we were doing our after install car inspections and noticed that the check engine light was flashing and the car's fan were cycling on and off for no reason with the key in the on position. (car cam in fine with no lights on on the dash). We check over the whole install and everything is perfect. Luckily we had 2 of the same cars in the install bay , so we checked the other WRX. It turns out that when the installer was putting the car back together he plugged in a green single wire male plug into the green female plug that was sitting loose under the driver side dash.
It turns out that this plug is there (unplugged) from factory ! It is some sort of test connector. (stupid design if you ask me, if i see something unplugged under the dash, i am going to think i unplugged it and plug it back in !!) We unplugged the green plug and all is back to normal. No flashing check engine light and no more cycling fan.