The ego only attacks itself. When it targets a person, and it refers to some kind of identity that is the recipient of its attack, that identity is always comprised of egoic properties.
When it says "you are....", it's referring to some guilty person. When it tries to attack "you", it's attacking a sinful you.
It is actually addressing itself within its own thought system. It never actually addresses God or innocence.
It never says, "you perfectly innocent so and so". Innocence is never really its target. It cannot even conceive of innocence.
That means, the ego attacking itself can only affect YOU if you have changed your identity into an ego identity. If you believe you are made of sin and guilt and fear, then when the ego directs something at you, it will be directing it at that false, sinful self. It's really screaming at itself.
If you are not identified with the ego when the ego attacks itself, you will not experience any effects. You will recognize it is not about YOU, because you are not the guilty target that it is addressing. It's talking about someone else. If you are innocent and sinless, then it literally never even mentions your name. Your "name" is the identity you have and what you are made of. If you are not made from ego, then the ego cannot even address you.
So when you are out of the ego, and someone tries to attack, the only way you will take it personally is if you perceive they are actually addressing YOU, and the only way that's possible is for you to identify with IT. So again, the ego attacks only itself.
This is also why the ego's attacks have absolutely no effect on the innocent and immortal Spirit of God, or His Son, or His Creation. This is why nothing real can be threatened.
When you buy into the ego (believe in it) and think it is yourself, you are giving the ego "permission" to attack "you". It now has access to you, and when it attacks, it will seem to hurt you. Just by your being in the ego thought system gives it access. It can only attack itself so the only way to attack you is for you to be identified with it.
In other words, if you believe in "real sin", that you are really sinful, then you have identified that you are a part of the ego thought system. And now because of your "sin", it warrants punishment, and now the ego can seem to attack you. This is exactly the same as the Christian belief that if you sin, this gives the "devil" permission to attack you and possess you. If you align with the ego, you are "opening the door" and authorizing punishment by the ego/devil.
This is how the belief in real sin automatically grants the ego access to punish you. The way out is to not believe that your identity contains real sin. You are innocent. And you are free. And therefore you have nothing to worry about because the innocent are invulnerable to the ego.