An Israeli man who worked as a house cleaner for Defense Minister Benny Gantz was recently arrested for offering to spy on the minister on behalf of Iran, the Israeli Security Agency, Shin Bet, announced on November 18.

The Shin Bet said that the man, Omri Goren, was arrested shortly after he contacted the Iran-linked hacking group Black Shadow, and before he could do any damage.

Goren was accused of espionage, a crime that carries a sentence of 10 to 15 years in Israel. The The 37-year-old Lod resident had many run-ins with the law in the past. Between 2002 and 2013, he was found guilty of crimes five times, including two convictions for bank robbery and others for theft and breaking-and-entering.

Goren contacted a representative of the Black Shadow group, which recently hacked a popular Israeli LGBT dating site. He offered the group to transfer information from Gantz’s house in exchange for money.

According to the Shin Bet, Goren discussed the possibility of installing malware on Gantz’s computer. The malware would have given the Iranian-linked hacking group access to the minister’s device.

In order to prove his ability and sincerity, Goren took photographs of Gantz’s desk, computer, phone and tablet, a closed safe and a shredder, pictures of Gantz and his family and a copy of the minister’s local property tax payments then sent them to the Black Shadow group.

“It should be stressed that in light of operational security protocols in the minister’s house, Omri was not exposed to classified materials and therefore no such documents were transferred to the figures with whom he was in contact,” the Shin Bet said.

Goren’s case exposes some serious flaws in Israel’s security. The Shin Beit has already launched an internal review of the way background checks are performed for workers in ministers’ homes.