ASan Diego television station recently obtained some troubling documents that seem to show that the U.S. government, working with Mexican officials under a program called Operation Secure Line, has created and shared dossiers on journalists, immigrant rights lawyers and activists covering or involved with the so-called caravans of migrants moving from Central America to the U.S.-Mexico border.

Worse yet, the government then detained some of these people for questioning (one photojournalist was held for 13 hours), barred some of them from crossing the border and interfered with their legitimate efforts to do their jobs. NBC 7 also received a copy of a purported government dossier on lawyer Nicole Ramos, refugee program director for a migrant rights group, that included a description of her car, her mother’s name, and details on her work and travel history. That’s not border security, that’s an intelligence operation and, as the American Civil Liberties Union pointed out, “an outrageous violation of the First Amendment.”

The ACLU noted correctly that it is impermissible for the government to use “the pretext of the border to target activists critical of its policies, lawyers providing legal representation, or journalists simply doing their jobs.”

It’s unclear when the intelligence gathering began, or how widespread it is, but the Committee to Protect Journalists reported in October that U.S. border agents, using the broad power the law gives them to question people entering the country, seemingly singled out journalists for in-depth examinations, including searching their phones, laptops and cameras — all without warrants, because they’re generally not required at the border. These are troubling developments deserving of close scrutiny by Congress and, if warranted, the courts.

The Department of Homeland Security is responsible for controlling the flow of people across U.S. borders and has broad and court-recognized authority to search for contraband. But the government should not use that authority as a pretext to try to gain information to which it would not otherwise be entitled. And it certainly doesn’t give it a framework for harassing or maintaining secret files on journalists, lawyers and activists who are covering, representing or working with activists.

Homeland Security defended the targeting by linking the intelligence operation to the agency’s investigation of efforts this winter by some Central American migrants to cross the wall near San Ysidro, Calif. It said also that all the people entered into the database had witnessed border violence. That sounds an awful lot like a criminal investigation, not a border security operation.

The name of the report leaked to NBC 7 was “Migrant Caravan FY-2019: Suspected Organizers, Coordinators, Instigators, and Media.” The only thing suspect here is the government’s actions.