UPDATE You might able to install safetynet patch but Magisk s | BiTGApps
UPDATE
You might able to install safetynet patch but Magisk safetynet checker showing, SafetyNet API Error. That doesn't means CTS failed to pass. It is just an internal error from Magisk itself.
Meanwhile you can use this app https://play.google.com/store/apps/details?id=com.scottyab.safetynet.sample