import json


def set_safetynet_passing(payload: bytes) -> bytes:
    """Modify the SafetyNet JSON payload to set integrity / profile match to True.
    """
    decoded_payload = json.loads(payload)
    decoded_payload['basicIntegrity'] = True
    decoded_payload['ctsProfileMatch'] = True
    return json.dumps(decoded_payload).encode()