Back to skill

Security audit

process-data-monitor-claw

Security checks for vulnerabilities and agentic risk

Overview

The skill is mostly a business monitoring and alerting helper, but its long-running daemon and unsafe temporary files create risks users should review before installing.

Install only if you are comfortable with a Bash-based monitoring daemon that may keep running in the background and send alert content to Feishu or configured webhooks. Use dedicated read-only monitoring credentials, avoid sensitive data in alert messages, run it under a low-privilege account, and review or fix the /tmp PID/log/cooldown file handling before production use.

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 (2)

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/alert-sender.sh:12
Finding

Predictable and Symlink-Unsafe Cooldown State Files

Content
View full analysis
"$cooldown_file" return 0 } ``` ### Technical Analysis The script stores alert cooldown state in the fixed, predictable directory `/tmp/monitor-cooldown`. It does not: - Create an owner-only runtime directory. - Set a restrictive `umask`. - Verify directory or file ownership. - Reject symbolic links. - Create files exclusively or update them atomically. - Ensure that the derived state filename belongs to the current monitoring process. The redirection `date +%s > "$cooldown_file"` follows symbolic links. An attacker with local access can prepare the directory, replace it with a link to another directory before first use, or plant predictable rule-derived files and symbolic links. The filename normalization is also weak: only spaces and forward slashes are replaced, so names such as `..` or names containing other problematic characters are not robustly constrained. Reading attacker-controlled cooldown content can also cause arithmetic errors or manipulate alert timing. A future numeric timestamp suppresses the corresponding alert because the calculated elapsed time becomes negative and remains less than the cooldown value. ### Attack Path 1. The attacker learns or predicts a monitoring rule name. 2. Before the monito ...[truncated 1413 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/monitor-daemon.sh:11
Finding

Untrusted PID and Log Files in a Shared Temporary Directory

Content
View full analysis
/dev/null; then echo "Daemon is already running (PID: $(cat "$PID_FILE"))" exit 0 fi if [[ ! -f "$CONFIG_FILE" ]]; then echo "Configuration file does not exist: $CONFIG_FILE" exit 1 fi log "Starting monitoring daemon" nohup bash "$0" _run >> "$LOG_FILE" 2>&1 & echo $! > "$PID_FILE" log "Daemon started (PID: $!)" } stop() { if [[ ! -f "$PID_FILE" ]]; then echo "Monitoring daemon is not running" exit 0 fi PID=$(cat "$PID_FILE") if kill -0 "$PID" 2>/dev/null; then kill "$PID" rm -f "$PID_FILE" log "Daemon stopped (PID: $PID)" else rm -f "$PID_FILE" fi } reload() { if [[ ! -f "$PID_FILE" ]] || ! kill -0 "$(cat "$PID_FILE")" 2>/dev/null; then echo "Daemon is not running" exit 1 fi kill -HUP "$(cat "$PID_FILE")" log "Sent SIGHUP to reload configuration" } ``` ### Technical Analysis The daemon uses globally predictable files in `/tmp` for its PID and log. It trusts the PID file without validating: - File ownership or permissions. - Whether it is a regular file rather than a symbolic link. - Whether its content is a valid and safely bounded PID. - Whether the referenced process is actually this monitoring daemon. - Whether the PID has been recycled since the file was written. Consequently, `stop` and `reload` may send `SIGTERM` or `SIGHUP` to an unrelated process identified by attacker-controlled PID-file content. The signal succeeds whenever the monitoring user has permission to signal the target, including other processes ...[truncated 2138 chars]
Remediation
View remediation
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Tool MisuseTool Parameter Abuse, Chaining Abuse, Unsafe Defaults
  • Rogue AgentSelf-Modification, Session Persistence
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
Findings (16)

Tp4

High
Category
MCP Tool Poisoning
Confidence
96% confidence
Finding

The declared description presents a full monitoring skill for business process data states, with real-time detection, threshold-based alerts, multi-channel notifications, and reporting. The supplied code chunk only implements the notification-sending portion for Feishu plus cooldown/routing helpers. Its primary behavior is alert dispatch, not monitoring. While alert pushing is consistent with part of the description, the core promised capabilities—monitoring pipeline/process states, detecting anomalies, checking thresholds, tracing full-chain nodes, and generating reports—are absent. Additionally, the declared multi-channel support mentions email and SMS, but the code only supports Feishu webhook and Feishu user messaging. Therefore the description materially overstates and misrepresents the implemented behavior.

Content

No source excerpt is available for this finding.

Chaining Abuse

High
Category
Tool Misuse
Confidence
75% confidence
Finding

Tool calls are chained to bypass individual safety checks or escalate capabilities beyond what any single tool call would allow.

Content

Scanner excerpt · scripts/monitor-daemon.sh (reported line 62)May include surrounding context.

sh
tail -10 "$LOG_FILE" 2>/dev/null || echo "(暂无日志)"
  else
    echo "❌ 监控守护进程未运行"
    [[ -f "$PID_FILE" ]] && rm -f "$PID_FILE"
  fi
}

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
88% confidence
Finding

The skill references executable shell scripts (scripts/monitor-daemon.sh and scripts/alert-sender.sh) but does not declare any tool scope or permissions boundary. This creates an execution-governance gap: if the platform permits shell access implicitly, the skill may invoke local commands or scripts without an explicit least-privilege declaration or user/operator awareness.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The natural-language content of the skill, including description, workflow, and examples, is presented only in Chinese. This can amount to a language policy violation when the skill implicitly forces a specific language without user opt-in or a documented region-specific justification.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The trigger list contains very broad, common terms such as “监控” and “告警”, which can cause the skill to activate in unrelated contexts. Overbroad invocation increases the chance that shell-capable or operational behavior is engaged unexpectedly, potentially exposing data sources, notifications, or scripts to unintended workflows.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
50% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

Scanner excerpt · references/data-sources.md (reported line 91)May include surrounding context.

yaml
data_source:
  type: api
  url: "https://api.example.com/metrics"
  method: "GET"
  headers:
    Authorization: "Bearer ${API_TOKEN}"

External Transmission

Medium
Category
Data Exfiltration
Confidence
50% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

Scanner excerpt · references/data-sources.md (reported line 106)May include surrounding context.

yaml
data_source:
  type: api
  url: "https://api.example.com/metrics"
  method: "GET"
  headers:
    Authorization: "Bearer ${API_TOKEN}"

External Transmission

Medium
Category
Data Exfiltration
Confidence
70% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

Scanner excerpt · scripts/alert-sender.sh (reported line 91)May include surrounding context.

sh
}')

  local response
  response=$(curl -s -X POST "$webhook" \
    -H "Content-Type: application/json" \
    -d "$payload")

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

This shell script performs an HTTP POST to Feishu's messaging API containing the recipient open_id and message content, but the function only documents missing-token errors and success/failure status. There is no user-facing warning, confirmation, or descriptive comment disclosing that potentially sensitive alert content and identifiers will be transmitted to an external service.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
70% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

Scanner excerpt · scripts/alert-sender.sh (reported line 126)May include surrounding context.

sh
}')

  local response
  response=$(curl -s -X POST \
    "https://open.feishu.cn/open-apis/im/v1/messages?receive_id_type=open_id" \
    -H "Authorization: Bearer $token" \
    -H "Content-Type: application/json" \

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
98% confidence
Finding

This shell script's natural-language comments, usage text, status messages, and logs are consistently written in Chinese, with no indication that the skill is region-specific or that users may select another language. That creates a language/locale policy issue because the skill imposes a specific language without user opt-in.

Content

No source excerpt is available for this finding.

Session Persistence

Medium
Category
Rogue Agent
Confidence
65% confidence
Finding

Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.

Content

Scanner excerpt · scripts/monitor-daemon.sh (reported line 31)May include surrounding context.

sh
fi

  log "启动监控守护进程..."
  nohup bash "$0" _run >> "$LOG_FILE" 2>&1 &
  echo $! > "$PID_FILE"
  log "守护进程已启动 (PID: $!)"
  echo "日志文件: $LOG_FILE"

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
95% confidence
Finding

This markdown file presents all instructions, examples, and configuration guidance exclusively in Chinese. Under the policy, forcing a specific language without user opt-in or justification is a natural-language policy concern.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
91% confidence
Finding

该文档标题和说明均以中文呈现,且全文未说明这是面向特定中文地区/团队的限定文档,也未提供其他语言选项。按规则,未经过用户选择就强制特定语言/locale 的自然语言内容属于语言/locale 策略风险。

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
88% confidence
Finding

This markdown file contains user-facing natural language exclusively in Chinese, and it does not state that the skill is China-specific or that users may choose another language. That can violate a language/locale policy requiring user opt-in or explicit justification for a forced locale.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
95% confidence
Finding

The script's descriptive comments, usage guidance, and log/error messages are written exclusively in Chinese, with no option to select another language. This creates a natural-language policy concern because the skill effectively enforces a single locale without documented user choice or region-specific justification.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.