T05 · Unauthorized Access and Privilege Escalation
- Location
SKILL.md:27- Finding
Temporary Agent Is Instructed to Read the Entire Shared Secrets File
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
This skill sends QQ notifications as advertised, but it handles a local messaging key in an under-scoped and inconsistently documented way.
Install only if you are comfortable with this skill reading a local Qmsg key and sending message text to qmsg.zendee.cn. Use a dedicated Qmsg-only secret, avoid placing unrelated credentials in the same secrets.json file, do not send sensitive message content, and treat logs as potentially containing request details if failures occur.
SKILL.md:27Temporary Agent Is Instructed to Read the Entire Shared Secrets File
qmsg_push.py:8Qmsg Credential Is Embedded in the Request URL and May Leak Through Logs
README.md:3Credential Requirements and Runtime Secret Paths Are Documented Inconsistently
The skill description claims message push works 'without API Key', but the body instructs the user to obtain a KEY and store it in secrets.json, creating a material mismatch between declared behavior and actual resource use. This kind of misrepresentation is dangerous because it can mislead users and policy systems about credential handling, local secret access, and external transmission requirements.
The workflow explicitly states that the agent reads ~/.workbuddy/secrets.json and then sends data externally, confirming that the skill operationally accesses local credentials during execution. In an agent context, this is sensitive because any skill that reads secrets and performs outbound communication can become a conduit for credential misuse or unintended data exfiltration if not tightly constrained.
## 工作流程
1. 自动化任务触发 → 创建临时 agent
2. agent 读取 `~/.workbuddy/qmsg_push.py` 和 `~/.workbuddy/secrets.json`
3. 执行脚本,消息推送至配置的 QQ 号
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
import pathlib
def get_qmsg_key():
cfg = pathlib.Path(__file__).parent / "secrets.json"
return json.loads(cfg.read_text())["qmsg"]["key"]
def send_qmsg(message: str) -> dict:
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
import pathlib
def get_qmsg_key():
cfg = pathlib.Path(__file__).parent / "secrets.json"
return json.loads(cfg.read_text())["qmsg"]["key"]
def send_qmsg(message: str) -> dict:
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
import pathlib
def get_qmsg_key():
cfg = pathlib.Path(__file__).parent / "secrets.json"
return json.loads(cfg.read_text())["qmsg"]["key"]
def send_qmsg(message: str) -> dict:
The skill declares no explicit tool scope even though its documented behavior requires reading local files and sending data over the network. In an agent ecosystem, missing permission boundaries can cause the runtime or user to underestimate what the skill is allowed to access and transmit, increasing the risk of unintended secret access or outbound exfiltration.
The markdown instructs the agent to read a secrets file and send messages to an external service, but it does not warn users that credentials will be accessed or that message contents will leave the local environment. In agent-driven workflows, lack of disclosure makes accidental transmission of sensitive content more likely.
The manifest description says '无需 API Key' ('no API key needed'), implying the skill can operate without credential material. In practice, the implementation reads qmsg.key from secrets.json and embeds it into the request URL, so the advertised behavior does not match the code's actual requirement.
For a skill described as sending notifications 'without API Key', accessing a local secrets file to retrieve credential data is not justified by the stated purpose as presented to users. The capability itself may support message sending, but it conflicts with the declared no-credential operating model.
The function loads a messaging service key from a local secrets file, which is a sensitive credential access path. There is no docstring, comment, or user-facing notice explaining that the script reads stored credentials.
The function sends arbitrary message content to an external third-party service without any explicit disclosure, consent flow, or data-classification guardrails. In an agent ecosystem, this can cause unintended exfiltration of sensitive prompts, personal data, tokens, or operational details if callers pass unreviewed content to the notifier.