It's a tale as old as time. Someone is arrested and held in jail before trial. Naturally, they're desperate for a friendly face or a caring voice. They spill their guts to their new friend, giving details of the crime. That "friend" contacts the prosecution offering to turn over those details in exchange for a break on their own sentence.