def get_tool_info(whitelist, tool_name):
    """
    Search the whitelist by tool name.

    :returns: A dictionary , or none if no tool matching that name was found.
    :rtype: dict or None
    """
    for category, category_tools in whitelist.items():
        for tool_info in category_tools:
            if tool_info.get("name") == tool_name:
                tool_info.update({"category": category})
                return tool_info

    return None