From Forbes:
"Thompson, who joins Yahoo! from eBay‘s PayPal — a curveball for a potential spinoff of that unit — also gets a $1.5 million cash bonus and a restricted stock award valued at $6.5 million in return for giving up cash and equity awards he was due from his old job. Both are subject to clawback provisions if he “terminates his employment without good reason” during his first year at Yahoo!."
Obviously resigning due to ethical reasons would not be a good reason.