While I agree that OS vendors have the right to implement a code of conduct for developers. Yet, I don't think that also limiting what they can develop and how it can be developed on the OS.
A great OS, is one that is open for all to develop whatever software developers thing there is a need of and for the user to be able to use the software that better fits his needs. Users should be who decide what software they want to use, and from which developer.
The vendor should limit itself to checking that developers behave themselves according to the code of conduct that was set by the vendor. Otherwise, the vendor should be neutral on what runs on the OS.
Without this level of openness, users can suffer from lack of choice and innovation. The vendor holds a virtual monopoly on what, and how, any piece of software can be implemented. Meaning that they can shut down any developer that does anything that competes on an area they don't want anyone to do so. In essence, the vendor has the power to lock down the user to state that it chooses.
The best way to keep the user safe is not by limiting what the developer can do, and how he can do it. The best way to do so is by educating the users on best practices, and keeping an eye on developer behavior. By doing so, the OS can be as safe as it can be, but let's keep in mind that all have vulnerabilities and bad guys will try to exploit them.
So, if we enlist the both users and developers to make use of best practices the OS software ecosystem will be as safe as it can be. There should be clear behavior guidelines and what will happen if they are breached, with clear penalties depending on the severity of the breach.
Being as open as possible about the software that runs on an OS, is the best option for everyone involved.