My friend's gf sucks

Jenna

I've recently become close with my friends new girlfriend. We were hanging out, and she had me use her phone really quick, and her text screen was up. I saw she was flirting with a guy through text. I'm so angry with her for going behind my friends back.

Should I confront her about it, or go straight to my friend? I can't live with a clear conscience just ignoring it and letting my friend get hurt 😩