Cold sore on anyone's lips would be a contact risk for a newborn. There have been rare cases of a baby dying from exposure to a cold sore. Of course there are many cases every year of babies dying from not being breastfed. Some hospitals may isolate a mother from her baby if she has a cold sore. It is a complicated problem since oral sex is so common now and the herpes that causes a cold sore on the lips may be a genital herpes viris. A person could have a sore in their mouth so it is a good idea to not let anyone kiss your newborn.
I've never heard of a person with herpes on a nipple. There would be a contact risk but it would seem like it would be ok to nurse on the other breast as long as the mother can be with her baby. Care should be taken that there is no contact with the sore or anything that has had contact with the sore.
Don't be discouraged about breastfeeding since it helps fight infections. If the very worst happened and you couldn't breastfeed at birth you could pump and nurse as soon as possible.