Washington (CNN) -- Mexican drug cartels have used cash and sexual favors as tools to corrupt U.S. border and customs agents, an inspector general investigation has found.

In exchange, agents allow contraband or unauthorized immigrants through inspection lanes, protect or escort traffickers or leak sensitive information, said Charles Edwards, acting inspector general of the Department of Homeland Security.

Testifying before a Senate subcommittee, Edwards cited the Zetas drug cartel as one of the leaders "involved increasingly in systematic corruption."

He did not elaborate on how non-cash methods of corruption, like sexual favors, have been used to corrupt agents.

Since October 2004, 127 Customs and Border Protection employees have been arrested or indicted for acts of corruption, said agency Commissioner Alan Bersin, speaking at the same hearing of the Senate Subcommittee on Disaster Recovery and Intergovernmental Affairs.

Mexican President Felipe Calderon's offensive against the drug cartels, combined with a surge in the hiring of border agents in recent years, have multiplied the risks of corruption, Bersin said.

Today, the Border Patrol counts more than 20,700 agents, more than double its size in 2004. Bersin implied that the rapid hiring spree may have come at the cost of hiring less qualified agents.

"The accelerated hiring pace under which we operated between 2006 and 2008 -- and, frankly, mistakes from which we are learning -- exposed critical organizational and individual vulnerabilities within CBP," he said.

To face this challenge, the commissioner touted the passage of the Anti-Border Corruption Act of 2010, which requires that by 2013, all the agency's law enforcement applicants must receive a polygraph test before being hired. It also calls for periodic reinvestigations into the background of its agents.

"I cannot overemphasize that the overwhelming majority of CBP officers and agents demonstrate the highest levels of integrity every day," Bersin said.

Edwards noted that the department inspector general's Office of Investigations has added 10 positions to address corruption complaints among Customs and Border Protection agents. He added, however, that that represented a 6% increase in the size of his staff, compared with a 34% increase in the size of the agency as a whole.

Since 2004, his office has seen a 38% increase in the number of complaints against Customs and Border Protection employees, he said. The inspector general's office initiated a record 870 investigations in fiscal year 2010, he said.

"However," he added, "our investigations are complicated by the brutality the cartels use to control their organizations and coerce witnesses, and the sophistication and advanced technologies available to organizations with unlimited money."