The movie's director Chad Stahelski gave an interview answering basically all of your questions:
The stuntmen are equipped with protective gear to not get (severely) hurt by the dog bites. The only bit of CGI used is that targets for the dogs ("green fluffy toy[s]") which were affixed to the bad guys were removed in post production.
From the above link,
Mancini: So when you say that the dog normally doesn’t know it’s in a movie, the main difference is that the person training the dog, in this case, is actually on screen?
Stahelski: That, yes, and normally when you get an animal, when you train an animal to attack, the trainer or stunt-person is in protective gear and the animal is actually trying to hurt them. We didn’t want our animals to try and hurt anybody, so we trained them, like, you know when you play with a dog, and he gets a sock, or he gets the ball and you try and take it away the dog’s not trying to hurt you, he’s just trying to play with the ball. But what happens if your dog starts getting too rough with you? “Whoa, hey, easy, boy, no don’t do that” cause you don’t want it messing with your kids or somebody else that way, right? We took the opposite approach and encouraged aggressive playtime.
So it’s playtime but we’re reinforcing that it’s okay to play rough with the stunt guys. And what you don’t see, we put certain kinds of targets on the stunt guys, which we later digitally erase, so when the animal sees the green fluffy toy on the stunt guy, he knows to go get that fluffy toy. And what you see is not him attacking the stunt guy, he’s just trying to get his toy. The dog is trying to rip the toy off the stunt guy, and then we digitally erase that.
Mancini: Right. So do they have the toy in the crotch area? And then is there special gear underneath that the stunt guy has to wear to make sure he doesn’t get his balls bitten off?
Stahelski: We have certain kinds of… again, it’s tricky cause you don’t want to hurt the doggies’ teeth, so it’s a soft kevlar kind of padding. There’s special shorts and pads we wear so that the dog can’t bite through but at the same time it doesn’t hurt the dog’s teeth.