means that
inner confidence and freedom from self-defeating fears can help a person withstand external criticism or opposition. They do not make someone immune to actual harm.
When if you have confidence in yourself, when you are internally and emotional well built, then no one can harm you; a strong, well baleanced person…, the saying “If there is no enemy within, the enemy outside can do us no harm” is appropriate.