There are risks in anything we do. I consider hatching eggs to be the safest way to add fresh blood to a flock, safer than introducing living chicks or grown chickens.
Some diseases can be transmitted through the egg, whether it is dirty or not, if the chick hatches. Many times, if the egg is infected the egg will not hatch, but it is possible. As Mahonri said, NPIP certification offers great protection against some of these. I'm not as familiar with NPIP certification as I should be but I believe there are certain basic requirements, the program itself is run by the individual state, and each state can put on additional requirements if it so desires. NPIP does not absolutely, without a doubt, every time, no possible way guarantee you will never get any diseased eggs (anything can happen) but getting NPIP certified eggs is a great precaution to take and highly recommended.
I guess it is also possible for diseases to be transmitted on the outside of an egg. A really dirty egg should not have been shipped to you anyway, but these things happen. A dirty egg is a good way for bacteria to enter the egg and cause it to explode. Different ones of us have different ideas of dirty, so there is some judgment required there. The outside of a shipped egg probably dried out a lot during shipping, which will reduce the odds of something being transmitted by a dirty egg even more. Washing an egg or sandpapering it to remove this stuff takes the bloom off the egg. The bloom is a special coating the hen puts on the egg when she lays it that helps keep bacteria out. I never try to hatch an egg that has been washed, sandpapered, or is dirty, but with eggs from other sources you don't always have absolute control. Trying to hatch an egg that has been washed, sandpapered, or is dirty does not absolutely, without a doubt, every time guarantee that the egg will get bacteria inside and explode, but to me it increases the odds enough that I won't do it.
I probably made this sound like doom and gloom, disaster is certain. I don't mean that at all. I think hatching outside eggs is extremely safe, especially if you take just a few precautions. It is my preferred way to add to a flock.
Good luck! I expect you to do great.