Department of Defense officials announced yesterday that they will begin a study of how activities at military facilities affect the Chesapeake Bay and will test to see if toxic wastes are being discharged through the sewer systems from these facilities.

Joining a growing number of state and federal officials who have climbed aboard the "Save the Bay" bandwagon in the past two years, representatives of the Army, Navy, Air Force and Defense Logistics Agency announced the $500,000 effort at a meeting for about two dozen government officials and environmentalists at Fort Belvoir.

"Environmental protection is as much a state of mind as anything else," Carl J. Shafer, director of environmental planning for the Defense Department, told those attending the meeting.

The military officials, noting an agreement between Defense and the Environmental Protection Agency last year, gave themselves high marks for their efforts to curb pollution going into the bay, citing about $187.9 million spent on environmental cleanup at the military facilities during the past decade.

But some state and federal environmental officials said military bases have not shown much of an environmental conscience in the past and have escaped the scrutiny to which private industry and public sewer plants have been subjected.

The Department of Defense has more than 60 facilities, covering 400,000 acres, in the Chesapeake watershed. In Virginia, Maryland, the District and Pennsylvania, 17 military bases discharge major sewage or industrial waste into the bay, according to EPA officials. Another 90 facilities, from Andrews Air Force Base to the Scranton Army Ammunitions Plant in Pennsylvania, are considered minor dischargers into the bay, officials said.

EPA officials are responsible for assuring compliance with pollution laws at federal facilities in Maryland and the District, but state officials have control of federal facilities in Pennsylvania and Virginia.

Many military facilities that do not have government permits to dump industrial waste through pipes into bodies of water such as the bay dump their waste into sewage treatment plants. Under the 1972 Clean Water Act, industries that discharge into sewers must first cleanse the waste of pollutants that are dangerous, especially those that can impair the sewage plant's performance. Military sewage plants are excluded from that rule and the cleanup has not been done, according to EPA officials.

The Clean Water Act also requires industries and sewage plants to get government permits to dispose of waste into water systems. The permits, which were to be renewed every five years, were supposed to gradually decrease pollutants in waste water until July 1985, when they were to have been eliminated.

This goal has not been met and remains a distant target on military bases, according to government sources, permit files and federal documents.

"There are still some federal facilities in Virginia that never had permits, and many of those that do have a basic quick permit that didn't look too hard at the facilities. Essentially they have their sewage plants permitted, but not their industrial facilities," said David Bailey, former enforcement chief for the Virginia Water Control Board and now a lawyer with the Environmental Defense Fund. "The pollution component from the federal facilities is still unknown."

Military activities often are cloaked in the secrecy of national security, according to federal and state environmental officials.

"A lot of it's secret," complained one EPA official. "There are a number of military installations we have to deal with that we don't even know what's going on inside."

And Joseph Galda, chief of the water permits branch for the EPA office that oversees the bay, said that controlling military waste disposal was not a "matter of environmental priority" until December 1983, when the EPA and the bay states agreed to clean up the Chesapeake. A year later, then-EPA Administrator William D. Ruckelshaus and Secretary of Defense Caspar W. Weinberger signed a joint resolution committing the military to safeguard water quality in the bay.

"It was interesting about the military, because Cap Weinberger got so excited about it," Ruckelshaus recalled, in a telephone interview from his Seattle office this week. "I warned him it might take a decade to fix it the bay and he said, 'Well I really want to get in on it.' "

But the military never can come under the same scrutiny as other dischargers, according to officials and environmentalists.

"At Newport News, you have to get permission at least a week ahead to get an inspection and I understand they're tightening up, with all this spy crap," Bailey said. "So there's no such thing as an unannounced inspection."