Department of Homeland Security officials, responding to sharp criticism on Monday from a union representing 12,000 of its employees, said they had added many safeguards in recent years to protect against fraud and security violations by foreigners seeking to live in the United States.

The officials reacted swiftly to a statement by Kenneth Palinkas, president of the National Citizenship and Immigration Services Council, in which he called on lawmakers to reject an immigration bill before the Senate, saying security procedures were weak for checking the backgrounds of millions of immigrants who would apply for immigration documents under the legislation.

Mr. Palinkas said he was adding his signature to a letter to Congress from a separate union that represents 7,700 federal deportation agents, which charged that the Senate bill would be a “significant barrier to the creation of a safe and lawful system of immigration.”

If the legislation passes, the immigration officers in Mr. Palinkas’s union will be central to carrying it out. They would review applications for provisional legal status from an estimated 11 million illegal immigrants, as well as for millions of green cards and other immigration documents.