I treated the whole thing as a learning experience and have successfully managed to avoid ending up in a similar situation since.
There are no warning signs. Just pretend everything you say to a coworker is on a public ledger.
In some cases the true, actual friends you make in the workplace, the ones you'd still hang out with years after your employment, ca be trusted. But it's still probably better to not tell them anything that could make you look seriously bad either.
Very succinctly put. I probably could have distilled my post down to just this. If there's any one takeaway from this thread, that's it.