It depends on how you define good. I've got some friends who leave stuff out for days and will come back and finish it later. When in doubt, offer some to a friend and see how they react. If they don't run to the bathroom in 30 minutes it's all good.
For homemade or store bought salsa, I throw any leftovers out at the end of the 3rd day.
I don't want to take a chance of anyone getting an ill stomach if it begins to go bad, but doesn't taste off yet.