What just happened? Tesla has filed a lawsuit against a former employee for allegedly hacking into the company's systems and stealing "gigabytes" of confidential data that was sent to unnamed third parties. The news comes a few days after CEO Elon Musk revealed in a company-wide email that a disgruntled employee had been behind "extensive and damaging sabotage" at the EV giant.

First reported by CNBC, the lawsuit names former Gigafactory process technician Martin Tripp as a defendant. The suit says he has admitted to writing software that hacked Tesla's manufacturing operating system ('MOS') and transferred information to outside entities. The data included "dozens of confidential photographs and a video of Tesla's manufacturing systems."

While there's no mention of who these outside entities might be, Musk did bring up "Wall Street short-sellers," "oil & gas companies," or "the multitude of big gas/diesel car company competitors" as possible suspects in his email.

The suit goes on to say that Tripp joined the company in October 2017 and had a track record of poor performance. In addition to the hacking claims, Tesla alleges that Tripp made false statements to the media, and was the source of a punctured battery cells story.

"Tripp claimed that punctured battery cells had been used in certain Model 3 vehicles even though no punctured cells were ever used in vehicles, batteries or otherwise. Tripp also vastly exaggerated the true amount and value of "scrap" material that Tesla generated during the manufacturing process, and falsely claimed that Tesla was delayed in bringing new manufacturing equipment online," writes CNBC.

Earlier this month, Business Insider ran a story that cited internal documents showing 40% of raw materials used to produce batteries and driving units at the Gigafactory need to be scrapped or reworked.

As mentioned by Musk in his earlier email, the suit claims Tripp committed these acts because he was angry at being passed over for promotion and reassigned to a different job.