The lawyer for a Canadian naval officer who confessed to selling military secrets to the Russians says he was stunned his client wasn't caught sooner by domestic intelligence officials who failed for years to pick up on his illicit behaviour.

Mike Taylor finds it baffling that Sub-Lt. Jeffrey Paul Delisle used such crude methods -- floppy discs and thumb drives -- to smuggle sensitive data from his secure office in Halifax to his home and then on to Russian agents via an online email provider.

The way the 41-year-old spy was paid by the Russians should also have been picked up by Delisle's superiors at HMCS Trinity, the Defence facility where he worked as a threat assessment analyst since 2010, said Taylor.

"It's amazing he wasn't caught long before he was -- absolutely amazing," Taylor said in an interview. "There are lots of things about security at that place that would make you shake your head."

Taylor wouldn't detail specific security lapses at the office, but said some of that material might come up at Delisle's two-day sentencing in Nova Scotia provincial court in January, when Taylor said it's possible his client might testify.

He said Delisle's case exposes a security system that doesn't adequately protect the secrets of Canada and its allies.

"I was astounded the more I heard about it, I just thought, 'How in the name of God did anyone miss all of this?' Well, the answer may be in the fact that security is just ridiculous. It's Swiss cheese," he said.

"I wouldn't be too surprised if it's been going on with others -- they just didn't get caught. Anyone who thinks that Mr. Delisle is the only one being pursued for this kind of thing is naive."

Delisle pleaded guilty earlier this month to breach of trust and espionage, shedding light on the double life he led since he walked into the Russian embassy in 2007 and offered his services. He was arrested in January after a trip last fall to Brazil, where he met his Russian handler to discuss his future with the agency.

He aroused suspicion only when a border agent noticed he was carrying thousands of dollars in cash and prepaid credit cards.

Recently released court documents chronicle the beginnings of his relationship with the Russians. He confessed to passing secrets to them more than an hour after RCMP investigator Jim Moffatt began questioning him after his arrest on Jan. 13.

In a transcript of his interview with Moffatt, Delisle outlined much of the evidence investigators had compiled against him, including screen grabs of his online communications with Russian agents, payments and two documents from the Canadian Security Intelligence Service that had been intercepted by the RCMP.

Delisle, who had initially denied any wrongdoing, relents and admits to approaching the Russians on his own after he says he learned his wife was having an affair.

"I am so dead," he says, breaking down and sobbing. "I loved her for 19 years and she betrayed me twice. ... I walked right into the Russian embassy and from that day on ... that was the end of my day as Jeff Delisle. The day my wife cheated. I was devastated ... crushed to no end."

Delisle, a father of four, insisted his alliance with the Russians wasn't for money, but for ideological reasons and growing dismay over what he saw as a hypocritical system -- one in which allies spied on each other.

"Canada's spying on everybody. (The) U.S. is spying on everybody ... it's demoralizing," he told Moffatt.

He said he provided the Russians with reports once a month and received about $3,000 per transaction.

Delisle admitted sending CSIS reports, information on organized crime, contact details for U.S. Defence officials and intelligence officers in Australia and Canada. He had access to several databases that included information from the Privy Council Office, RCMP, Transport Canada and the Canada Border Services Agency.

But Delisle and his lawyer both insist the material he sold never endangered Canadian military members, as it was not gathered from human sources.

"The stuff I sent them ... wasn't a risk to our security," Delisle says in the police interview.

Critics and intelligence experts alike are calling for a full accounting of how the government planned to prevent future security breaches and what it was doing to reassure allies -- including the United States and Britain -- with whom they regularly share sensitive intelligence.

Taylor said Delisle's mental state will be raised at the sentencing hearing to provide context for the judge. He added that Delisle might testify or provide a statement on his motivation.

"There was a lot going on in his life at the time. He was in a bad spot at the time, a very dark place when this whole thing started," Taylor said.

Crown attorney Lyne Decarie would not discuss the sentence she will seek.

The breach of trust charge under the Criminal Code carries a maximum sentence of five years, while two other charges Delisle pleaded guilty to under the Security of Information Act carry life sentences.

Many questions remain about how Delisle obtained his security clearance and was able to siphon secret information from the centre.

If there were problems with how Delisle was assessed for a clearance, "they should report that and make sure that steps are taken (so) that it doesn't happen again," said Ron Atkey, a former chairman of the Security Intelligence Review Committee, which keeps an eye on CSIS.

A defence intelligence facility should have an internal security officer looking for irregular movements of information and suspicious conduct, Atkey said.

The fact Delisle could pilfer sensitive information for so long "boggles my mind," he added. "I really question what sort of protections we have within our organizations.

"And how this would have gone on undetected for four years, I don't know. It's quite surprising."

A National Defence spokesman declined to answer questions about the case -- including whether anyone has been disciplined over the breach -- because Delisle has yet to be sentenced.

An internal investigation should reveal whether the breach was a one-off episode or a broader system failure, said lawyer Anil Kapoor, who served as commission counsel for the inquiry into the 1985 Air India bombing.

"I think that they're probably trying to determine what the problem is first," he said. "And I think they want to be sure before they say anything publicly."