Bletchley workers faced the death penalty for wartime treason under the Official Secrets act if they talked.
John Cairncross didn't keep it secret; he was the only known Bletchley worker who leaked (to the Soviets). MI5 only found out ~20 years later and he escaped all charges. https://en.wikipedia.org/wiki/John_Cairncross
So, in practical terms, no penalty at all?