Two of the biggest names in tech are facing serious questions about their ethics. Facebook stands accused of dirty tactics to smear opponents, Google of breaking promises on data.

On Tech Tent we look at a difficult week for the reputation of Silicon Valley.

It was a lengthy investigation in the New York Times which sparked a new crisis at Facebook. It examined the tactics the company used to deal with the recent crises over Russian interference in elections and the harvesting of data by Cambridge Analytica.

The article painted chief executive Mark Zuckerberg as strangely detached from many decisions while chief operating officer Sheryl Sandberg was running what it called "an aggressive lobbying campaign to combat Facebook's critics, shift public anger toward rival companies and ward off damaging regulation".

That included hiring a Washington lobbying firm Definers which spread stories that George Soros - a hate figure for conservatives and the subject of anti-Semitic smears - was behind the anti-Facebook movement.

Lots of questions then not just about Facebook's ethics but whether its two most senior executives are up to the job. In a 90-minute telephone press conference, which to his credit he kept extending, Mark Zuckerberg was quizzed about these issues.

Reporters returned time and again to the hiring of the firm Definers Public Affairs and its role in attacking Facebook's opponents. "I learned about this reading the New York Times," was Zuckerberg's somewhat startling response. He said he was not very comfortable employing this kind of opposition research firm and got straight on the phone to make sure they were dropped.

Sheryl Sandberg said she also had not known about Definers. But in a Facebook post she rejected allegations that she'd tried to suppress information about Russian interference. She admitted they'd been too slow to wake up to the Russian threat but went on: "To suggest that we weren't interested in knowing the truth, or we wanted to hide what we knew, or that we tried to prevent investigations, is simply untrue."

Facebook can expect further questions from investors and regulators over just who is in charge and why the company always seems one step behind those using its platform for malicious ends.

Google's problems are not on the same scale but the row this week over alleged broken promises also reflected its failure to understand public unease about its motives.

This week its London-based DeepMind artificial intelligence business announced that its health activities, in particular a smartphone app for hospital doctors called Streams, were being handed over to the Google mother ship.

Hardly a shock you might think, except for the fact that DeepMind's founders have always stressed their independence and had promised there would never be a risk that sensitive patient records would be poured into Google's ocean of data.

Privacy campaigner and legal academic Dr Julia Powles tweeted:"This is TOTALLY unacceptable. DeepMind repeatedly, unconditionally promised to *never* connect people's intimate, identifiable health data to Google. Now it's announced...exactly that."

But DeepMind Health's medical director Dr Dominic King tells Tech Tent that there have been and will continue to be very strict controls on how patient data is used: "This health data is not DeepMind's or Google's data. It belongs to the partners we work with, whether the National Health Service or internationally, and that's not going to change with this move."

He concedes that people might worry that information about their health might be used later to target them with advertising - but guarantees that will not happen. "What's important is that this data is not being used by other parts of Google for services that our partners and their patients would not expect to happen."

But when we put that guarantee to Julia Powles she still was not satisfied: "Without any public engagement, a global company has now got access to the heart of one of the most prized socialised health services in the world."

What this highlights is the ebbing away of trust in the giant Californian companies. Google's mission to organise the world's information and Facebook's promise to bring the world closer together sounded fine a few years ago - now many of us no longer want them to play such a big role in our lives.