I used to have a Red Sex Link that loved to do the same "sneak attack" thing. What finally cured her was when she'd come at me, I'd pick her up and hold her gently but firmly until she stopped squirming...that took care of that problem
Is she pecking on a freckle? I have had that happen before.
I buy a big bag of chopped kale each weak and drop off a couple of handfuls in the morning when I go in to do chores. They are too busy eating the kale to peck me