Back to skill

Security audit

Qmsg Push

Security checks for vulnerabilities and agentic risk

Overview

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.

Vulnerability Patterns
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
  • Insecure Skill Coding PracticesFinds exploitable flaws such as hardcoded secrets or command injection
  • Skill Instruction HijackingAlters the agent's session goals or safety constraints when the skill loads
  • Agent Memory PoisoningWrites attacker-controlled rules into memory that affect later sessions
  • Remote Payload Retrieval and ExecutionFetches external code whose behavior can change after review
Findings (3)

T05 · Unauthorized Access and Privilege Escalation

Warning
Location
SKILL.md:27
Finding

Temporary Agent Is Instructed to Read the Entire Shared Secrets File

Content
View full analysis
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
qmsg_push.py:8
Finding

Qmsg Credential Is Embedded in the Request URL and May Leak Through Logs

Content
View full analysis
dict: key = get_qmsg_key() url = f"https://qmsg.zendee.cn/send/{key}" try: r = requests.get(url, params={"msg": message}, timeout=10) return r.json() except Exception as e: return {"success": False, "reason": str(e)} ``` The returned result, including the exception reason, is printed by the command-line entry point at `qmsg_push.py:22-24`: ```python result = send_qmsg(sys.argv[1]) print(result) ``` ### Technical Analysis The Qmsg key is interpolated directly into the URL path. URLs can be retained by HTTP server access logs, forward proxies, debugging systems, monitoring infrastructure, and client-side exception diagnostics. The broad exception handler converts every exception to a string and returns it to the caller. The command-line entry point then prints that value without redaction. Some networking exceptions include the requested URL or request representation, so a failure may cause a URL containing the credential to appear in console output or automation logs. HTTPS protects the request in transit from passive network observers, but it does not prevent the endpoint, local diagnostics, trusted proxy infrastructure, or logging systems from recording the URL. ### Attack Path 1. A user configures a valid Qmsg key and invokes the notification script. 2. The script constructs a URL with the key in its path. 3. The request passes through infrastructure that records request URLs, or the request fails with an exception containing request details. 4. The broad exception handler returns the unredacted diagnostic text. 5. The command-line entry point prints that diagnostic text into a terminal or automation log. 6. A party with access to the relevant server, proxy, monitoring, or ...[truncated 567 chars]
Remediation
View remediation
` path component in all diagnostic text. - Use a dedicated, revocable, least-privilege Qmsg key. - Establish key rotation procedures and rotate the key immediately if logs may already contain it. - Review reverse-proxy and service access-log policies to ensure credential-bearing URL paths are not retained. ]]>

T09 · Insecure Skill Coding Practices

Note
Location
README.md:3
Finding

Credential Requirements and Runtime Secret Paths Are Documented Inconsistently

Content
View full analysis
Remediation
View remediation
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
Findings (11)

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

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.

Content

No source excerpt is available for this finding.

Credential Access

High
Category
Privilege Escalation
Confidence
88% confidence
Finding

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.

Content

Scanner excerpt · SKILL.md (reported line 30)May include surrounding context.

md
## 工作流程

1. 自动化任务触发 → 创建临时 agent
2. agent 读取 `~/.workbuddy/qmsg_push.py` 和 `~/.workbuddy/secrets.json`
3. 执行脚本,消息推送至配置的 QQ 号

Credential Access

High
Category
Privilege Escalation
Confidence
70% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · README.md (reported line 23)May include surrounding context.

md
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:

Credential Access

High
Category
Privilege Escalation
Confidence
70% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · SKILL.md (reported line 14)May include surrounding context.

md
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:

Credential Access

High
Category
Privilege Escalation
Confidence
70% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · qmsg_push.py (reported line 6)May include surrounding context.

python
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:

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
90% confidence
Finding

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.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

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.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
98% confidence
Finding

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.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
87% confidence
Finding

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.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
87% confidence
Finding

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.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

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.

Content

No source excerpt is available for this finding.