Microsoft were very quick to highlight their extensions being safer after this.
As a vscode extension author, I am scared by the power I have. I am not at all surprised by what happened in this story.
This can be solved quite easily for open source extensions: https://github.com/EclipseFdn/open-vsx.org/wiki/Auto-Publish...
Vetting however is trickier. I hope Cursor can fund this effort!
https://github.com/microsoft/vsmarketplace/blob/main/Removed...
If I were doing this I would copy the real extension, give it a name that made it sound official but in the README say it is a tweaked version with some improvements or whatever. Also actually add some improvements, but hide the malware in those changes.
Good luck finding that. (brb going to try this)