Your second point is a great point, and I believe that there should be a user prompt every time something tries to read from the password database over any API.
With that said, what's the threat model for the first point? Is localhost interception a serious risk?