How to spot a security breach before it’s too late