Iraqi police are having problems with terrorists joining the police force, and tipping off the bad guys when there is a police operation aimed at them. It's not a problem unique to Iraq. All over the Moslem world, police and intelligence agencies fighting Islamic terrorism, have to worry about the enemy getting people inside. Even Saudi Arabia is having this problem, despite the public backlash against Islamic terrorists. This is one reason for the current shakeup in the Saudi security services.
While Westerners think of Islamic radicalism as primarily directed at them, such is not the case. The first target for Islamic radicals is nearby Moslems who are seen as not sufficiently devout. Since the Islamic radicals are usually a minority, and a paranoid one at that, they tend to be pretty good at keeping their own secrets. At least they tend to be better than the government security services, at least until the radicals start killing a lot of civilians. At that point, public opinion turns against them, members begin to defect, and when that happens, the terrorist groups tend to get found out and destroyed. This is what's happening in Saudi Arabia, as the police begin doing background checks on more and more of their own people. You can never eliminate all the Islamic radicals from your ranks, but you can get so many of them, that the few who remain are not as much of a problem.
In Iraq, the problem is not just Islamic terrorists, but also Sunni Arab partisans, who are determined to prevent Shia Arabs (who are 60 percent of the population) from controlling a democratic Iraq. The government solves this problem by keeping Sunni Arabs out of most sensitive positions, and watching carefully those it does have in the security services. Most of the spy problems occur at the local level, in Sunni Arab towns or neighborhoods, where most of the cops are, naturally, locals. You really need the help of the local cops when you are going after local terrorists. The government brings in special counter-terrorist police battalions for major operations, and these guys are largely Kurds and Shia Arabs. While it is unwieldy to keep the local cops out of the loops while the counter-terrorist police go after the terrorists, that's the solution that works.
Another problem in Iraq and throughout the Middle East, is blackmail and extortion. Terrorists can often get a policeman to tip them off by threatening, or even kidnapping, kin of the cop. Since corruption is so pervasive, terrorists can often get some major league dirt (like a rape) on a cop, and get him to pass along information, or else have the father and brothers of the victim informed of who defiled the young lady.
While Westerners have long considered Middle Easterners a "treacherous lot," it has more to do with different cultural norms than anything else. A lot of Middle Eastern customs may be much less effective today, but they have persisted for long because, over the centuries, those traits helped, rather than hindered, survival.