Back to skill

Security audit

a-better-12306-skill

Security checks for vulnerabilities and agentic risk

Overview

ClawScan rates this skill suspicious with high confidence, citing undeclared ClawHub publishing and credential handling, plus an update operation that can discard local changes.

Consider avoiding installation unless you have independently verified the credential handling and ClawHub publishing are intended and trusted. Also consider the risk of losing local changes if using the update option. The scan was partial: all listed components were scanned, but several local references could not be resolved, so behavior involving those references remains uncertain. Another scanner completed with no findings, but that does not resolve these concerns.

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
  • 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
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
Findings (10)

Description-Behavior Mismatch

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The command handles a ClawHub credential and modifies a GitHub repository secret; it performs no railway-related functionality. This credential transfer is not disclosed by the declared purpose and is not merely an implementation detail of querying or booking 12306 tickets.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

所提供片段的实际操作是技能发布,没有实现铁路查询或购票辅助功能。发布元数据虽提到12306,但不改变命令的实际行为。ClawHub登录及技能发布与所声明的用户功能存在实质差异。此结论仅针对给出的代码片段,不推断仓库其他部分的行为。

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding

该代码片段的操作对象是 ClawHub 上的技能及其版本,未展示任何 12306 查询、登录、下单、候补或订单功能。这与声明的铁路服务用途存在实质差异。具体命令能否成功、是否产生发布副作用,无法仅凭此片段确认。

Content

No source excerpt is available for this finding.

Skill declares no tool scope ('permissions' or 'allowed-tools') but code capabilities were detected: env, file_read, file_write, network, shell.

Medium
Category
MCP Least Privilege
Confidence
70% confidence
Finding

Without declared permissions the skill's intent is opaque and cannot be validated.

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/check_release.py (reported line 44)May include surrounding context.

python
def git_files() -> list[Path]:
    tracked = subprocess.check_output(
        ["git", "-C", str(ROOT), "ls-files", "-z"]
    ).decode("utf-8", "replace")
    untracked = subprocess.check_output(

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/check_release.py (reported line 47)May include surrounding context.

python
tracked = subprocess.check_output(
        ["git", "-C", str(ROOT), "ls-files", "-z"]
    ).decode("utf-8", "replace")
    untracked = subprocess.check_output(
        ["git", "-C", str(ROOT), "ls-files", "-z", "--others", "--exclude-standard"]
    ).decode("utf-8", "replace")
    names = {name for name in (tracked + untracked).split("\0") if name}

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/rail.py (reported line 837)May include surrounding context.

python
)
        return 2
    target = DELEGATES[command]
    return subprocess.call([sys.executable, str(client), target, *argv])


def _run_git(cmd: list[str]) -> subprocess.CompletedProcess[str]:

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/rail.py (reported line 841)May include surrounding context.

python
def _run_git(cmd: list[str]) -> subprocess.CompletedProcess[str]:
    return subprocess.run(cmd, capture_output=True, text=True)


def _git_error(proc: subprocess.CompletedProcess[str]) -> str:

Tainted flow: 'cmd' from os.environ.get (line 876, credential/environment) → subprocess.run (code execution)

Medium
Category
Data Flow
Confidence
65% confidence
Finding

Data from a source is assigned to a variable that is later passed to a sink, creating a variable-mediated taint flow.

Content

Scanner excerpt · scripts/rail.py (reported line 841)May include surrounding context.

python
def _run_git(cmd: list[str]) -> subprocess.CompletedProcess[str]:
    return subprocess.run(cmd, capture_output=True, text=True)


def _git_error(proc: subprocess.CompletedProcess[str]) -> str:

The update option promises a fast-forward-only pull but performs a destructive hard reset.

Medium
Category
Excessive Agency
Confidence
100% confidence
Finding

The --update help promises git pull --ff-only, but the implementation fetches origin and executes git reset --hard FETCH_HEAD. A routine update can therefore discard tracked local modifications and move the checkout away from local commits without warning, creating an integrity and data-loss risk despite being presented as a safe update.

Content

No source excerpt is available for this finding.