def mask_inquiry_response(response, schema):
    """
    Introspect an Inquiry's response dict and return a new dict with masked secret
    values.

    :param response: Inquiry response to process.
    :type response: ``dict``

    :param schema: Inquiry response schema
    :type schema: ``dict``
    """
    result = fast_deepcopy_dict(response)

    for prop_name, prop_attrs in schema["properties"].items():
        if prop_attrs.get("secret") is True:
            if prop_name in response:
                result[prop_name] = MASKED_ATTRIBUTE_VALUE

    return result

    Introspect an Inquiry's response dict and return a new dict with masked secret
    values.

    :param response: Inquiry response to process.
    :type response: ``dict``

    :param schema: Inquiry response schema
    :type schema: ``dict``
    
st2common/st2common/util/secrets.py