They might be prohibited from running for offices that would have some jurisdiction over their department, or if they win the office they would have to resign.
I think the regulation here is unconstituional infringment on 1st amendment. Here is a summary of the (held constitutional) effect of the Hatch Act - referenced in Broadrick v. Oklahoma, cited above.
These federal and D.C. employees may-
- be candidates for public office in nonpartisan elections
- register and vote as they choose
- assist in voter registration drives
- express opinions about candidates and issues
- contribute money to political organizations
- attend political fundraising functions
- attend and be active at political rallies and meetings
- join and be an active member of a political party or club
- sign nominating petitions
- campaign for or against referendum questions, constitutional amendments, municipal ordinances
- campaign for or against candidates in partisan elections
- make campaign speeches for candidates in partisan elections
- distribute campaign literature in partisan elections
- hold office in political clubs or parties
These federal and D.C. employees may not-
- use official authority or influence to interfere with an election
- solicit or discourage political activity of anyone with business before their agency
- solicit or receive political contributions (may be done in certain limited situations by federal labor or other employee organizations)
- be candidates for public office in partisan elections
- engage in political activity while:
- on duty
- in a government office
- wearing an official uniform
- using a government vehicle
- wear partisan political buttons on duty