The Hatch Act, it turns out, is pretty toothless, being just an administrative rule. The worst sanction James Comey faces under the Hatch Act is a sternly-worded note in his personnel file.
Common sense would suggest that the crime of a Federal official interfering in a Federal election ought to be treated as a crime, and sure enough, USC to the rescue.
I give you 18 USC 595:
18 U.S. Code ยง 595 – Interference by administrative employees of Federal, State, or Territorial Governments
Whoever, being a person employed in any administrative position by the United States, or by any department or agency thereof, or by the District of Columbia or any agency or instrumentality thereof, or by any State, Territory, or Possession of the United States, or any political subdivision, municipality, or agency thereof, or agency of such political subdivision or municipality (including any corporation owned or controlled by any State, Territory, or Possession of the United States or by any such political subdivision, municipality, or agency), in connection with any activity which is financed in whole or in part by loans or grants made by the United States, or any department or agency thereof, uses his official authority for the purpose of interfering with, or affecting, the nomination or the election of any candidate for the office of President, Vice President, Presidential elector, Member of the Senate, Member of the House of Representatives, Delegate from the District of Columbia, or Resident Commissioner, shall be fined under this title or imprisoned not more than one year, or both.
(https://www.law.cornell.edu/uscode/text/18/595)
Only a year, but it’s a start.