Back to skill

Security audit

QQ Zone Photo

Security checks for vulnerabilities and agentic risk

Overview

This QQ Zone photo skill is purpose-aligned, but it asks for full-access session cookies and account-changing actions while under-declaring its required capabilities and lacking an auditable implementation.

Review carefully before installing. Only use this with a QQ account you are willing to grant album-management access to, keep cookies.json out of shared, synced, or source-controlled folders, and require explicit confirmation before uploads, album creation, or bulk downloads. The package should disclose exec/network/write needs and include the referenced implementation before it is treated as fully auditable.

Vulnerability Patterns
  • 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
  • Embedded Malicious CodeShips malicious scripts inside the skill and executes them locally
Findings (1)

T09 · Insecure Skill Coding Practices

Warning
Location
SKILL.md:87
Finding

Plaintext Storage and Manual Extraction of Full-Access Session Credentials

Content
View full analysis

Vulnerability Details

File Location: SKILL.md, lines 87–110
Vulnerability Type: Plaintext sensitive credential storage
Risk Level: Medium

Vulnerable Code Snippet

markdown
### Cookie 文件格式

创建 `cookies.json`,结构如下:

```json
{
  "qq_number": "123456789",
  "p_skey": "your_p_skey_value",
  "skey": "your_skey_value",
  "uin": "o0123456789"
}

获取方式

  • 推荐:使用 --action login 扫码登录,Cookie 自动保存
  • 手动:登录后,通过浏览器开发者工具(F12 → Application → Cookies)提取

🔒 安全与隐私

  • Cookie 文件包含 QQ空间完整访问权限,请勿泄露或分享
  • 凭证仅存储在本地,不会上传到任何服务器
text

### Technical Analysis

The Skill instructs users to extract authentication cookies manually or save them automatically in a plaintext `cookies.json` file. The documented fields include `p_skey`, `skey`, and `uin`, which collectively represent sensitive QQ session credentials. The documentation explicitly states that the cookie file grants complete access to the user's QQ Zone.

No controls are specified for owner-only file permissions, operating-system credential storage, encryption at rest, secret redaction, expiration cleanup, repository exclusion, or protection from backups and synchronization services. Storing reusable session credentials in an ordinary JSON file makes them accessible to other processes operating under the same account and creates a risk of accidental disclosure through source control, shared directories, cloud synchronization, logs, or backups.

The statement that credentials remain local does not mitigate local disclosure and cannot be independently verified because the referenced implementation file, `scripts/qzone_photos.py`, is absent from the audited package.

### Attack Path

1. A user follows the Skill instructions and authenticates through QR login or manually extracts `p_skey`, `skey`, and related cookie values.
2. The credentials are stored unencrypted in `cookies.json`.
3. The file is created with permissive inher
...[truncated 1127 chars]
Remediation
View remediation

Remediation Suggestions

  1. Store session credentials in an operating-system credential manager, such as macOS Keychain, Windows Credential Manager, or Linux Secret Service, instead of a plaintext JSON file.
  2. If a cookie file is unavoidable, create it with owner-only permissions from the outset, such as mode 0600 on Unix-like systems, and reject files readable by other users.
  3. Add cookies.json and equivalent credential files to .gitignore and provide a non-secret example file containing placeholders only.
  4. Avoid recommending manual extraction of browser cookies. Use a constrained authentication flow that retrieves only the credentials required for the requested operation.
  5. Never print cookie values in command output, errors, debug logs, or Agent responses. Apply explicit redaction to p_skey, skey, and other session identifiers.
  6. Store credentials outside the project and download-output directories to reduce accidental inclusion in archives, synchronization, or source-control commits.
  7. Delete expired credentials securely and provide a documented logout or revocation procedure.
  8. Warn users against placing the credential file in shared folders, cloud-synchronized locations, or backups without encryption.
  9. Include the referenced implementation in the package so its credential storage, network destinations, TLS validation, and logging behavior can be independently audited.
Vulnerability Patterns
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
Findings (5)

Vague Triggers

High
Category
Not specified by scanner
Confidence
97% confidence
Finding

The trigger keywords include broad everyday terms such as photo, zone, and 管理, which can cause accidental activation outside the intended QQ Zone context. Because this skill can handle sensitive cookies and perform account actions like upload or album creation, overly broad triggers materially increase the risk of unintended execution against a user’s account or files.

Content

No source excerpt is available for this finding.

Scope Creep

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

The manifest declares only the read tool, but the skill documentation instructs the agent to perform actions that modify remote state and local files, including login, upload, album creation, and downloads. This permission/documentation mismatch is dangerous because it can mislead users and policy layers about the skill’s real capabilities, increasing the chance of unsafe approval or execution in a more privileged environment.

Content

No source excerpt is available for this finding.

Vague Triggers

High
Category
Not specified by scanner
Confidence
96% confidence
Finding

The later keyword list repeats the same problem of broad, ambiguous triggers without defining context or safety boundaries. In a skill that can authenticate and alter remote content, repeated ambiguous activation guidance makes accidental invocation more likely and increases the chance of unauthorized or unintended account operations.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

L007 写明“支持中文交互与结构化输出”,在当前表述下技能面向交互语言被限定为中文,但没有说明是否允许用户选择其他语言,也没有给出必须限定中文的合规或地域性理由。根据语言/地区策略,这属于缺少用户选择的语言约束。

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The statement that credentials are only stored locally is misleading in the context of a QQ login flow, because the credentials or session artifacts must necessarily be transmitted to QQ services for authentication and API use. Misstating credential handling can cause users to underestimate exposure of highly sensitive cookies that grant full account access.

Content

No source excerpt is available for this finding.