SUNNYVALE — In a case that sends a chilling message to gossipy Silicon Valley tech workers, a former Yahoo employee has admitted in court papers that she broke her employment agreement by leaking confidential information to a journalist who wrote a book about CEO Marissa Mayer.

Cecile Lal, sued by Yahoo in May for breach of contract and fiduciary duty, has agreed in a settlement to pay the Sunnyvale company an undisclosed sum and cooperate with its ongoing investigation of the leak by handing over any information she still possesses. A civil judgment that ends the dispute was filed last month at Santa Clara County Superior Court.

“She’s just not going to contest the case,” her lawyer, Ronald Cook, said in an interview. “It’s a mutually agreed resolution which also is a mutually agreed decision not to discuss any details.”

Yahoo declined to comment Tuesday.

Business Insider writer Nicholas Carlson relied heavily on dozens of anonymous sources to recount Mayer’s first two years running the struggling Internet pioneer, including several unflattering missteps. His book — “Marissa Mayer and the Fight to Save Yahoo!” — appeared on bookshelves in January.

Yahoo was furious about the book, alleging in its lawsuit against Lal that it “caused unnecessary distraction within Yahoo’s workforce” and “undermined the conduct of every other Yahoo employee” who honored a promise to safeguard confidential information.

Lal was a senior director of product management, custom-branded experiences and partner portals before she left in September. The company described her in the suit as a “former rogue employee.”

Along with communicating with Carlson by phone and email, the lawsuit accused Lal of giving the author information held in a password-protected site. The leaked information apparently included Mayer’s comments during all-staff “FYI” meetings that happen each Friday in the Sunnyvale company’s cafeteria.

Carlson also declined to comment Tuesday.

In one scene in Carlson’s book and a December story he wrote for The New York Times Magazine, Mayer read a children’s book to employees during one FYI meeting. In other scenes, she was asked tough questions about a controversial employee-review policy that ranked workers on a curve. Transcripts of those meetings are kept on an intranet site called “Backyard” that is accessible only to full-time employees, according to the lawsuit.

The settlement document filed in the San Jose courthouse on July 1 says Lal admitted disclosing “certain confidential Yahoo information” to Carlson. To end further legal proceedings, she agreed to pay a confidential sum for damages incurred by Yahoo as a result of her breach of the company’s contract and code of ethics. She also agreed to a court ruling signed by Judge William Elfving that orders her to immediately return all confidential information in her possession and cease accessing or disclosing any more Yahoo confidential information.

California free speech advocate Peter Scheer said he was surprised that the judge didn’t dismiss the lawsuit before it reached a settlement, since it does not appear that any of the leaked information about Mayer’s leadership or Yahoo’s workplace atmosphere was so competitively sensitive that it qualified as a trade secret.

“There’s a genre of investigative journalism that writes not about governments but about large corporations or powerful corporations, or corporations of interest for whatever reason,” said Scheer, executive director of the First Amendment Coalition. “It can be hazardous work for journalists and their sources. Reporters or writers are subject to certain special protections under the First Amendment. Confidential sources, quite frankly, are not, and there’s a fundamental unfairness in our legal system.”

The case could make it harder, at least for some time, for the public to find out what happens at Yahoo and other companies, Scheer said. That’s a problem, he added, since the public has a right to know about big corporations that, much like government agencies, employ thousands of people and have a “tremendous influence over public policy.”