Back to skill

Security audit

Batchops Commander Free

Security checks for vulnerabilities and agentic risk

Overview

This skill is a legitimate batch-operations helper, but it should be reviewed because it combines broad command execution, bulk mutation workflows, and under-scoped credentialed API guidance.

Review this skill before installing if you expect it to run against important files, customer data, infrastructure APIs, or credentialed services. Use it only with explicit batch scopes, dry-run output, and confirmations for destructive or external actions; avoid running the included shell template unchanged in shared or untrusted directories.

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
SKILL.md:253
Finding

Predictable State and Temporary Files Permit File Clobbering

Content
View full analysis
"$FAILED_ITEMS" for item in "${ITEMS[@]}"; do if process_item "$item"; then ((PROCESSED++)) else ((FAILED++)) # Record the failed item jq --arg item "$item" --arg err "$?" '. += [{"item": $item, "error": $err}]' "$FAILED_ITEMS" > tmp && mv tmp "$FAILED_ITEMS" fi # Report progress every 10 items if (( PROCESSED % 10 == 0 )); then echo "$PROCESSED/$TOTAL completed ($(( PROCESSED * 100 / TOTAL ))%)" fi # Save a checkpoint every 50 items if (( PROCESSED % 50 == 0 )); then echo "{\"processed\": $PROCESSED, \"total\": $TOTAL}" > .batch-checkpoint.json fi done ``` ### Technical Analysis The executable Bash template writes to three predictable paths in the current working directory: - `failed.json` - `tmp` - `.batch-checkpoint.json` Shell redirection with `>` truncates an existing destination and follows symbolic links. The template does not verify file ownership, file type, or whether any destination is a symbolic link. It also does not ask before replacing existing state. The generic `tmp` name is not safely created and can collide with files from another process or batch run. It is also susceptible to pre-creation and symlink attacks. Concurrent executions can overwrite one another's temporary data and checkpoints. The issue is limited by the privileges of the account running the Skill: an attacker cannot use it to overwrite a file that the executing account cannot write. However, any writable target reachable through a prepared symbolic link may be affected. ### Attack Path 1. An attacker obtains the ability to create files in the directory where the user will execute the batch template. 2. The attacker creates `failed.json`, `tmp`, or `.batch- ...[truncated 1071 chars]
Remediation
View remediation
&2 exit 1 fi done ``` 3. Use `mktemp` in the same protected directory and atomically rename the completed file: ```bash temp_file=$(mktemp "$STATE_DIR/failed.json.tmp.XXXXXX") || exit 1 if jq --arg item "$item" --arg err "$status" \ '. += [{"item": $item, "error": $err}]' \ "$FAILED_ITEMS" > "$temp_file"; then chmod 600 "$temp_file" mv -- "$temp_file" "$FAILED_ITEMS" else rm -f -- "$temp_file" exit 1 fi ``` 4. Apply the same temporary-file and atomic-rename process to checkpoint writes. 5. Generate a unique state directory per batch to prevent concurrent jobs from sharing paths. 6. Detect existing state and require explicit confirmation before replacing it. 7. Avoid executing batch templates from untrusted or world-writable directories. ]]>

T09 · Insecure Skill Coding Practices

Warning
Location
SKILL.md:247
Finding

Errexit-Incompatible Counters Cause Premature Batch Termination and Incorrect Error Records

Content
View full analysis
"$FAILED_ITEMS" for item in "${ITEMS[@]}"; do if process_item "$item"; then ((PROCESSED++)) else ((FAILED++)) # Record the failed item jq --arg item "$item" --arg err "$?" '. += [{"item": $item, "error": $err}]' "$FAILED_ITEMS" > tmp && mv tmp "$FAILED_ITEMS" fi ``` ### Technical Analysis Bash arithmetic commands return success when their evaluated expression is nonzero and failure when it evaluates to zero. A post-increment expression evaluates to the variable's value before incrementing. Consequently: ```bash ((PROCESSED++)) ``` increments `PROCESSED` from zero to one but evaluates to zero and returns exit status 1. Because the script enables `set -e`, the first successful item can terminate the script immediately. The same flaw exists in: ```bash ((FAILED++)) ``` The first failed item can terminate the script before it is written to `failed.json`, directly contradicting the Skill's stated policy of recording recoverable errors and continuing with the remaining items. The error logging also uses `$?` only after executing `((FAILED++))`. Even when execution does not terminate, `$?` then represents the arithmetic command's status rather than the original `process_item` failure status. This produces misleading failure records and removes information needed for diagnosis or retry decisions. ### Attack Path 1. A user or Agent copies and executes the documented Bash template. 2. If the first item succeeds, `((PROCESSED++))` increments the counter but returns status 1 because its pre-increment value was zero. 3. `set -e` interprets that status as an unhandled failure and exits the script. 4. ...[truncated 1278 chars]
Remediation
View remediation
&2 exit 1 } if jq --arg item "$item" --argjson status "$status" \ '. += [{"item": $item, "status": $status}]' \ "$FAILED_ITEMS" > "$temp_file"; then mv -- "$temp_file" "$FAILED_ITEMS" else rm -f -- "$temp_file" printf 'Unable to record failure for %s\n' "$item" >&2 exit 1 fi fi done ``` If numeric JSON is not required, `--arg err "$status"` may be retained, but the status must still be captured before any intervening command. Add automated tests covering: - A first item that succeeds. - A first item that fails. - Multiple mixed successes and failures. - Failure-log write errors. - Interrupted execution followed by checkpoint recovery. - Partial side effects from non-idempotent operations. ]]>
Vulnerability Patterns
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • 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
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
Findings (5)

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The activation example is broad enough to match ordinary requests about processing files, which can cause the skill to engage in contexts the user did not explicitly intend. Because the skill has exec permission and is designed for batch operations, accidental triggering could escalate a routine assistance request into file-modifying or other bulk actions.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The capability coverage section claims support across a very wide set of loosely related scenarios without clear boundaries. In an agent environment, overly broad scope increases the chance of the skill being selected for tasks involving operational changes, data handling, or team workflows where its safeguards may not be appropriate or sufficient.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The skill says no extra API key is needed, but later permits external API batch operations using credentials from environment variables. This mismatch can cause users or agents to invoke sensitive external actions without clear disclosure of secret handling or authorization boundaries, increasing the risk of unintended data access or bulk actions against third-party systems.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
88% confidence
Finding

The license/copyright section explicitly states the skill was "完全中文化表达,适配中文用户使用场景," indicating a fixed language choice. The file does not offer a user language choice or opt-in, which can violate language/locale policy requirements for user-selectable language behavior.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Low
Category
Not specified by scanner
Confidence
75% confidence
Finding

L365 states that subAgent delegation is a paid-only feature, but elsewhere the skill is documented as an exec-capable batch orchestrator with lifecycle management and templates, without any concrete restriction mechanism. This is an intent/documentation inconsistency because the text claims an unavailable capability boundary that the skill content does not actually enforce.

Content

No source excerpt is available for this finding.