My girlfriend has a best friend that is cheating on her spouse. Do I really have to tell her spouse?
That is brave. Why are you going to tell this secret?
Because I hate her for keeping this secret from him.
It's understandable that you would want to tell someone that they are being cheated on. However, you should not disclose things about other people's relationships as the outcome will not affect you. Instead you should talk to your girlfriend about how you feel and encourage her to talk to her friend about doing the right thing.
I can't risk my morals to keep the secret.
It is up to you but by involving yourself in another person's relationship, you could be hurting your girlfriend's relationship with her friend. She  might not forgive you.