wzpan / wukong-robot

🤖 wukong-robot 是一个简单、灵活、优雅的中文语音对话机器人/智能音箱项目,支持ChatGPT多轮对话能力,还可能是首个支持脑机交互的开源智能音箱项目。

Home Page:https://wukong.hahack.com/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Potential security issue of information leakage

nevercodecorrect opened this issue · comments

The robot is interesting and I found a few potential security issue while reading the source code.

In code here, openai_api_key is directly printed, this could potentially leak the key as decribed in (CWE-532)[https://cwe.mitre.org/data/definitions/532.html]. The print statement could be redacted or set to be read only?

A similar issue is here, the sensitive data is directly written into local file. A more secure way like setting the file only accessible to the current user or keeping the key in memory-only could be used.