Citing secret testimony she had heard in a closed court session, U.S. District Judge June L. Green yesterday dismissed virtually all the claims against the National Security Agency in a civil lawsuit alleging illegal overhearing of conversations by the agency.

The session in which the testimony was heard was so secret that even the attorney for the plaintiffs did not know when it was held, and a court stenographer was brought in from the State Department with a security clearance high enough to please the government.

Judge Green's ruling upheld the Secretary of Defense's claim of "state secrets privilege" about the activities of the NSA in the suit, which was brought by persons and groups who said the government illegally spied upon them in "Operation Chaos" in the late 1960s and 1970s.

The judge said the testimony she had heard indicated disclosure of the NSA materials would affect "questions of great sensitivity to the national interest." Testifying at the secret hearing, she said, was the NSA's deputy director of operations.

In addition, she said she had received both public and secret affidavits from the Secretary of Defense supporting the specific and seldom used "state secrets privilege" claim concerning the agency.

The over NSA material that will be turned over to the plaintiffs under Judge Green's order is material that the agency acquired in the United States from cooperative international communications companies. The government had not objected to the disclosure of that material.

Attorneys for the American Civil Liberties Union said they would appeal Judge Green's decision.