Definitely be on the lookout for unmodded STIs. Preferably a dealer not because of the "service" they give you but you're more than likely to find better taken care of or unmolested vehicles.
05 STIs are known for the stock struts to go bad relatively easy.
07 STIs are have a ****ty stock tune from the factory (flat spots, lean spots, especially at WOT), but the dealer has a reflash to fix these if it hasn't already been done.
Other than that, there aren't too many issues that are inherent in nature on the 05-07 STIs.
I've had an 07, and I currently have an 05. I prefered the 6spd in the 07 because the gearing was a little taller but both have just been awesome cars.