It might seem hard to believe, given the current contrast between the conditions endured by US military personnel in Iraq and elsewhere, and the comfort and extravagance of people back home, but the US Congress is close to passing a bill that will deprive men and women in the military of a right that will be enjoyed by everyone else. The law would make the military the only group of individuals who can be discriminated against on the basis of genetic tests for health conditions.

Although it is currently being held up by Senator Tom Coburn (Republican, Oklahoma), apparently in league with the health-insurance industry (see Nature 448, 631; 2007), the Genetic Information Nondiscrimination Act is widely expected to pass. When it does, it will establish in law an important principle that has long been sought by geneticists and ethicists: that people should not be at risk of losing their health insurance or their jobs if they take a genetic test.

In a nation where health-care benefits can be lost on the flimsiest of excuses, the law is essential if genetic tests for disease are to develop into useful tools (see Nature 448, 2; 2007). Extraordinarily, however, the Department of Defense has managed to exempt itself from the bill. This has been achieved without public debate and, indeed, almost by rote to please generals who are putting their own logistical convenience above the interests of the men and women under their command. As the Los Angeles Times reported earlier this month, the defence department already discriminates shockingly against soldiers whose health problems it can attribute to genetic disposition, sometimes discharging them without benefits.

There's plenty of precedent for military exemptions in legislation — the Pentagon customarily opts out of all kinds of laws and regulations. Politically, it is easy to do. Self-described 'supporters of the military' in Congress just wave the flag and dig their heels in, usually barking that the US military won't be constrained by some liberal wimp who wants to, say, impose fuel-emission standards on military vehicles.

But in this case, Congress seems to have taken its marching orders from the senior brass, even when they conflict directly with the interests of men and women in the ranks. This is a disgrace. The argument for the exemption, such as it is, holds that the military has to beware in case its health-care provisions turn it into a haven for people who know they are ill and connive to milk these provisions once they have been signed up.

It is improbable that someone seeking to malinger into a cosy health-care plan would chose to sign up for service in the US military.

It is — to put it very, very mildly — improbable that someone seeking to malinger into a cosy health-care plan would chose, at this juncture, to sign up for service in the US military. They would be far more likely to go and work, for example, on Capitol Hill, where they could loaf around all day drafting preposterous clauses for insertion into otherwise sensible legislation. And where, when illness strikes, they could cash in on the relatively generous health-care benefits afforded to congressional staff.

The civilian branches of the government, like every other US employer apart from the Pentagon, will be barred under the legislation from terminating employment or health coverage on the basis of results from genetic tests. At the moment, most such tests provide imprecise and provisional indications of susceptibility to disease. They will grow more valuable in flagging appropriate interventions (such as surgery or drug treatment) when they can be used in appropriate circumstances without the threat of discrimination.

Even with the exemption in place, it would be straightforward for the defence secretary, Robert Gates, to address the matter immediately. Gates doesn't have to wrestle with the complexities that make it tough to control the behaviour of different actors in the wider society. All he has to do is issue a command that, henceforth, no member of the US military will be discharged or otherwise discriminated against on the basis of genetic testing. It's that simple.