A flaw was found in the Ansible Lightspeed extension for Visual Studio Code. This vulnerability allows an attacker with local access to the workstation, or malware running with the user's privileges, to read the Google Gemini API key. The extension insecurely stores the API key in plain text within the user's configuration file and writes it to output log files. This information disclosure can lead to the attacker obtaining the API credential and potentially consuming the user's API quota.
Users should immediately rotate and remove any exposed Google Gemini API keys. The API key entry must be manually removed from the ~/.config/Code/User/settings.json file. Additionally, ensure secure handling or purging of log files that may contain the API key.