T09 · Insecure Skill Coding Practices
- Location
scripts/send_text.py:54- Finding
Persistent Plaintext Storage of Private Message Content
- Content
View full analysis
Vulnerability Details
File Location:
scripts/send_text.py, lines 54–59
Vulnerability Type: Plaintext sensitive-data persistence
Risk Level: MediumVulnerable Code
python # debug try: Path(r"C:\Users\chenxun\.nanobot\workspace\murasame_text_debug.txt").write_text(repr(text), encoding="utf-8") except Exception: passTechnical Analysis
The script writes every processed message to a fixed plaintext debug file before transmitting the message to Feishu. Message text may contain private conversations, credentials, personal information, or other sensitive content.
This write is not required for the Skill's declared text-and-voice messaging functionality. The file is created without an explicit restrictive permission mode, encryption, retention limit, or user-controlled diagnostic setting. Reusing a fixed path also leaves the most recently processed message available after the sending operation has completed.
The broad exception handler suppresses all write failures, making the logging behavior difficult for users and operators to observe or audit.
Attack Path
- A user submits sensitive text to the Skill.
send_text.pystoresrepr(text)inmurasame_text_debug.txt.- The plaintext remains in the workspace after the message is sent.
- A local user or process with read access to that workspace opens the file.
- The actor obtains the most recently logged message content without accessing Feishu.
Impact Assessment
Exploitation requires local read access to the configured workspace or an equivalent compromise of the user account. It does not directly grant elevated system privileges.
Successful exploitation discloses the most recently processed message and may expose personal data, confidential conversation content, tokens pasted into a message, or other application secrets. The scope is limited by the fixed file being overwritten, but filesystem backups, sn ...[truncated 56 chars]
- Remediation
View remediation
Remediation Suggestions
- Remove the debug file write because it is not necessary for message delivery.
- If diagnostics are operationally required, make them explicitly opt-in through a disabled-by-default setting.
- Do not log message bodies. Record only non-sensitive metadata such as a request identifier, message length, or success status.
- Apply restrictive filesystem permissions and a short retention policy to any unavoidable diagnostic files.
- Report diagnostic failures through controlled error handling rather than silently suppressing every exception.
- Delete existing copies of
murasame_text_debug.txtand review backups or snapshots according to the applicable data-retention policy.
