Buy one that hasn't been modified. If you want a modded WRX, do the mods yourself - research the parts, and make sure the mods are done right.
Check the heat shield around the turbo. If it's trimmed/gone, most likely, it had a DP on it. Check the lines going to the BPV. If it's been spliced, most likely, there was an aftermarket BOV on the car. Check to see if the ECU has been flashed.
Other than that, get one with the lowest mileage possible. The more aesthetic appeal the car has, the more chance a younger driver had it before you (and with that, there's a good chance the car has been beat to hell).