Whenever you spend bitcoin you are revealing your public key and there is no security issue when doing so.
If my computer contains viruses, is there a risk of modifying watch-only data and inserting a suspicious public key? I mean, scammer adds their address when I click deposit.
Incorrect new transaction sign request created. scammer will change my sign data request.
When you want to make payments you normally use an address not public keys, and it is easy for a malware (commonly known as clipboard hijacker to modify that address while it is being copied).
This is why you have to double check everything before signing and before broadcasting it again.
If you share your master public key, the BIP32 one, it can be compromised when an attacker has both that and one of the child private key generated from its corresponding master private key.
Only if the derivation path doesn't contain any hardened index.