Works like a charm. Lucky me that this morning I froze my banking apps with Titanium backup and then I flashed a custom kernel followed by a safetynet check 2 hours later, which turned red, to my surprise. Then I got here and thanks to this module, I'm still rooted. So thanks for the link!I just found a fix. Download and flash following magisk module. Keep in mind that you need to unzip and rezip the raw files again, as otherwise the files will be inside a folder inside the zip.
A universal fix for Google SafetyNet on Android devices with hardware attestation and unlocked bootloaders. - kdrag0n/safetynet-fixgithub.com
You can read more about the recent safetyNet change here.