Pennsylvania constitution
Article VII: elections
Section 8

In trials of contested elections and in proceedings for the investigation of elections, no person shall be permitted to withhold his testimony upon the ground that it may criminate himself or subject him to public infamy; but such testimony shall not afterwards be used against him in any judicial proceedings except for perjury in giving such testimony.