A Q&A to a related question on Politics SE quoted the 14th Amendment of the Constitution that:
No person shall be a Senator or Representative in Congress, or elector of President and Vice-President, or hold any office, civil or military, under the United States, or under any state, who, having previously taken an oath, as a member of Congress, or as an officer of the United States, or as a member of any State legislature, or as an executive or judicial officer of any State, to support the Constitution of the United States, shall have engaged in insurrection or rebellion against the same, or given aid or comfort to the enemies thereof. [...]
The Congress shall have the power to enforce, by appropriate legislation, the provisions of this article.
While that is true, it's also true that Congress cannot pass bills of attainder, declaring someone guilty of something and then punishing them.
So can Congress itself just declare someone guilty of insurrection and bar them from standing in elections, without that being considered a bill of attainder? Or do they have to delegate the finding of fact (in re insurrection) to another body, e.g. to the judiciary?
N.B. I'm aware that following a successful impeachment, Congress has declared some persons ineligible for office, e.g. judge Archbald in 1913. So maybe Congress can actually issue that kind of finding of fact outside an impeachment... because barring someone from standing for office might not be considered a punishment. (I vaguely recall reading that whether a measure is or isn't considered a punishment is fairly central to whether something is or isn't a bill of attainder.)