Last month, as penance for its sins against the Defense Department, the General Dynamics Corp. unveiled a 20-page catechism on the dos and don'ts of corporate ethics.

The credo, which all 99,000 General Dynamics employes must read and sign, forbids "bribes, kickbacks or illegal payments of cash." It insists that "all cash transactions be recorded in the company's books" and sternly warns that "the unauthorized possession of classified documents . . . can endanger the security of this country."

If that seems like pretty elementary stuff, it reflects the defense industry's wholesale return to basics when it comes to ethics and integrity.

Under fire from the public, press and Pentagon, U.S. arms makers are fighting an image that, at best, portrays them as exploiting President Reagan's military buildup and, at worst, depicts rampant venality in the industry.

Although "most of our suppliers are pretty honest people who give us good quality," said Defense Department Inspector General Joseph H. Sherick, there is also a common attitude that "we stole it fair and square . . . . It's the American way as they interpret the American way."

Many arms makers' misdeeds seem to differ little from the infractions of corporate America at large, from Exxon overcharging customers by $900 million, according to a recent court ruling, to the Crocker National Bank failing to report to the government $4 billion in cash transactions. Those responsible frequently are mid-level managers not motivated by greed but under pressure to meet corporate profit goals.

But the defense industry also is unique in a key respect: its products, many arms makers assure themselves, will not be used for years, if ever. That unreality of future combat allows some contractors to cut corners while claiming that no one will be harmed. And, awash with cash in recent years, the industry has had little incentive to impose rigid controls, some critics say.

Forty-five of the top 100 defense contractors now face criminal investigations for suspected malfeasance, from bribery to bid-rigging. Every few weeks a new scandal seems to erupt, with the litany of allegations ranging from conspiring to obtain Pentagon documents (GTE) to falsifying bills on the MX missile (Sperry), from taking shortcuts in testing electronic chips (National Semiconductor) to bogus charges on Army helicopter contracts (Bell Helicopter Textron).

In recent months, 10 purchasing agents and executives from the Northrop Corp., Hughes Aircraft and Teledyne have been charged with collecting kickbacks, a practice the U.S. attorney in Los Angeles has said is widespread in the defense business. The illegal substitution of shoddy material is so prevalent on military machinery that an Air Force major general warned last year that "the effectiveness of our armed forces has to be reduced."

Sometimes on its own, sometimes under government pressure, the arms industry has begun responding to these scandals with loud reaffirmations of such cardinal virtues as veracity and honor. McDonnell Douglas Corp., for instance, gives all employes a laminated code of ethics based on the Boy Scout creed.

TRW Inc. fired four senior executives and handed out a dozen reprimands and demotions to other employes last year after finding that a Colorado Springs subsidiary was improperly shifting costs from one government project to another.

General Electric Co., after pleading guilty to 108 counts of fraud on Minuteman missile warhead contracts, appointed an ombudsman, issued a new code of conduct on May 14 and warned its 330,000 employes that "no corners will be cut, no rules will be bent, and no ethical lapse will be tolerated."

Whether the counterattack succeeds remains to be seen, but it still leaves certain fundamental questions unanswered. Why do military contractors cheat? Is the Defense Department victimized more frequently than other customers? Is malfeasance more prevalent now than 10 or 20 or 100 years ago? Builders 'Salve Their Conscience'

When the government accused James W. Wellham and his National Metals Corp. of fraudulently earning $1.3 million by supplying the Pentagon with substandard steel for battleships, airplanes and other weapons systems, the Nashville businessman had a ready excuse.

"Wellham contends that the stuff he supplied may not meet the rigid specifications," his spokesman said, "but it's plenty good enough to do what they wanted it to do."

Unpersuaded, the Defense Department last spring barred Wellham from being eligible for government contracts for three years and filed a $3 million civil suit against him and his company. But the rationalization that the Pentagon is too rigid in its requirements -- and the assumption that military goods are unlikely to ever be tested in battle -- crops up again and again in fraud cases.

"I think they sort of salve their conscience that way," Sherick said. "They say, 'Well, we'll never have a war, and we won't use that, and if we do, we'll always fire 10 of them anyhow.' "

Small firms sometimes offer such excuses when they get in over their heads, floundering amid Defense Department schedule and paper work demands. The giants, on the other hand, may simply be overwhelmed by the surge of business under the Reagan administration buildup.

For large firms, the buildup may create "lots of organizational slack, and internal accounting mechanisms are not very important because you're making so much money and there's no incentive to be tight," John Van Maanen, a management professor at the Massachusetts Institute of Technology, said.

The big defense contractors are now so large that senior executives contend it is often impossible to know what is going on in the ranks.

"We've got 90,000 people and we know darned well we've got something going on that we don't approve of," Sanford N. McDonnell, chairman of McDonnell Douglas, said in an interview.

Furthermore, because roughly 60 percent of the work on big weapons systems is subcontracted, the government must rely on prime contractors to police not only their employes, but the hundreds of companies they hire as well.

"It doesn't matter whether the prime is clipping us. He can be honest as the day is long," Sherick said. "But if he's got a whole tier of subcontractors who are taking us to the cleaners, we're paying the price."

But while top executives claim ignorance of the wrongdoing beneath them, they may also tacitly encourage it, critics say.

Old-fashioned avarice plays a surprisingly minor role in many defense scandals. As in the case of the falsified time cards at General Electric, mid-level managers often feel pressure to meet a schedule, stay within budget, turn in a glowing balance sheet at the end of the year.

"Personal greed may account for embezzlement," Diane Vaughan, a Boston College sociologist, said. "But we're talking about the kind of offenses that benefit the corporate organization . . . . It's more a motivation to succeed, and that doesn't necessarily mean money in the pocket."

The Pentagon's plain-spoken inspector general agreed. "In many cases we find . . . that the top people in the company make it pretty clear they don't want people to steal -- but they don't want them to lose money, either," Sherick said. "And it depends on the integrity of the manager at the lower level which message he gets, and which message he gets stronger." No Auditors Overseeing Commercial Work

During the corruption-stained presidency of Ulysses S. Grant, the secretary of war received a $25,000 kickback, Navy yards were riddled with graft -- a million board feet of lumber simply vanished from the Boston yard -- and, according to historian Samuel Eliot Morison, payrolls were padded "with the connivance of Grant's Navy secretary."

Clearly, certain problems in the arms business are as old as the Republic, if not older. "There's nothing new here under the sun," author Gordon Adams said. "The Romans probably had investigations into spear-sale mischarging in the year 20."

Some observers believe integrity issues now hounding the defense industry reflect a surge in all white-collar crime, such as E.F. Hutton's guilty plea in May to 2,000 counts of mail and wire fraud.

"The stuff that the arms makers get indicted for to some extent gets badly blown out of proportion," Nicholas Heymann, a securities analyst and former GE auditor, said. "Because there's so much of that kind of stuff that goes on in the commercial world all the time, but there's no government auditor looking over your shoulder."

Complains an official of a West Coast contractor: "Every contracting officer in the Army is waiting to make his name by pinning the tail on a contractor donkey."

But bureaucratic watchdogs cannot take the place of a commercial customer with a gut interest in the product, according to Boris Yavitz, professor of public policy at Columbia University.

The immensity of the Defense Department, he said, means that "the approval and signing off on the contract is a long, long way from where the material is used or examined"; buyers in commercial business "tend to be much more directly involved with the use of those materials . . . so when things don't fit or they're the wrong quality, there's almost an immediate reaction."

Furthermore, the sheer size of defense business magnifies issues of honesty. "The scale is so large," William W. Kaufmann, of the Brookings Institution, said. "You're talking about contracts that are running now at over $100 billion a year. If I fiddle my expense account, it's so small that it doesn't make much of an impact. But if you fiddle the same percentage on defense contracts, it's astronomical." Ethical Seminars for Managers, Workers

Rarely celebrated for introspection, many defense contractors have been compelled by the spate of scandals to contemplate some of the most fundamental precepts of their business.

"I got to thinking, 'How well am I doing?' " said McDonnell, who found working with the Boy Scouts to be cathartic. "In self-examination, I found that I was falling short in many areas."

In addition to adopting a company code in April 1983, McDonnell Douglas has sponsored ethical seminars for its managers and plans similar instruction for blue-collar workers.

The basic point, McDonnell said, is that "when it comes to a choice between the right way and increasing the bottom line, we want them every time to take the high road. That's not only the right thing to do, it's the smart thing."

The Pentagon likewise is paying more attention to fraud. More than 10,000 auditors and criminal investigators, a 20 percent increase since 1980, now troll for wrongdoing. The Justice Department has added a fraud unit specializing in defense contracts, although it has been criticized for a dearth of convictions and for focusing on small contractors.

The government "is trying to send a few shock waves," Heymann said, "and I think it's probably worked pretty well."

"Maybe," he added, "they'll try to clean it up and get it in shape so that by the time the Strategic Defense Initiative comes along with $30 or $40 billion, it will be more judiciously spent without waste or fraud."

While inspectors and auditors try to stamp out fraud, though, many experts say that sharp but legal practices will end up costing the taxpayer more. Defense Department procurement is so fiendishly complex, with rules covering thousands of pages, that finding a crease between the spirit and the letter of the law is not difficult.

"I think they pad estimates," Sherick said, when asked to cite the most prevalent problem. "I think that's basic. I think they drive prices up. I don't think anybody really knows the real cost of what it costs to make something anymore. The idea is, charge what the traffic will bear."

"I think in their hearts they know that they're taking us to the cleaners," he added, "but they say that that's not stealing, that's just being smart."