There is the so-called 'public interest defence', ie whistle-blowing. That was initially considered by that rather odious harridan of a fish-wife, Bettina Jordan-Barber, the civil servant who was recently released from prison after being convicted of corruption in public office - accepting over £100,000 from News International to sell stories from the MOD. Interestingly, she wasn't charged with offences under the OSA.
She pleaded guilty but claims that her only mistake 'was to accept money'. Yes, well, having money wired to a Thomas Cook Office and picking it up whilst wearing a disguise.
Read and feel sick:
Bettina Jordan-Barber: The ex MoD strategist who went to jail after telling The Sun about military shortages - and taking money for it - Crime - UK - The Independent
PS: I'm still awaiting the apology from the Service for being falsely accused of leaking a story to the media in 2009, which was leaked by Bette. This guttersnipe stood by watching my career evaporate whilst she raked in the cash.