[Magisk] Slim K:
MicroG inherently uses a GMS core the same as normal GPS, it's just modified a "bit" to remove unnecessary "parts". It also uses DroidGuard the same as normal GPS. There however may be some conflicts with PIF and/or other SafetynetFix implementations due to the way these modules and MicroG interact (Zygisk modifications of GMS parts).

If your device pases Basic_Integrity but CTS doesn't, then the solution for this has been added since MicroG version ≥ v0.2.23.21.214816 (current version is v0.3.0.233515) in the form of profiles.

FYI, My ROM's (CalyxOS) MicroG is built-in unlike "systemless" MicroG, so this method has no guarantee to work, but should also work for it in "theory", you will have to test yourself. In as simple terms as possible:

Your device should pass BASIC_INTEGRITY first. If not, Look at Kdrag0n/Displax's module and take the necessary parts from it (create your own module or modify it), you only need the resetprop and SELinux stuff found in Service.sh/system.prop. The Zygisk folder along with SNFix.dex should be discarded as it's not needed. Also pay attention to your Denylist. I cannot help more in this part since my device already passed it and im lazy.

The CTS part is very similar to PIF, in that you have to create your own xml (instead of a json) populated with a fingerprint and build.prop information that passes PlayIntegrity/SafetyNet. The following is an example of how the xml should look like: (nice try google spies, this code already doesn't pass cuz nexus5x ofc) :sneaky:

<?xml version="1.0" encoding="utf-8"?>
<profile name="Google Nexus 5X (Android 8.1.0)" product="bullhead" sdk="27" id="bullhead_27" auto="true">
<!-- Data from OPM3.171019.016, Mar 2018 -->
<data key="Build.BOARD" value="bullhead" />
<data key="Build.BOOTLOADER" value="BHZ31b" />
<data key="Build.BRAND" value="google" />
<data key="Build.CPU_ABI" value="arm64-v8a" />
<data key="Build.CPU_ABI2" value="" />
<data key="Build.DEVICE" value="bullhead" />
<data key="Build.DISPLAY" value="bullhead-user 8.1.0 OPM3.171019.016 4565142 release-keys" />
<data key="Build.FINGERPRINT" value="google/bullhead/bullhead:8.1.0/OPM3.171019.016/4565142:user/release-keys" />
<data key="Build.HARDWARE" value="bullhead" />
<data key="Build.HOST" value="wpdt4.hot.corp.google.com" />
<data key="Build.ID" value="OPM3.171019.016" />
<data key="Build.MANUFACTURER" value="LGE" />
<data key="Build.MODEL" value="Nexus 5X" />
<data key="Build.PRODUCT" value="bullhead" />
<data key="Build.RADIO" value="unknown" />
<data key="Build.TAGS" value="release-keys" />
<data key="Build.TIME" value="1516849845000" />
<data key="Build.TYPE" value="user" />
<data key="Build.USER" value="android-build" />
<data key="Build.VERSION.CODENAME" value="REL" />
<data key="Build.VERSION.INCREMENTAL" value="6d95f5a143" />
<data key="Build.VERSION.RELEASE" value="8.1.0" />
<data key="Build.VERSION.SECURITY_PATCH" value="2021-10-05" />
<data key="Build.VERSION.SDK" value="27" />
<data key="Build.VERSION.SDK_INT" value="27" />
<data key="Build.SUPPORTED_ABIS" value="arm64-v8a,armeabi-v7a,armeabi" />

<serial template="005b56ffff999999" />
</profile>

After you finish setting up your custom xml that you found the suitable build.prop for, go to your microG settings app ---> Google device registeration ---> import custom profile and select your custom xml saved in your phone's storage. (that you hopefully transferred there or created on your phone)

Go back and then change your profile in "Select profile" from "Native" to your custom profile.

PROFIT!!! now it should pass CTS. (it did for me)

Hope I helped 😁