The attorney for an airline pilot punished by the Transportation Security Administration for posting critical YouTube videos accused the federal government Friday of overreacting by sending agents to his client's house in a "show of force."

The California pilot, who has not provided his name, had been part of a federal security program allowing him to carry a gun in the cockpit. But after he recorded and posted online footage in which he criticized airport security, federal agents showed up at his house to confiscate his weapon.

Attorney Don Werno called the response "unfortunate" in an interview with Fox News on Friday.

"Pilots are the primary line of defense in case a terrorist tries to take over an aircraft, so rather than embracing the pilot's suggestion that we have a major national security problem, they send four federal Air Marshals to his house in a show of force to retrieve a weapon that we could have quite frankly FedEx-ed back to them for $20," Werno said.

He said Homeland Secretary Janet Napolitano's office so far has not provided a clear answer on whether his client broke any rules.

More On This... TSA Announces New Security Measures for Thermoses

"To date we've gotten some very vague, convoluted answers, and I think it's clear to me that they really don't know what he's done other than to embarrass TSA by quite frankly being a hero," he said.

The TSA said in a statement that it is "confident" in its airport security measures, adding that all pilots who are part of the program authorizing them to carry a weapon are expected to keep "sensitive security information" as a condition of their participation.

Though the TSA initially opened an investigation, the unidentified pilot told News10 in Sacramento that he has resigned as part of the Federal Flight Deck Officer program.

The videos he posted raised questions about the security procedures required for ground crews.

In one video, he said that the crews only had to swipe a card and pass through one door to access sensitive areas.

"As you can see, airport security is kind of a farce," he said in a video shot at the San Francisco airport.

Werno said his client pointed out a "major security problem," and that the TSA continues to spend billions on high-tech equipment "when the ground crews go relatively unchecked at all."