Back to skill

Security audit

Kongfz Ankang Search

Security checks for vulnerabilities and agentic risk

Overview

The skill is mainly an auction-search helper, but it uses shell-launched browser automation with weak input handling and imprecise installation guidance, so users should review it before installing.

Install only if you are comfortable with it automating Kongfz pages through xbrowser. Prefer an isolated, logged-out browser profile, pin the installer and repository source, and restrict or escape keyword input before using the included script.

Vulnerability Patterns
  • Insecure DependenciesIntroduces malicious components through unsafe dependency sources
  • 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 (2)

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/kongfz_search_xbrowser.py:55
Finding

Unescaped User Input in xbrowser Batch Command

Content
View full analysis
Remediation
View remediation

T08 · Insecure Dependencies

Note
Location
README.md:55
Finding

Unpinned Third-Party Installation Through npx

Content
View full analysis
/kongfz-ankang-search -g ``` ### Technical Analysis The documented installation command invokes the `skills` package through `npx` without pinning an exact package version. It also instructs the user to install a Skill from a placeholder GitHub namespace without identifying an authoritative repository, immutable commit, signed release, or expected integrity digest. Consequently, the code executed or installed may differ from the artifact that was audited. Risks include: - Retrieval of a newer or compromised version of the `skills` installer. - Replacement of the placeholder with an untrusted or lookalike repository. - Later modification of a branch or tag used as the installation source. - Global installation of content whose integrity was not verified. This is an installation-time supply-chain weakness. The audited repository itself does not contain evidence that it currently retrieves or executes a malicious payload. ### Attack Path 1. A user follows the README installation instructions. 2. `npx` resolves and runs an unpinned version of the `skills` package. 3. The user substitutes the repository placeholder with a mistaken, malicious, or compromised GitHub namespace. 4. The installer retrieves mutable repository content rather than the audited artifact. 5. The unaudited Skill is installed globally and may later execute with the permissions available to the Agent or user. ### Impact Assessment The immediate impact depends on the installer and repository content retrieved at installation time. A compromised dependency or repository could install altered Skill instructions or scripts and thereby obtain the privileges available to the Skill runtime. The `-g` option increases scope by making the installed Skill available globall ...[truncated 174 chars]
Remediation
View remediation
add https://github.com//kongfz-ankang-search.git# ``` ]]>
Vulnerability Patterns
  • Behavioral ASTexec() Call, eval() Call, Dynamic Import
  • 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
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
Findings (8)

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding

代码的核心功能仍然属于孔夫子网拍卖检索,访问资源也与声明基本一致,因此不是完全不同的技能。但声明中最关键的行为是“自动搜索安康、来鹿堂、兴安府三个关键词相关文献拍品”,而代码并没有依次搜索这三个关键词,也没有内置组合检索逻辑;它只接受一个 --keyword 参数并执行一次搜索,默认值还是“安康文字”。此外,--region 参数仅打印未实际用于筛选。故描述对实际行为有明显夸大和偏差,应判定为不匹配。

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The entire skill description is presented only in Chinese, with no indication that users may interact in other languages or that the language restriction is intentional and required. Under the policy, language or locale constraints should either provide user opt-in/choice or be clearly documented and justified as region-specific.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
70% confidence
Finding

npx commands without a version suffix (e.g. @1.0.0) create a rug-pull risk if the upstream server is compromised and publishes a malicious update.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
95% confidence
Finding

The skill instructs the agent to execute shell commands (node ... xb.cjs, python ...) but does not declare any permissions or allowed-tools scope. This creates an implicit capability escalation risk: a caller may trigger shell-backed automation without an explicit least-privilege boundary or user-visible approval model.

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 · scripts/kongfz_search_xbrowser.py (reported line 17)May include surrounding context.

python
"""运行 xb 命令并返回 JSON 结果"""
    cmd = ["node", XB_PATH] + args
    print(f"[CMD] {' '.join(cmd)}", flush=True)
    result = subprocess.run(cmd, capture_output=True, text=True, timeout=120, encoding='utf-8')
    output = result.stdout.strip()
    
    # xb batch 输出是一个大的 JSON 对象

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The manifest describes a narrowly scoped skill that automatically searches for literature auction items related to the three keywords 安康、来鹿堂、兴安府. In code, the CLI accepts an arbitrary --keyword argument and passes it directly into the browser automation, with a default of only 安康文字, so the implemented behavior is broader and different from the stated fixed-keyword scope.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The description says the skill will automatically search three distinct keywords, implying multi-keyword coverage in one invocation. The implementation parses only one --keyword value and calls search_auction once, so it does not automatically search all three declared terms.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Low
Category
Not specified by scanner
Confidence
81% confidence
Finding

The script exposes a --region parameter and prints '地区筛选', which implies region-based filtering as part of the search behavior. However, the value is never incorporated into the xbrowser commands or parsing logic, so actual behavior does not match the implied functionality.

Content

No source excerpt is available for this finding.