According to a Google support page, a small change should be hitting select Android devices in the future, most likely Nexus devices, one which will inform you if your smartphone or tablet is secure for using. Upon boot, if you happen to be an OS tinkerer and flash custom OS images, you may see one of the follow warnings.
A Yellow warning will inform you that your device has loaded a different OS, allowing you to either dismiss the warning or instructing you to follow a link that gives instructions on how to flash the stock image file for your device. An Orange warning means the device software can’t be checked for corruption. The same options are offered – you can either dismiss and continue using your phone, or flash a stock image. A Red warning, which looks somewhat scary, indicates the device is corrupt and “can’t be trusted.”
Of course, if you tinker, then it is likely that all of these warnings will be seen from time to time and you won’t need to worry about it. However, if you do not tinker, and you somehow come across these warnings, it may be a good idea to go ahead and flash a fresh image to your device, just to be safe.
It is reported that these changes may come preloaded with Android M, but that has yet to be confirmed by Google. Regardless of when it comes, it is nice of Google to be proactively looking out for users, even if they will likely cause a bit of annoyance for frequent custom ROM flashers.