Great work! It adds new knowledge to our guide. I would just make sure we don't lose anything from MASTG-TEST-0034.md we want to deprecate. E.g. the old test describes that a serialized objects might contain sensitive data. Let's add tests and demos for these.
Also let's make sure to keep HMAC/encryption for this:
There are a few generic remediation steps that you can always take:
Make sure that sensitive data has been encrypted and HMACed/signed after serialization/persistence. Evaluate the signature or HMAC before you use the data. See the chapter "Android Cryptographic APIs" for more details.
Make sure that the keys used in step 1 can't be extracted easily. The user and/or application instance should be properly authenticated/authorized to obtain the keys. See the chapter "Data Storage on Android" for more details.
Make sure that the data within the de-serialized object is carefully validated before it is actively used (e.g., no exploit of business/application logic).
Originally posted by @serek8 in #3418 (review)