Back to skill

Security audit

Wechat Freepublish

Security checks for vulnerabilities and agentic risk

Overview

This skill performs the stated WeChat publishing action and clearly warns that it requires explicit user confirmation before posting.

Install only if you intend to let the agent submit final WeChat public-account publications. Confirm the media_id carefully and keep WECHAT_ACCESS_TOKEN scoped and protected, because a successful run publishes to followers.

Vulnerability Patterns
  • 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
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
Findings (2)

Lp3

Medium
Category
MCP Least Privilege
Confidence
91% confidence
Finding
The skill invokes a Python script that relies on an environment secret and performs a network-side effect, but the manifest does not declare any explicit tool scope such as permissions or allowed-tools. This weakens least-privilege controls and makes it easier for an agent runtime to execute a sensitive publish action with broader-than-necessary access, especially because the action causes irreversible external publication to all followers.

External Transmission

Medium
Category
Data Exfiltration
Content
def submit_publish(media_id, access_token):
    """调用微信发布接口"""
    url = f"https://api.weixin.qq.com/cgi-bin/freepublish/submit?access_token={access_token}"
    
    data = json.dumps({"media_id": media_id}).encode('utf-8')
Confidence
60% confidence
Finding
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Static analysis

Detected: suspicious.exposed_secret_literal

File appears to expose a hardcoded API secret or token.

Critical
Code
suspicious.exposed_secret_literal
Location
scripts/publish.py:72