WASHINGTON (AP) _ Convicted spy Christopher Boyce told a Senate panel Thursday how he, as a 21-year-old amateur, thwarted U.S. security measures and passed defense secrets to the Soviet Union for a year before being caught.

Boyce, on whom the book and movie ''The Falcon and the Snowman'' is based, said he was given ''Top Secret'' clearances in 1974 at a TRW Inc. plant even though he took drugs and was critical of U.S. policies.

TRW executives testified later that security at the plant has been improved since Boyce's arrest in 1975.

In an appearance before the Senate subcommittee on investigations, Boyce said government investigators checking his background were satisfied finding no previous arrest record and hearing from friends of his parents that he was the ''courteous, bright, responsible son'' of an upper-middle-class family.

''To my knowledge, they never interviewed a single friend, a single peer, during the entire background investigations,'' Boyce told the panel on its third and final day of hearings on tightening government security.

''Had they done so, they would have interviewed a room full of disillusioned longhairs, druggie surfers, wounded paranoid vets, pot-smoking anti-establishmen t types and beaded malcontents,'' he said.

Boyce recounted how he acquired a security pass his first week on the job and how he used it to enter the Redondo Beach, Calif., plant and photograph plans for U.S. satellites at any time of day. He passed the photographs to his long-time friend, Andrew Daulton Lee, who delivered them for money to KGB agents at the Soviet embassy in Mexico City.

Lee was convicted of spying in a separate trial and is serving life in prison. Boyce is serving a 68-year sentence.

''I lacked even the most rudimentary skills this subcommittee would associate with espionage,'' Boyce said. ''Even today, I am still astounded at how easy the thing was to begin with, and given the security system, how near impossible it was to prevent.''

TRW Vice President Paul W. Schwegler said security at the plant was never as lax as Boyce said it was, but he said employees and visitors are now searched and that all worker contact with sensitive materials is electronically recorded.

''The intervening years have brought improvements in security practices and procedures as well as improvements afforded by technology,'' Schwegler said.

At previous hearings, government officials outlined procedures under which 4.2 million federal employees and contractors have been granted security clearances.

Subcommittee members Sam Nunn, D-Ga., and Albert Gore, D-Tenn., have said government background checks are too shallow and have called for federal legislation that would make it harder to obtain access to secret materials.