As President Joe Biden welcomed hundreds of American Muslims to an Eid celebration at the White House earlier this month, the Secret Service denied entry to Mohammad Khairullah, the mayor of a New Jersey town. The agency runs guests’ information through vast federal databases, and the mayor suspects it rejected him because he has been wrongly placed on a federal watchlist due to racial and religious profiling. His exclusion seems to fit with a pattern of federal security agencies treating Americans differently based on their beliefs and skin color.

For decades, communities of color and civil rights advocates have sought rules that fully ban biased profiling by federal agencies. These agencies wield the technology and power to surveil and investigate us, ban us from flying, detain and question us at the border, and deny us immigration benefits. Yet glaring loopholes in the Justice Department’s current racial profiling guidance, parts of which are followed by the Department of Homeland Security, still permit pervasive discrimination.

The president has charged the Departments of Justice and Homeland Security with reviewing and updating these rules, and new guidelines are expected soon. To ensure that federal safety and security efforts are based on facts, not prejudice, the new guidelines must deliver in three key ways: they must cover all constitutionally-protected traits; they must apply to the full range of federal law enforcement and security activities; and they must set out serious steps to ensure and measure compliance.

Disability, gender identity, and expression are not covered by the DOJ’s current guidelines at all and the existing weak protections for race, religion, national origin and nationality, and gender allow prejudice to flourish. For example, although the Homeland Security Department claims to follow a Justice Department prohibition on religious profiling for certain operations, many of its activities – such as counterterrorism, immigration screening, and screening at the border – are simply not covered. Americans’ country of birth, too, is fair game. After the United States killed the Iranian general Qasem Soleimani, CBP agents wrongly detained and questioned Iranian Americans at the border about their lives and associations. The strongest part of the Justice Department’s current profiling rules—a prohibition on using race, religion and the like to any degree — similarly applies only to “routine and spontaneous law enforcement” activities such as traffic stops. These activities are mostly carried out by state and local police who are not covered by the federal rules.

For the bulk of its own work, the Justice Department has no real prohibition on bias. For example, federal officers are explicitly permitted to use arrest rates — which are disproportionately high for people of color and have been demonstrated to reflect racial bias, particularly against Black Americans — perpetuating a cycle of discrimination. Federal agents can take into account traits like an American’s ethnicity if they have information that shows a possible link between people with a particular ethnic trait and vaguely defined “threats” to national security or border operations. National security and border loopholes in the Departments’ rules are a key factor in the blatant discrimination Black and Latinx migrants and other immigrants face at the border and in immigration enforcement.

This approach is the essence of bias. If, as the Department of Justice policy repeatedly proclaims, discriminatory profiling is wrong and ineffective in “law enforcement,” why are agents permitted to consider a person’s race or religion in deciding whether to target them for surveillance or investigation in national security or immigration contexts?

Nor does it make sense to allow bias to infect intelligence operations as the current guidelines do. Bias in intelligence-gathering negatively impacts the quality of information and leads to real harm to communities of color. Indeed, federal agents’ actions are increasingly dictated by decisions made by behind the scenes intelligence assessments. Just as a CBP agent’s decision to subject a traveler to extra screening must not be tainted by discrimination, the intelligence work that flags certain passengers as high-risk must also be free of prejudice. Since the current rules do not address these problems, it is no wonder that communities of color persistently find that they are being targeted and mistreated by those in charge of our security.

We need the new guidelines to address these issues, together with concrete steps to turn strong new policy into practice. The Departments of Justice and Homeland Security must explain how they will train their personnel to implement new policy, how they will assess whether the policy is in fact curbing bias, and how they will ensure accountability for violations.

Any new policy will be judged on whether it covers all constitutionally protected traits and federally funded police and joint operations; eliminates the double standard of treating national security, the border, and intelligence operations as zones where anti-bias protections do not apply; and is faithfully executed.

Only then will President Biden’s pledge to make his administration “part of a larger effort to strengthen our democracy and advance the principles of equality and dignity” come closer to reality.

IMAGE: A Muslim U.S. Army chaplain listens during a reception celebrating Eid al-Fitr in the East Room of the White House in Washington, DC, on May 1, 2023. (Photo by Brendan Smialowski / AFP via Getty Images)