Back to skill

Security audit

reka-batch

Security checks for vulnerabilities and agentic risk

Overview

ClawScan rates this skill suspicious with medium confidence: it reports an unconfirmed approval gate for billable batch submissions, risky command and environment handling, and incomplete scanner coverage.

Consider the potential for billable processing before approval, review the external model choice and notification command behavior, and decide whether the skill's broad tool capabilities fit your needs. Coverage is incomplete: Skillspector scanned 3 of 4 components, and several static checks were degraded because obfuscated instruction text could not be fully evaluated.

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/reka_batch.py
Finding

Paid batch submission lacks an enforced confirmation gate

Content
View full analysis

Impact

Direct invocation can start billable processing before the required approval. Idempotency prevents repeated creation for the same tracked submission but does not authorize its initial cost.

Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Tool MisuseTool Parameter Abuse, Chaining Abuse, Unsafe Defaults
  • Behavioral ASTexec() Call, eval() Call, Dynamic Import
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
Findings (12)

External Model or Provider Selection

High
Category
Excessive Agency
Confidence
90% confidence
Finding

Skill selects an external model or provider that may use a different account or billing plan than the operator expects. Undisclosed model switches can cause unexpected cost or quota consumption.

Content

Scanner excerpt · SKILL.md (reported line 49)May include surrounding context.

md
JSON examples with single braces stay intact.
     ```
     python3 {baseDir}/scripts/reka_batch.py make --items tickets.csv --id-field id \
       --system system.txt --prompt prompt.txt --model glm5.3-flash \
       --max-tokens 256 --reasoning none --json-mode --out requests.jsonl
     ```
   - Anything else (files in a repo, documents, generated briefs): write a short script that emits

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
80% confidence
Finding

Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).

Content

Scanner excerpt · references/api-notes.md (reported line 16)May include surrounding context.

md
| `POST /v1/files` (multipart, `purpose=batch`) | Upload a JSONL request file. No idempotency key. |
| `GET /v1/files?purpose=batch&limit=&order=&after=` | List files (find an upload whose reply was lost). |
| `GET /v1/files/{id}/content` | Download a file (inputs, results, errors). |
| `DELETE /v1/files/{id}` | Delete; HTTP 409 if it is the input of an unfinished batch. |
| `POST /v1/batches` | Create: `input_file_id`, `endpoint: /v1/chat/completions`, `completion_window: 24h`, optional `metadata` (16 pairs). Optional `Idempotency-Key` header. |
| `GET /v1/batches/{id}` | Status, `request_counts`, `usage`, `output_file_id`, `error_file_id`. |
| `GET /v1/batches?limit=&after=` | List, newest first. |

External Model or Provider Selection

High
Category
Excessive Agency
Confidence
90% confidence
Finding

Skill selects an external model or provider that may use a different account or billing plan than the operator expects. Undisclosed model switches can cause unexpected cost or quota consumption.

Content

Scanner excerpt · scripts/reka_batch.py (reported line 6)May include surrounding context.

python
Standard library only (Python 3.9+). Use it as a CLI or import it as a module.

  reka_batch.py make      --items items.csv --prompt prompt.txt --model glm5.3-flash --out requests.jsonl
  reka_batch.py validate  requests.jsonl
  reka_batch.py estimate  requests.jsonl --avg-output 300
  reka_batch.py submit    requests.jsonl --state-dir runs/tickets

Env Variable Harvesting

High
Category
Data Exfiltration
Confidence
60% confidence
Finding

Code enumerates, copies, or searches environment variables for secrets. Bulk environment access can collect credentials unrelated to the skill's stated purpose.

Content

Scanner excerpt · scripts/reka_batch.py (reported line 789)May include surrounding context.

python
def _notify(cmd: str, batch: Dict[str, Any], state_dir: Path) -> None:
    c = batch.get("request_counts") or {}
    env = dict(os.environ)
    env.pop("REKA_API_KEY", None)  # the hook never needs the key
    for name, value in (("RB_BATCH_ID", batch.get("id")), ("RB_STATUS", batch.get("status")),
                        ("RB_TOTAL", c.get("total", 0)), ("RB_COMPLETED", c.get("completed", 0)),

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
90% confidence
Finding

Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).

Content

Scanner excerpt · scripts/reka_batch.py (reported line 798)May include surrounding context.

python
counts") or {}
    env = dict(os.environ)
    env.pop("REKA_API_KEY", None)  # the hook never needs the key
    for name, value in (("RB_BATCH_ID", batch.get("id")), ("RB_STATUS", batch.get("status")),
                        ("RB_TOTAL", c.get("total", 0)), ("RB_COMPLETED", c.get("completed", 0)),
                        ("RB_FAILED", c.get("failed", 0))):
        s = str(value)
        env[name] = s if _SAFE.match(s) else "unknown"
    env["RB_STATE_DIR"] = str(Path(state_dir).resolve())
    try:
        subprocess.run(cmd, shell=True, env=env, timeout=60, check=False)  # the user's own command
    except subprocess.TimeoutExpired:
        log("warning: --notify-cmd timed out after 60s")


def wait(state_dir: Path, *, client: BatchClient, interval: float = 60.0, max_wait: float = 25 * 3600,
         notify_cmd: Optional[str] = None, sleep: Callable[[float], None] = time.sleep,
         on_update: Callable[[str], None] = log) -> Dict[str, Any]:
    state = _require_batch(state_dir)
    started, last_line, ba

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.

External Transmission

Medium
Category
Data Exfiltration
Confidence
60% 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/reka_batch.py (reported line 19)May include surrounding context.

python
Environment:
  REKA_API_KEY   required for API calls; never printed or written to disk.
  REKA_BASE_URL  optional. https://api.reka.ai/v1 (default), another https://*.reka.ai
                 endpoint, or an http(s) loopback URL for local testing.

API reference: https://developer.reka.ai/batch/reference

External Transmission

Medium
Category
Data Exfiltration
Confidence
60% 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/api-notes.md (reported line 8)May include surrounding context.

md
## Surface

OpenAI-compatible. Base URL `https://api.reka.ai/v1`, header `Authorization: Bearer $REKA_API_KEY`.
The OpenAI Python and TypeScript SDKs work unchanged with that base URL.

| Call | Purpose |

External Transmission

Medium
Category
Data Exfiltration
Confidence
60% 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/reka_batch.py (reported line 48)May include surrounding context.

python
__version__ = "0.1.0"
USER_AGENT = f"reka-batch/{__version__}"

DEFAULT_BASE_URL = "https://api.reka.ai/v1"
ENDPOINT = "/v1/chat/completions"
COMPLETION_WINDOW = "24h"

External Transmission

Medium
Category
Data Exfiltration
Confidence
60% 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/reka_batch.py (reported line 476)May include surrounding context.

python
return url
    if parts.scheme in ("http", "https") and host in ("127.0.0.1", "localhost", "::1"):
        return url
    raise RekaBatchError("REKA_BASE_URL must be https://api.reka.ai/v1 (or another https://*.reka.ai "
                         "endpoint), or a loopback URL for local testing")

Cloud Storage Exfiltration

Medium
Category
Data Exfiltration
Confidence
55% confidence
Finding

Data is uploaded to cloud storage (S3 / GCS / Azure Blob). This may be a legitimate backup or exfiltration to an external bucket. Manual review is recommended.

Content

Scanner excerpt · scripts/reka_batch.py (reported line 735)May include surrounding context.

python
save_state(state_dir, state)
            log(f"Uploading {fmt_int(report['rows'])} requests ({report['bytes']:,} bytes)…")
            try:
                uploaded = client.upload_file(local_copy, filename=state["upload_filename"])
            except TransientError as exc:
                raise UploadUncertain(f"Upload outcome unknown ({exc}). Rerun the same command: it looks for "
                                      "the file before uploading again.") from None

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

python
env[name] = s if _SAFE.match(s) else "unknown"
    env["RB_STATE_DIR"] = str(Path(state_dir).resolve())
    try:
        subprocess.run(cmd, shell=True, env=env, timeout=60, check=False)  # the user's own command
    except subprocess.TimeoutExpired:
        log("warning: --notify-cmd timed out after 60s")