Salmonella and other bacteria are on the shell. This is the bacteria that contaminated the eggs when you crack them. If you dip the eggs in boiling water prior to cooking then it should decrease your risk.
I'm guilty of eating sunny side up. But I pry only have them 10 times in my whole pregnancy. Usually don't have time to cook breakfast other than toast!
Technically the yolk part in sunny side up is not fully cooked so it can still have bacteria and be dangerous.
Its suppossed to be cooked solid so i eat boiled and omelettes only and always overcook it to be on safe side