http://www.lawcollective.org/
There is no reliable way to identify undercover agents or informants. The good ones act entirely in keeping with their roles. An experienced undercover officer is not going to seem unduly nervous, wear inappropriate clothing, or fumble with the drugs he’s handling.
Undercover officers are legally allowed to lie when you inquire whether they’re law enforcement personnel. It does no good to ask, “Are you a cop?” Undercover cops can just reply, “Of course not.” After all, if they couldn’t lie, it would be a waste of effort for law enforcement agencies to train and disguise all those officers for undercover roles—they’d be exposed early on, every time they tried to pass.1
It’s perfectly legal for undercover officers and informants to engage in criminal activity to protect their cover. Narcs are allowed to buy, sell and do drugs of every kind. Forget any urban myths you may have heard to the contrary: narcs are entitled to smoke/snort/swallow/inject controlled substances. Similarly, vice officers investigating prostitution are allowed to get naked and receive “massage.” (It’s good to know that your tax dollars are being well-spent.)2
Although many undercover officers and informants come equipped with transmitting or recording devices, this type of electronic equipment is miniaturized. A police agent who’s “wearing a wire” is unlikely to be uncovered by mere patting. The equipment can easily be hidden in hard articles of clothing, such as belt buckles, boots, etc. Of course, undercover officers and informants don’t have to be wired for sound, they can just report from memory (accurately or not) about whatever they’ve seen and heard.
1. Undercover officers find it a particularly useful tactic to mention that they're worried about the police, occassionally asking the suspect whether he's a cop—the ol' switcheroo.
2. Most people are surprised to learn that law enforcement agents can, as part of their job, lie and engage in criminal activity. It seems unfair that the police don't have to live up to the same standards that they're enforcing. However, a great deal of police investigation operates on the basis that the end justifies the means—a flawed rationale, particularly in the context of maintaining a just legal system. Crooked tools build a crooked structure.