If you commit fraud, there is a risk of being arrested.

Literal

Fraud [object-を] commit [when-と] arrested danger [subject-が] exists.

不正を働く = 'to commit fraud/wrongdoing.' ~と marks an automatic consequence: 'if you do X, then Y.' 逮捕される = passive 'to be arrested.'