Wait, so if that was a real FBI operation, how did the purchased FBI badges subsequently make it into the terrorists' hands? And we know that they did because of Farmer Brown's report; wouldn't the FBI have confiscated the badges? The Evil Dr. Mathra has suggested that the FBI sting could have been a complete fake, staged by Sarah and/or Valente to make the situation seem increasingly desperate. This would give them more of a reason to push Hawkins deeper into the cell. But even if Mathra's right, those confiscated badges could not have made it to the terrorists, because the fake FBI would have to continue to pretend to be real FBI, which means not giving the confiscated badges to the terrorists.
Now, assuming that the FBI sting was real, the question still remains: how did the terrorists get the badges in the end? It's not like the FBI could have had a chat with the CIA and said, "Oh, we screwed up your operation? Dude, sorry! Here, take the badges back and send them on their merry way and we'll pretend this never happened." First of all, the FBI and CIA don't play well together, and also, the FBI would not be happy to learn that the CIA was operating on U.S. soil. Of course, it's entirely possible that Jericho, in the grand tradition of past television shows, is playing fast and loose with that aspect of the CIA.