As lawmakers rush to finalize a number of big-ticket legislative items before the calendar turns to 2018, they face a deadline to revisit surveillance powers at the center of a controversy involving President Trump, Russia, and the “wiretapping” allegations Trump hurled at former President Obama earlier this year.

The spying program created by Section 702 of the Foreign Intelligence Surveillance Act will expire on New Year’s Eve if Congress does not reauthorize those powers in the coming weeks.

Lawmakers have already introduced several competing bills to renew and reform the 702 program. But each offers different levels of change to the law responsible for both surveillance and "unmasking."

Sen. Tom Cotton, R-Ark., introduced a bill over the summer that would permanently reauthorize the 702 program without making any major changes. It’s an approach supported by the Trump administration, as high-ranking officials have pushed lawmakers to support a “clean” reauthorization bill that places no restrictions on the government’s ability to collect or search communications.

The Senate Intelligence Committee advanced its version of 702 reauthorization, which would extend the warrantless surveillance program through the end of 2025, late last month. That bill offers a few modest reforms – such as requiring more reporting to Congress to increase transparency and offering stricter penalties to those who leak classified information – while leaving much of the program intact.

Sen. Rand Paul, R-Ky., and Sen. Ron Wyden, D-Ore., introduced a bill late last month that would provide the most substantial changes to 702. Their bipartisan plan would impose stricter limits on how and where intelligence agencies can collect information, placing particular safeguards on communications that involve U.S. citizens.

And in the lower chamber, members of the House Judiciary Committee have put forward legislation, known as the USA Liberty Act, that addresses the “unmasking” issue at the heart of allegations against the Obama administration while approving much of 702 for another six years.

David Ruiz, writer for the Electronic Frontier Foundation, said any of the plans presently on the table could be folded into another piece of legislation before the Dec. 31 deadline.

“Watch what Congress does as the year-end nears,” Ruiz told the Washington Examiner. “There are several debt, spending, and disaster relief packages that are supposed to be voted on in the coming weeks, and there is a real possibility that surveillance reform gets attached to other legislation.”

Ruiz said there are a number of flashpoints in the debate over surveillance power that must be addressed in whatever bill Congress passes to reauthorize 702.

One is known as the “backdoor search loophole,” a name given to a practice – made possible by ambiguity in the current law – that intelligence agencies use to search the government’s database of intercepted communications without a warrant.

“Today, agencies like the FBI can search through communications collected under Section 702 — even if those communications belong to a U.S. person — without first obtaining a warrant,” Ruiz said. “Some lawmakers are not interested in closing this loophole because they, like the intelligence community, believe that these communications are legally obtained, and thus, do not need separate legal approval to search.”

The Paul-Wyden bill would ban backdoor searches and require officials to obtain a warrant not just to collect information on a foreign target, as the law presently states, but to search the database of intercepted communications as well.

Another flashpoint in the surveillance debate involves a practice known as “about” collection, or the government’s authority to obtain communications that merely mention a foreign target, even if the target neither sent nor received those communications. About collection could allow intelligence agents to spy on conversations solely between two American citizens if those Americans happen to be discussing the foreign target. The Paul-Wyden bill and the House Judiciary Committee's bill would both outlaw this practice.

But perhaps the most controversial issue in the broader surveillance discussion involves unmasking, or the government’s ability to identify Americans whose communications are swept up during surveillance of a foreign target. The identities of U.S. citizens are supposed to be redacted in reports containing conversations they have had with or about foreign targets; however, officials can request that intelligence agencies reveal their names in those reports under urgent circumstances.

The Obama administration came under fire earlier this year after House Intelligence Committee Chairman Devin Nunes discovered high-ranking officials had unmasked the identities of Trump transition officials in sensitive conversations, some of which ended up in the news due to apparent leaks.

Nunes launched an investigation into the practice that yielded evidence of systemic abuse of unmasking authority in the previous administration. For example, in a letter he wrote to Director of National Intelligence Dan Coats in July, Nunes noted that his investigators had found multiple instances in which Obama administration officials had unmasked Trump associates without providing a “meaningful explanation” as to why those identities needed to be revealed.

“[W]e have found evidence that current and former government officials had easy access to U.S. person information, and it is possible that these officials used this information to achieve partisan political purposes, including the selective, anonymous leaking of such information,” Nunes wrote.

“[S]enior government officials offered remarkably few individualized justifications for access to this U.S. person information,” Nunes added. One Obama administration official, he said, “made hundreds of unmasking requests” during the final year of Obama’s presidency alone.

A source familiar with surveillance discussions in Congress said the “vague, boilerplate language” that former administration officials were able to use to justify unmaskings in politically-sensitive situations is one reason House Intelligence Committee members may offer additional unmasking reforms to the House Judiciary plan, which already contains several.

"If you're trying to do oversight, that gives you no help whatsoever,” the source told the Washington Examiner.

That source said House Intelligence Committee members have weighed a proposal that would add tougher restrictions to unmasking requests during presidential transitions – when the previous and potentially adversarial administration remains in control of intelligence information that could involve associates of the incoming administration.

Many lawmakers in the House and Senate have not yet indicated which reforms they will back, beyond signaling a lack of support for the type of clean reauthorization favored by the Trump administration and Cotton. Congressional leaders have also not taken a temporary extension of the program off the table.

Surveillance reform is an issue with the potential to unite a unique coalition of conservatives and progressives, however. Small government proponents and civil liberty advocates have found common cause since 2008 in opposing the mass collection of communication, whether out of a desire to protect civil liberties or an effort to reign in the national security apparatus of the federal government.

House Freedom Caucus members have expressed their opposition to any 702 reauthorization bill that leaves the program substantially intact.

“Government surveillance activities under the FISA Amendments Act have violated Americans’ constitutionally protected rights. We oppose any reauthorization of the FISA Amendments Act that does not include substantial reforms to the government’s collection and use of Americans’ data,” the Freedom Caucus board said in a statement in June.

A spokesman for the Freedom Caucus said the statement continues to describe the conservative bloc’s position on surveillance as Congress gears up for debate.