> What would a solution to this look like?
Sandboxing and auditing built into the software from the start. Browser Extensions solved this ages ago.