It is always a funny joke to say "commit this when you leave a job". But I always wondered if there are people that actually do this.
Although it could be funny and give a sense of revenge for some wrong (perceived or real) that the person leaving might have suffered, I don't think this would be a good idea. Contracts usually include liability for gross negligence or wilful misconduct.
Does anybody have a record of this actually happening at any company?
The problem with doing this, besides being incredibly unprofessional, is that it won't really affect the company much - besides reducing productivity for a little while - however it will annoy the hell out of your previous colleagues. Unless you're leaving because you fell out with your colleagues, I doubt it would have the desired effect.
Yeah everyone would notice it around the same time, look at recent commits, see some silly file got committed and revert. You'd have to have a team of pretty sub-par devs to not undo this fairly quickly. Although it would be sort of annoying for a couple of hours. In fact if you left on really good terms and were still great friends with the team, something like this might be more of a silly prank than anything truly malicious.
Obviously most of those fall easily under gross negligence.
However, I threatened to use this for the company I quit in 2010 and the threat was enough. We were negotiating and they thought a share of 100-0 in favor of the employer was ok. The law was 100 in favor of the employee. After threat we ended up at 50-50.
From the Computer Fraud and Abuse Act (18 U.S. Code § 1030(5)(A)):
>knowingly causes the transmission of a program, information, code, or command, and as a result of such conduct, intentionally causes damage without authorization, to a protected computer
English isn't my first language, and I don't live in America so it's not like this matters to me, but now I'm curious. How is editing a source file you're meant to be editing "transmitting" anything?
Transmission is probably loosely defined as a means of getting code to the target system. It would likely include physically typing into the source file, uploading your own file through CLI or GUI, or pushing to a repository.
The CFAA intentionally used broad wording, so it could be used in many different circumstances as possible. Here "transmitting" would be when the employee (who certainly doesn't have authorization to intentionally break things, mens rea) transmitted the file to the source control server.
The key is "without authorization". You're allowed to fix things and add features, but deliberate sabotage is arguably unauthorized. You might win in court, but as others said elsewhere, court is Too Expensive even if you win.
That, and I wouldn't be surprised if they didn't go after you for industrial espionage or something.
Except that you're entirely authorized to access the computer system.
Purpose or intent isn't defined in that particular law.
Do you have authorized access? Well, as an employee you do.
This isn't a criminal matter, it's a civil one, and no company is going to sue a saboteur unless they need an example made; they stand to gain nothing.
A company doesn't get to retroactively redefine what "authorized access" is as it suits them.
You have authorized access, but the statute says 'cause unauthorized damage' (which in its most literal reading could be an unintentional bug, too - don't think for a moment I'm supportive of this).
Although it could be funny and give a sense of revenge for some wrong (perceived or real) that the person leaving might have suffered, I don't think this would be a good idea. Contracts usually include liability for gross negligence or wilful misconduct.
Does anybody have a record of this actually happening at any company?