The first question to ask about the draconian anti-leaking legislation passed by the Senate intelligence committee last week is whether it applies uniformly to all branches of government that may disclose classified information unlawfully.

And the answer is: Of course not. Members of Congress and their staffs are entirely exempted from the new rules that may require for others more polygraphs, more paperwork and the possible loss of pension benefits. White House and other executive-branch officials (weren’t they the supposed targets?) are also exempt from most of the new rules.

No, Sen. Dianne Feinstein’s bill does the usual congressional thing when there’s a flap involving intelligence matters: It whumps on the intelligence agencies themselves. That’s where the committee’s jurisdiction lies, so that’s where the hammer falls.

But after 35 years of writing about intelligence matters, I want to confide a journalistic secret: Most damaging leaks don’t come from U.S. intelligence agencies. They come from overseas, or they come from the executive branch, or they come, ahem, from Congress. The bill doesn’t address the real source of the leaks it seeks to halt.

It’s worse than that, actually: This bill may chill the conversations that now take place between journalists and intelligence officials when reporters do receive sensitive classified information (from overseas, let’s say) and want to know what damage its publication might cause. Those exploratory conversations will now have to be logged and reported to Congress, as evidence that a leak may be imminent. Guess what? This will mean fewer such conversations.

The purpose of this column isn’t to argue that there’s no leak problem or to cloak this issue in a Jeffersonian view that more disclosure is better than less, even at a cost (though I think the Founders were right about that). But even journalists would agree that a mind-boggling amount of classified information winds up in print (and has for decades) — and that potential sources may wonder if the United States can keep secrets. In other words, there’s a real issue here, worth debating.

But the Feinstein bill has so many bad provisions that it needs another careful look. To wit:

●The bill creates a cumbersome system whereby the executive branch must tell Congress each time it intends to make an “authorized” disclosure of previously classified information. A practical example was the administration’s decision to declassify and disclose some of Osama bin Laden’s communications this year. The question is: Why is this sort of disclosure a concern of Congress, requiring concurrent notification? Surely it falls squarely under the president’s Article II powers.

●The bill suggests extending the polygraph tests now given to intelligence personnel “to additional executive branch personnel.” That’s a dubious idea if you’re skeptical about polygraphs. And note that Congress isn’t included. (In fact, the members of Congress who see the most sensitive classified information aren’t even given a security check!)

●The bill includes a “talking head” provision that bans any official or contractor who’s had a top security clearance from being a paid media commentator for a year after leaving the government. Nobody could give me an example of what problem this is supposed to solve.

●The bill limits media contacts by intelligence agencies to the director or deputy, or a designated public affairs officer. This is a terrible idea, because it would ban analysts with special expertise from giving unclassified briefings to journalists. Director of National Intelligence James Clapper argued strenuously against this and other aspects of the bill, and Feinstein (D-Calif.) is apparently reconsidering.

●The bill would strip away pension benefits from anyone who makes unauthorized disclosures. This provision seems pointless because the CIA and other agencies already have strict contractual systems enforcing nondisclosure by their employees. Probably, as with much else in the bill, the aim is simply to frighten government employees.

●The bill mischievously encourages the attorney general to consider changing policies on issuing subpoenas to reporters to compel them to reveal sources of leaks. This is a bad idea — not just for journalists but for the country.

Let’s consider, finally, some of the unanticipated consequences this legislation would produce: First, it would reduce useful contacts between journalists and the government about potentially dangerous leaks. Second, it would give foreign sources (who can keep shoveling secrets because they don’t live in Feinstein’s world) greater leverage over U.S. public opinion.

In other words, the Senate bill would create a counterintelligence problem while purporting to solve a leak problem. This bill deserves another look.