Blow (someone’s) cover

To reveal someone’s true identity or purpose.

The police blew the secret CIA agent cover by mistake.