Defense Department officials ordered a sweeping review yesterday of security measures at the Pentagon in reaction to the arrest of a Navy enlisted man who allegedly boasted of walking out of his sensitive office with top secret documents.

Carl B. Feldbaum, the Pentagon's inspector general for defense intelligence, said in a telephone interview that he was asked to conduct an independent investigation of document, building and personnel security in light of the espionage charges filed against Lee Eugene Madsen, 24, a special security officer for the intelligence community's Strategic Warning Staff.

Madsen is accused of stealing highly classified documents and selling them to an undercover FBI agent. He allegedly took the agent on a late night tour of his office after using a phony name to sign the agent past two guards.

He later stuffed a "top secret" document about Soviet Union and Warsaw Pact military strength down his pants and walked back past the guards, the FBI said in court papers.

"Our security procedures are honed and generally well thought out," Feldbaum said. "But I'll take a look at everything to see if there is a systematic problem that we can fix."

He said for instance, that he will check why security guards in the super-sensitive area where Madsen worked were from the General Services Administration rather than the military.

The Central Intelligence Agency undertook a similar review of its security measures a year ago after William Kampiles, a low-ranking CIA officer was arrested and convicted for stealing a top secret spy satellite manual and selling it to the Soviet Union.

A CIA official said yesterday that the review resulted in tightened procedures, including more frequent checks of briefcases of departing employes. "But the bottom line is you've got to trust somebody. You can't make everyone strip and take a shower each night on the way home to make sure they're not taking something with them."