Back to skill

Security audit

Global Skill Daily

Security checks for vulnerabilities and agentic risk

Overview

This daily-report skill is broadly disclosed, but it needs review because it scans local agent/workspace context by default and can publish context-derived recommendation signals externally despite claiming only aggregate counts are shared.

Install only if you are comfortable with the skill reading TRAE memory, project metadata, knowledge files, and installed skill names, then storing derived context locally and publishing reports externally. For privacy-sensitive use, run with --no-context-scan and disable external channels with --no-feishu, --no-ima, or --dry-run; also verify Feishu/IMA recipient environment variables before use.

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
scripts/scan_user_context.py:165
Finding

Default Broad Collection of Agent Memory and Workspace Metadata Violates Least Privilege

Content
View full analysis
dict: """Scan TRAE memory using three weighting levels.""" summary = {"project_memory_words": 0, "topics_words": 0, "user_profile_words": 0} project_memory_dir = _derive_project_memory_dir(memory_root, project_dir) pm = project_memory_dir / "project_memory.md" if pm.exists(): text = pm.read_text(encoding="utf-8") summary["project_memory_words"] = _extract_keywords( text, 3, "project_memory", counter, source_map ) today = datetime.now().strftime("%Y%m%d") yesterday = (datetime.now() - timedelta(days=1)).strftime("%Y%m%d") for date_str in [today, yesterday]: topics = project_memory_dir / date_str / "topics.md" if topics.exists(): text = topics.read_text(encoding="utf-8") summary["topics_words"] += _extract_keywords( text, 2, "topics", counter, source_map ) up = memory_root / "user_profile.md" if up.exists(): text = up.read_text(encoding="utf-8") summary["user_profile_words"] = _extract_keywords( text, 1, "user_profile", counter, source_map ) return summary ``` ```python def _scan_active_projects(project_dir: Path, days: int = 7) -> tuple[list[str], dict, dict]: cutoff = datetime.now() - timedelta(days=days) active = [] counter: dict = defaultdict(int) source_map: dict = defaultdict(list) if not project_dir.exists(): return active, counter, source_map for item in project_dir.iterdir(): if not item.is_dir(): continue if ...[truncated 4158 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/daily_recommend.py:650
Finding

Context-Derived Recommendation Signals Are Published Despite a Count-Only Privacy Claim

Content
View full analysis
tuple[int, list[str]]: """Match user-context keywords and return total weight and matching words.""" unified = skill["unified"] text = " ".join([ unified.get("name", ""), unified.get("description", ""), " ".join(unified.get("categories", [])), " ".join(unified.get("tags", [])), ]).lower() matched = [] total_weight = 0 for kw_info in user_context.get("keywords", []): kw = kw_info["word"].lower() weight = kw_info["weight"] if len(kw) >= 3: if re.search(r"\b" + re.escape(kw) + r"\b", text): matched.append(kw_info["word"]) total_weight += weight else: if kw in text: matched.append(kw_info["word"]) total_weight += weight return total_weight, matched ``` The memory-derived score directly controls externally visible Skill selection: ```python for skill in skills: skill["_pain_points"] = _match_pain_points(skill) skill["_memory_match"] = _match_memory(skill, user_context) def _filter_memory(s): return s["_memory_match"][0] >= 3 if "memory_collision" in targets: _pick( _filter_memory, lambda s: s["_memory_match"][0], targets["memory_collision"], "memory_collision", "🧠 Memory Collision", ) ``` The serialized recommendation retains memory-derived metrics: ```python def _format_recommendation( skill: dict, dimension: str, d ...[truncated 4542 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/daily_recommend.py:650
Finding

Untrusted Marketplace Metadata Is Rendered into Trusted Reports Without Markdown or URL Sanitization

Content
View full analysis
dict: slug = raw.get("slug", "") owner = raw.get("ownerName", "") return { "slug": slug, "name": raw.get("name", ""), "description": raw.get("description") or raw.get("description_zh") or "", "description_zh": raw.get("description_zh") or "", "categories": _flatten_tags_list( [raw.get("category")] if raw.get("category") else [] ), "tags": _flatten_tags_list(raw.get("subCategories") or []), "owner": owner, "latest_changelog": ( raw.get("latestChangelog") or raw.get("changelog") ), "source_url": ( ...[truncated 4190 chars]
Remediation
View remediation
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Behavioral ASTexec() Call, eval() Call, Dynamic Import
  • Taint TrackingDirect Taint Flow, Variable-Mediated Taint Flow, Credential Exfiltration Chain
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
Findings (46)

Tainted flow: 'req' from os.environ.get (line 263, credential/environment) → urllib.request.urlopen (network output)

Critical
Category
Data Flow
Confidence
90% confidence
Finding

Credentials or environment variables flow to a network sink. This is a high-confidence indicator of credential exfiltration.

Content

Scanner excerpt · scripts/push_to_feishu.py (reported line 49)May include surrounding context.

python
data = json.dumps(payload).encode("utf-8")
    req = urllib.request.Request(url, data=data, headers={"Content-Type": "application/json"}, method="POST")
    try:
        with urllib.request.urlopen(req, timeout=10) as resp:
            result = json.loads(resp.read().decode("utf-8"))
            return result.get("tenant_access_token")
    except (urllib.error.URLError, json.JSONDecodeError) as e:

Tainted flow: 'req' from os.environ.get (line 263, credential/environment) → urllib.request.urlopen (network output)

Critical
Category
Data Flow
Confidence
90% confidence
Finding

This function transmits detailed recommendation content, and optionally a document URL, to an external Feishu account identified by FEISHU_USER_OPEN_ID. In the skill context, that is more dangerous because the skill metadata says published output should be aggregated counts only and original scan content should remain local, so this creates a real confidentiality and policy-boundary violation if sensitive scan-derived content is included in the card.

Content

Scanner excerpt · scripts/push_to_feishu.py (reported line 265)May include surrounding context.

python
}
    req = urllib.request.Request(url, data=data, headers=headers, method="POST")
    try:
        with urllib.request.urlopen(req, timeout=15) as resp:
            return json.loads(resp.read().decode("utf-8"))
    except (urllib.error.URLError, urllib.error.HTTPError, json.JSONDecodeError) as e:
        return {"error": str(e)}

Tp4

High
Category
MCP Tool Poisoning
Confidence
93% confidence
Finding

This finding identifies a meaningful privacy-risk pattern: the skill explicitly authorizes scanning broad local context including TRAE memory, project files, experience backups, and installed skills. Even though the document states that only aggregate context counts are published externally, collecting and storing detailed local derived data such as keywords, project/activity signals, and installed skill inventory increases exposure if the report-generation boundary is implemented incorrectly or later regresses.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding

This finding identifies a meaningful privacy-risk pattern: the skill explicitly authorizes scanning broad local context including TRAE memory, project files, experience backups, and installed skills. Even though the document states that only aggregate context counts are published externally, collecting and storing detailed local derived data such as keywords, project/activity signals, and installed skill inventory increases exposure if the report-generation boundary is implemented incorrectly or later regresses.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
94% confidence
Finding

This finding identifies a meaningful privacy-risk pattern: the skill explicitly authorizes scanning broad local context including TRAE memory, project files, experience backups, and installed skills. Even though the document states that only aggregate context counts are published externally, collecting and storing detailed local derived data such as keywords, project/activity signals, and installed skill inventory increases exposure if the report-generation boundary is implemented incorrectly or later regresses.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
93% confidence
Finding

This finding identifies a meaningful privacy-risk pattern: the skill explicitly authorizes scanning broad local context including TRAE memory, project files, experience backups, and installed skills. Even though the document states that only aggregate context counts are published externally, collecting and storing detailed local derived data such as keywords, project/activity signals, and installed skill inventory increases exposure if the report-generation boundary is implemented incorrectly or later regresses.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
96% confidence
Finding

This finding identifies a meaningful privacy-risk pattern: the skill explicitly authorizes scanning broad local context including TRAE memory, project files, experience backups, and installed skills. Even though the document states that only aggregate context counts are published externally, collecting and storing detailed local derived data such as keywords, project/activity signals, and installed skill inventory increases exposure if the report-generation boundary is implemented incorrectly or later regresses.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
96% confidence
Finding

This finding identifies a meaningful privacy-risk pattern: the skill explicitly authorizes scanning broad local context including TRAE memory, project files, experience backups, and installed skills. Even though the document states that only aggregate context counts are published externally, collecting and storing detailed local derived data such as keywords, project/activity signals, and installed skill inventory increases exposure if the report-generation boundary is implemented incorrectly or later regresses.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

This finding identifies a meaningful privacy-risk pattern: the skill explicitly authorizes scanning broad local context including TRAE memory, project files, experience backups, and installed skills. Even though the document states that only aggregate context counts are published externally, collecting and storing detailed local derived data such as keywords, project/activity signals, and installed skill inventory increases exposure if the report-generation boundary is implemented incorrectly or later regresses.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
96% confidence
Finding

This finding identifies a meaningful privacy-risk pattern: the skill explicitly authorizes scanning broad local context including TRAE memory, project files, experience backups, and installed skills. Even though the document states that only aggregate context counts are published externally, collecting and storing detailed local derived data such as keywords, project/activity signals, and installed skill inventory increases exposure if the report-generation boundary is implemented incorrectly or later regresses.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding

This finding identifies a meaningful privacy-risk pattern: the skill explicitly authorizes scanning broad local context including TRAE memory, project files, experience backups, and installed skills. Even though the document states that only aggregate context counts are published externally, collecting and storing detailed local derived data such as keywords, project/activity signals, and installed skill inventory increases exposure if the report-generation boundary is implemented incorrectly or later regresses.

Content

No source excerpt is available for this finding.

Lp1

High
Category
MCP Least Privilege
Confidence
96% confidence
Finding

The file clearly has shell/process-execution capability by launching multiple Python helper scripts, but the declared skill metadata says it should not be used for security auditing or local skill ecosystem analysis and does not indicate a shell/process permission boundary. Undeclared execution capability is dangerous because an agent or reviewer may grant the skill broader trust than warranted, while the helper scripts it invokes can perform network access, local scanning, and data exfiltration through downstream push steps.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
Not specified by scanner
Confidence
99% confidence
Finding

The result object includes per-recommendation fields populated from user context processing, and that object is later serialized to JSON and used to generate markdown. This violates the stated zero-context-derived publication rule: even without raw keywords, exported recommendation signals can reveal user interests, installed tools, or work domains through inference, especially when reports are stored in multiple locations.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

The markdown report explicitly promises that no context-derived content is published, but it later emits recommendation fields derived from local user context such as memory match weights, context-hit summaries, and matched scene keywords. Because the skill metadata says outputs may be stored in external systems, this becomes a privacy/integrity issue: users and downstream systems are misled into believing only aggregate counts are shared when individualized inference signals are actually exported.

Content

No source excerpt is available for this finding.

Lp1

High
Category
MCP Least Privilege
Confidence
93% confidence
Finding

The script performs outbound network access to a hard-coded external API using urllib.request, but the finding indicates this capability is not declared in the skill's permissions. Undeclared network behavior is dangerous because it weakens user/operator trust and review controls: a skill can exfiltrate local data or pull untrusted remote content without the expected permission boundary, even if this specific code appears intended for benign data collection.

Content

No source excerpt is available for this finding.

Lp1

High
Category
MCP Least Privilege
Confidence
92% confidence
Finding

The script reads credentials and recipient identifiers from environment variables, but the static finding indicates this capability is not declared in the skill's permissions model. In an agent-skill ecosystem, undeclared access to secrets/environment is a real trust and containment issue because operators may not expect the skill to consume credentials or send data externally.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
Not specified by scanner
Confidence
97% confidence
Finding

The optional cloud upload imports a local markdown report into Feishu Docs, directly contradicting the skill description's statement that original scan output is stored only locally. That makes the finding more dangerous in context because users and reviewers could reasonably rely on the local-only storage claim when deciding whether to trust the skill with scan-derived content.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

The card-building logic includes per-skill names, slugs, platform activity, install counts, and summaries, which is materially more detailed than the metadata's claimed publication model of aggregate counts only. In this skill context, that mismatch is especially significant because the description explicitly promises zero-context derived reports and local-only handling of original scan data, so this behavior can leak scan-derived intelligence externally.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
Not specified by scanner
Confidence
96% confidence
Finding

The script uploads generated markdown into an external IMA knowledge base, which is a data publication action beyond merely local processing. In the stated skill context, this creates a scope mismatch: content derived from ecosystem scans is transmitted to a third-party service, increasing confidentiality and governance risk if the report contains sensitive, proprietary, or unexpectedly user-influenced material.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
Not specified by scanner
Confidence
94% confidence
Finding

The script persists a derived user profile JSON that includes detailed keywords, active project names, experience file names, and installed skills. This exceeds the manifest’s stated aggregated-output scope and creates a durable local inventory of sensitive user context that could be reused or exfiltrated later even if the immediate feature only needed counts or transient ranking signals.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
90% confidence
Finding

The skill performs external network transmission to third-party APIs, including SkillHub and separately documented Feishu/IMA services. In context, this is expected functionality rather than covert exfiltration, but it is still security-relevant because the same workflow also scans local user context and writes reports to remote services, so any implementation mistake in the 'aggregate-only' boundary could leak sensitive derived data off-host.

Content

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

md
13. **派生报告零上下文派生内容(v1.4.0 强化)**:报告 markdown 中「用户上下文快照」段只发布聚合计数(关键词数/项目数/经验文件数/已装 skill 数)。**禁止发布任何上下文派生内容**(含 Top 10 关键词列表、项目名、经验文件名、已装 skill 列表)到外部服务。原始扫描结果仅存本地 `data/user_context_{date}.json`。
14. **上下文扫描可跳过(v1.3.0)**:`--no-context-scan` 完全跳过 TRAE memory / 项目文件 / 经验备份 / 已装 skill 扫描,推荐降级为 trending-only(无 memory_collision / scene_match 维度)。用于隐私敏感场景或调度器环境。
15. **自依赖改造(v1.5.0)**:所有 Python 脚本仅依赖标准库(urllib/json/re/sys/os/pathlib/datetime/collections),禁止 `pip install` 第三方包。`fetch_clawhub.py` 用 `urllib.request` 替代 `requests`;`fetch_skillhub.py` 直连 SkillHub HTTP API 替代 `skillhub` CLI;`push_to_feishu.py` 中 `lark-cli` 改为可选依赖,不可用时降级为仅卡片消息(卡片已含完整简报文本)。
16. **SkillHub 直连 HTTP API(v1.5.0)**:`fetch_skillhub.py` 直接调用 `https://api.skillhub.cn/api/v1/showcase/{type}` 和 `/api/v1/search`,无需 `skillhub` CLI 二进制依赖。6 个排行榜类型:hot/featured/newest/recommended/trending/paid。

## 示例

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

This Python file contains its module docstring and multiple user-facing CLI/help/status messages entirely in Chinese, indicating the skill is designed to operate in a fixed language. The stated policy forbids forcing a specific language or locale without user opt-in, and no alternative language selection mechanism is present in this file.

Content

No source excerpt is available for this finding.

subprocess module call

Medium
Category
Dangerous Code Execution
Confidence
70% confidence
Finding

subprocess module calls execute external commands. Without careful input validation, this enables command injection.

Content

Scanner excerpt · global_skill_daily_executor.py (reported line 42)May include surrounding context.

python
print(f"{'='*60}")
    start = time.time()
    try:
        result = subprocess.run(
            cmd,
            capture_output=True, text=True, timeout=600,
            encoding="utf-8", errors="replace",

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The document defines a dedicated '中文支持 (Chinese Support)' scenario and its action templates direct use of skills for Chinese content and workflows, but it does not indicate that language selection is optional or user-driven. Under the policy, forcing or assuming a specific language/locale without opt-in is a natural-language policy concern.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

This code file contains natural-language strings and generated report content that are consistently Chinese-only, including titles, summaries, and usage-facing descriptions. Because the file does not provide user opt-in or an alternate locale, it violates the language/locale policy requirement for offering choice unless the restriction is explicitly justified.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.