While we're giving thanks this week for America's bountiful blessings, we might also want to give thanks for the relative safety we have enjoyed from those who would harm us as a nation.

The U.S. has been touched by terrorism both at home and abroad, but 11 years after the commercial jetliner hijackings of September 2001, no attack remotely approaching that awful day in terms of scale or impact has taken place. For that we can thank national law enforcement agencies like the FBI.

But our safety has come with a price. As the David Petraeus scandal demonstrates, law enforcement agencies can and, if deemed necessary, will gain access to our most private communication, be it email, text messages, phone conversations or website visits. And in many cases the investigative agency can and does tap the suspect communication without a warrant. Is the safety tradeoff worth it?

Most days it certainly seems like it. Take Tuesday, when three men describing themselves as anarchists were sentenced to prison for trying to blow up a bridge in Ohio. They pleaded guilty to conspiracy to use weapons of mass destruction, attempted use of weapons of mass destruction, and malicious use of an explosive device to destroy property used in interstate commerce. An undercover FBI agent had provided them with dummy explosives.

And last week, three California men were arrested on charges of providing material support to terrorists. They had planned to fly to Afghanistan by way of Istanbul and obtain the appropriate training to fulfill their goal: bomb U.S. military bases overseas. They had prepared themselves by simulating combat with paintball rifles, removing all references to Islam on their Facebook profiles and manufacturing a cover story involving their required attendance at a ficticious wedding, according to investigators. Their group, too, had been infiltrated by a confidential FBI informant.

Then there was the young Bangladeshi man indicted last week on two charges related to a plot to bomb the New York Federal Reserve in lower Manhattan. He was arrested in October in an FBI sting operation in which government agents supplied him with fake explosives.

It's reassuring to see so many terrorist plots aborted thanks to proactive FBI surveillance. But these successful stings also prompt the question: How much surveillance is unreasonably invasive? It's hard to feel sorry for would-be terrorists who blunder into custody with the help of FBI informants. Our concern lies in the possibility that tapped communication may be used for domestic political purposes rather than legitimate security purposes. The Petraeus case -- though inadvertently so -- conjures up that kind of scenario.

Another fair question: Are FBI stings ferreting out true terrorists or recruiting amateurs into thinking they can become terrorists -- and then busting them to great fanfare?

Last year, the Investigative Reporting Program at UC Berkeley studied every case of terrorism that the Department of Justice prosecuted over a 10-year period after 9/11 and found that of 508 defendants, 158 were caught by way of a sting operation and 49 were lured in by an informant who organized the plot. Were these all jihadists or simply naive fools?

It's a dangerous world, but Americans have relatively been spared the consequences. The danger, however, is double-edged. More is at risk than meets the eye.