Language: Python
Label: vulnerable
CWE: CWE-532 \u2014 Insertion of Sensitive Information into Log File
Information written to log files can be of a sensitive nature and give valuable guidance to an attacker or expose sensitive user information.

Code:
    def _get_data(self):

        LOG.debug("Machine is a Vultr instance")

        # Fetch metadata
        self.metadata = self.get_metadata()
        self.userdata_raw = self.metadata["user-data"]

        # Generate config and process data
        self.get_datasource_data(self.metadata)

        # Dump some data so diagnosing failures is manageable
        LOG.debug("Vultr Vendor Config:")
        LOG.debug(util.json_dumps(self.metadata["vendor-data"]))
        LOG.debug("SUBID: %s", self.metadata["instance-id"])
        LOG.debug("Hostname: %s", self.metadata["local-hostname"])
        if self.userdata_raw is not None:
            LOG.debug("User-Data:")
            LOG.debug(self.userdata_raw)

        return True