DuckDuckGo is more privacy-concerned than security-concerned, so if you want to avoid malware and viruses, you should invest in a reliable VPN, like NordVPN, and a decent antivirus. Like any other search engine, be careful about which websites you choose to visit and what you download from the web.