Compound is considered to be safe to use by the crypto community. They have standard security and cryptography measures in place, and the platform still hasn’t suffered from any serious attack. Their code is open-source so the community can notify them if they spot something that could potentially harm the platform, and they also offer bug bounties to reward developers who finds any vulnerabilities.
Of course, no crypto platform is ever completely safe, so if you are going to use their platform, we advise you do your own research on this topic.