To protect disk libraries from Ramsomware, you can activate Ramsomware Protection on properties of Commvault Media agent
Another important feature, you can get alert if commvault backed up encrypted ransomware files
Protect Commvault Disk Libraries from Ransomware