Comey may very well have violated the law.
Did Comey Violate Laws In Leaking The Trump Memo?
"The problem is that Comey’s description of his use of an FBI computer to create memoranda to file suggests that these are arguably government documents. Comey admitted that he thought he raised the issue with his staff and recognized that they might be needed by the Department or Congress. They read like a type of field 302 form, which are core investigatory documents."
Seems pretty clear it was a violation of at least one law.
Did Comey Violate Laws In Leaking The Trump Memo?
"The problem is that Comey’s description of his use of an FBI computer to create memoranda to file suggests that these are arguably government documents. Comey admitted that he thought he raised the issue with his staff and recognized that they might be needed by the Department or Congress. They read like a type of field 302 form, which are core investigatory documents."
Seems pretty clear it was a violation of at least one law.