Back to skill

Security audit

concept-radar

Security checks for vulnerabilities and agentic risk

Overview

The skill is mostly coherent, but its optional Feishu publishing path can send externally sourced, unescaped Markdown as the user.

Install only if you are comfortable with the skill fetching configured web/GitHub sources and writing local state under .trae/concept-radar. Before using Feishu publishing, review the generated Markdown carefully and prefer trusted feeds, because a malicious source title could alter rendered message formatting or links.

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
scripts/concept_radar.py:397
Finding
Untrusted Feed Metadata Is Published as Unsanitized Markdown## Vulnerability Details **File Location**: `scripts/concept_radar.py`, lines 397–400, 797–798, and 963–966 **Vulnerability Type**: Markdown content injection **Risk Level**: Medium ### Vulnerable Code External RSS item titles are accepted as candidate metadata: ```python rows.append(( "rss:" + (_xml_text(item.find("guid")) or canonical), _xml_text(item.find("title")), body, published, canonical, )) ``` The untrusted title and author name are embedded directly into Markdown link syntax: ```python f"**主出处**\n[{candidate['author_name']}:{candidate['title']}]" f"({candidate['canonical_url']})" ``` The generated Markdown is then sent through the authenticated Feishu CLI: ```python completed = runner([ "lark-cli", "im", "+messages-send", "--user-id", open_id, "--markdown", output_path.read_text(encoding="utf-8"), "--as", "user", "--idempotency-key", idempotency_key, ], capture_output=True, text=True, check=False) ``` ### Technical Analysis RSS and Atom content is supplied by external source operators. The parser preserves source-controlled item titles, and `render_digest` interpolates them into a Markdown link label without escaping Markdown metacharacters. A malicious title containing closing brackets, parentheses, or additional Markdown constructs can terminate the intended link label and introduce attacker-chosen rendered content. The generated document is later passed to `lark-cli` using its Markdown option and published as the authenticated user. Publication is optional and requires an explicit user request, which reduces reachability. However, that authorization only covers publishing the reviewed concept digest; it does not authorize an external feed operator to alter the message structure or inject deceptive content. No escaping or structural encoding is applied at the boundary. ### Attack Path 1. An attacker controls an RSS or Atom source included in the configured author pool. 2. The attacker publishes an item whose title c ...[truncated 1244 chars]
Remediation
## Remediation Suggestions 1. Escape all externally sourced values before inserting them into Markdown, especially: - `candidate["title"]` - `candidate["author_name"]` - Any externally derived labels used in links or headings 2. Implement escaping for the exact Markdown dialect accepted by Feishu, including at minimum backslashes, brackets, parentheses, image markers, and line-breaking characters. 3. Prefer a structured Feishu message API that represents text and links as separate encoded fields rather than concatenating untrusted values into Markdown. 4. Add a final rendered-message preview and approval step before publication so the user can detect unexpected links or formatting. 5. Add regression tests using malicious feed titles that attempt to: - Close the intended link label - Insert a second link - Insert an image - Add mentions or multiline content 6. Ensure tests verify that the resulting document renders the entire external title as inert text and cannot change the surrounding Markdown structure.
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • 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
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
Findings (16)

Lp3

Medium
Category
MCP Least Privilege
Confidence
91% confidence
Finding
The skill advertises commands that invoke Python scripts with shell, filesystem, environment, and network access, but it does not declare any explicit tool scope or permission boundaries in the skill manifest. This can cause an agent runtime to grant broader capabilities than users expect, increasing the chance of unintended network access, file modification, or secret exposure during execution.

Natural-Language Policy Violations

Medium
Confidence
96% confidence
Finding
The operational instructions in the skill are written in Chinese, which imposes a specific language on users without any opt-in or documented locale justification. The policy allows language constraints only when the user is given a choice or the regional limitation is explicitly justified.

Natural-Language Policy Violations

Medium
Confidence
91% confidence
Finding
This manifest/example data presents all user-facing descriptive fields exclusively in Chinese, with no indication that the skill is region-specific or that users can opt into another language. Under the language/locale policy, forcing a specific language without opt-in is a natural-language policy concern.

Natural-Language Policy Violations

Medium
Confidence
95% confidence
Finding
The policy content is written entirely in Chinese and does not provide any language-choice mechanism, opt-in, or explanation that this skill is intentionally region- or locale-specific. Under the stated policy, forcing a specific language without user opt-in is a natural-language policy violation.

Natural-Language Policy Violations

Medium
Confidence
96% confidence
Finding
The entire rubric is written in Chinese and provides no indication that language selection is optional or that the skill is intentionally limited to a Chinese-speaking or region-specific context. Under the policy, forcing a specific language without user opt-in is a natural-language locale violation.

Natural-Language Policy Violations

Medium
Confidence
96% confidence
Finding
文件标题及全文内容均使用中文,但未说明这是面向特定中文用户群体的区域性技能,也没有提供语言选择或用户选择加入的机制。根据语言/区域政策,这种默认强制单一语言的自然语言约束应被标记。

Natural-Language Policy Violations

Medium
Confidence
96% confidence
Finding
This code hard-codes Chinese labels and punctuation into the generated digest content, which means published output will always be in Chinese regardless of user preference. The file provides no opt-in, language selection, or documented justification for this locale restriction, which is a natural-language policy concern.

Context-Inappropriate Capability

Medium
Confidence
95% confidence
Finding
The code invokes an external CLI to inspect account identity and send messages, creating a powerful side-effectful execution path outside the core concept-research function. Even though subprocess arguments are passed as a list rather than a shell string, the capability still enables external transmission and user-context actions that can be abused if the skill or runtime is compromised.

Description-Behavior Mismatch

Medium
Confidence
93% confidence
Finding
The skill includes a publish path that sends generated content to Feishu/Lark as the authenticated user, which exceeds the core research/scanning behavior described in the skill metadata. This expands the trust boundary from local analysis into outbound messaging and could be abused to exfiltrate collected content or impersonate the user in enterprise chat if the skill is invoked unexpectedly.

External Transmission

Medium
Category
Data Exfiltration
Content
def opener(request, timeout=30):
            url = request.full_url
            calls.append(url)
            if url.startswith("https://api.github.com/"):
                raise urllib.error.HTTPError(
                    url, 403, "rate limited", {"x-ratelimit-remaining": "0"},
                    io.BytesIO(b'{"message":"API rate limit exceeded"}'),
Confidence
60% confidence
Finding
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

External Transmission

Medium
Category
Data Exfiltration
Content
def opener(request, timeout=30):
            url = request.full_url
            calls.append(url)
            if url.startswith("https://api.github.com/"):
                raise urllib.error.HTTPError(
                    url, 403, "rate limited", {"x-ratelimit-remaining": "0"},
                    io.BytesIO(b'{"message":"API rate limit exceeded"}'),
Confidence
60% confidence
Finding
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Natural-Language Policy Violations

Medium
Confidence
91% confidence
Finding
The test requires the rendered markdown to contain specific Chinese labels such as "成熟度", "置信度", and "行动建议". This suggests the skill output is forced into a specific language rather than offering a language choice or documenting a justified locale constraint.

Natural-Language Policy Violations

Medium
Confidence
88% confidence
Finding
The assertion for the Chinese phrase "非替代边界" further indicates that generated markdown is expected to use Chinese text unconditionally. Forcing a specific language without user opt-in is a natural-language policy concern under the locale policy rule.

Natural-Language Policy Violations

Low
Confidence
92% confidence
Finding
The changelog states in natural language that the project follows the Chinese-language Keep a Changelog page, and the file content is presented entirely in Chinese. For organizational language/locale policy, this can be a violation when a specific language is imposed without offering a user choice or documenting a justified region-specific constraint.

Natural-Language Policy Violations

Low
Confidence
93% confidence
Finding
This markdown file presents all user-facing content in Chinese and does not indicate that the user can choose another language. Under the natural-language policy rule, forcing a specific language without user opt-in can be a policy violation unless the locale limitation is clearly justified.

Natural-Language Policy Violations

Low
Confidence
91% confidence
Finding
This JSON manifest presents the user-facing concept name and descriptive fields entirely in Chinese, with no indication that language is selectable or that the locale is intentionally constrained. Under the policy, forcing a specific language without user opt-in is a natural-language policy concern.

Static analysis

Detected: suspicious.dynamic_code_execution

Dynamic code execution detected.

Critical
Code
suspicious.dynamic_code_execution
Location
tests/test_concept_radar.py:17