As I understand it, the code of silence basically states that you don't give information to the cops or the government EVER. Doesn't matter that it may have been under duress, or that he felt betrayed, or that he bottled it when it came to stating anything officially. Frankie talked, that's all that matters, and that's what mattered to Michael. Much the same as his attitude towards Fredo.

Of course, the whole point is that these codes are brutal & unreasonable anyway in the real world as they don't acknowledge the existence of any grey area. That Michael was operating in such a black & white fashion, & showing no mercy whatsoever, even towards his own brother who had been more naive than treacherous, just illustrates how much humanity he'd lost.