The Department of Homeland Security has operated a program to monitor ordinary Americans’ social media discussions about the agency’s policy directives, even though it had in place another policy prohibiting agents from checking visa applicants’ social media accounts for possible signs of terrorist leanings.

The agency’s policy against vetting visa applicants was revealed on Monday by John Cohen, a former DHS under-secretary for intelligence and analysis.

Now an intelligence analyst at ABC News, Cohen says that last year, DHS Sec. Jeh Johnson resisted changing the agency’s policy against viewing visa applicants’ social media accounts as part of the screening process to let them into the U.S.

Having such a policy in place may have prevented San Bernardino terrorist Tashfeen Malik from entering the country on a fiancee visa last year, Cohen asserted.

Malik, a Pakistani citizen, reportedly posted pro-jihad messages on her Facebook account while living overseas. But the posts were not discovered even though Malik underwent three separate screening procedures before being granted her green card.

Cohen blamed the failure to fully screen visa applicants like Malik on DHS’ fear of being accused of trampling immigrants’ rights.

“It was primarily a question of optics,” Cohen said. “There were concerns from a privacy and civil liberties perspective that while this was not illegal, that it would be viewed negatively if it was disclosed publicly.” (RELATED: Former DHS Official Says Fear Of Bad Optics Keeps Agency From Reviewing Visa Applicants’ Social Media)

Compare that hands-off policy to one that the agency has approved for monitoring open source social media activity of regular Americans.

In its “National Operations Center Media Monitoring Capability Desktop Reference Binder,” published in 2011, DHS encouraged agents to compile reports based upon a list of items of interest (IOI) which included discussions on sites like Twitter and Facebook about “policy directives, debates and implementations related to DHS.”

Ginger McCall, whose group, the Electronic Privacy Information Center, obtained the manual through a Freedom of Information Act request, told The New York Times in 2012 said that DHS was essentially monitoring the Internet “for criticism of the government.”

She argued that the activity amounted to a “suspicionless, overbroad monitoring” that “quells legitimate First Amendment activity and exceeds the agency’s legal authority.”

In its 2013 manual, obtained by reporter Jason Leopold, DHS had slightly modified what it allowed agents to monitor. The IOI category pertaining to DHS policy was revised to include only discussions of “policy directives and implementations related to DHS.”

Follow Chuck on Twitter