Back to skill

Security audit

Frugal Orchestrator

Security checks for vulnerabilities and agentic risk

Overview

This orchestration skill is not clearly malicious, but it needs review because it can run manifest-controlled commands and scripts while also persisting task data without enough scoping or warnings.

Install only in a sandbox or low-privilege account, treat task manifest files as executable code, prefer --dry-run for new manifests, review any scheduled tasks, logs, cache files, and git automation before use, and avoid passing secrets or sensitive prompts through delegation context until retention and redaction behavior is clear.

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

Error
Location
scripts/batch_processor.py:341
Finding

Unrestricted Command Execution Through Batch Task Manifests

Content
View full analysis
List[Task]: """Parse task definition file (JSON or TOON format)""" content = file_path.read_text() # Try JSON first try: data = json.loads(content) if 'tasks' in data: return [Task(**task_def) for task_def in data['tasks']] return [Task(**data)] except json.JSONDecodeError: pass ``` String commands supplied by those task definitions are executed through the system shell: ```python def _execute_shell(self, task: Task) -> TaskResult: """Execute a shell command task""" result = TaskResult( task_id=task.id, task_type=task.type, status='failed', start_time=datetime.now() ) try: if self.dry_run: result.output = f"[DRY-RUN] Would execute: {task.command}" result.status = 'success' elif task.command: self.rate_limiter.acquire() use_shell = isinstance(task.command, str) proc = subprocess.run( task.command if use_shell else task.command.split(), capture_output=True, text=True, timeout=300, shell=use_shell ) ``` Manifest-controlled Python script paths and arguments are also executed without path restrictions: ```python def _execute_script(self, task: Task) -> TaskResult: """Execute a script task""" result = TaskResult( task_id=task.id, task_type=task.type, status='failed', start_time=datetime.now() ...[truncated 4394 chars]
Remediation
View remediation
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Rogue AgentSelf-Modification, Session Persistence
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • Behavioral ASTexec() Call, eval() Call, Dynamic Import
Findings (25)

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The skill description advertises a broad 'complete token-efficient task orchestration platform' with auto-routing and delegation, but it does not define clear activation boundaries, allowed task classes, or safety gates. In an agentic environment, ambiguous orchestration language can cause the skill to be invoked for high-risk actions implicitly, increasing the chance of unsafe command execution or inappropriate delegation.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

These sections describe routing tasks to terminal commands, Python/Node.js execution, and scheduler integration, yet they provide no warning that these capabilities may execute arbitrary code, alter the host system, or create persistent scheduled actions. Users and supervising agents are not informed of the need for confirmation and sandboxing, which materially raises the risk of command injection, destructive execution, or unauthorized persistence.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The A2A mesh, caching layer, and learning/history features introduce clear confidentiality and integrity risks, but the description omits warnings about data sharing, stale or poisoned cache entries, cross-agent trust, and retention of task history. In a multi-agent system, these omissions can lead to unintended disclosure of sensitive data, unsafe reuse of prior outputs, or trust of malicious peer agents.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The router extracts any URL-like substring from untrusted task text and turns it into a ready-to-run curl command. In an agent skill context, this lowers the barrier to SSRF-style access, unexpected outbound requests, access to internal services, or retrieval of attacker-controlled content without any confirmation or policy enforcement.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

Returning the generic template 'bash -c ' encourages downstream execution of arbitrary shell content derived from a task classified as a system action. In an orchestration setting, this can normalize unsafe shell execution and make command-injection or destructive command dispatch more likely when other components fill in the placeholder unsafely.

Content

No source excerpt is available for this finding.

Session Persistence

Medium
Category
Rogue Agent
Confidence
80% 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/batch_processor.py (reported line 156)May include surrounding context.

python
self._lock = Lock()
    
    def put(self, task: Task):
        """Add task to queue"""
        with self._lock:
            self._counter += 1
            # (priority, counter, task) - counter ensures FIFO for same priority

Session Persistence

Medium
Category
Rogue Agent
Confidence
80% 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/batch_processor.py (reported line 302)May include surrounding context.

python
self._lock = Lock()
    
    def put(self, task: Task):
        """Add task to queue"""
        with self._lock:
            self._counter += 1
            # (priority, counter, task) - counter ensures FIFO for same priority

Unbounded Resource Access

Medium
Category
Excessive Agency
Confidence
75% confidence
Finding

Skill allows unbounded resource consumption (API calls, storage, compute). Without rate limits or quotas, a compromised or misbehaving agent can cause denial-of-service or cost overruns.

Content

Scanner excerpt · scripts/batch_processor.py (reported line 165)May include surrounding context.

python
def get(self) -> Optional[Task]:
        """Get highest priority task"""
        try:
            _, _, task = self._queue.get(timeout=0.1)
            return task
        except:
            return 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/batch_processor.py (reported line 252)May include surrounding context.

python
str(success).lower(),
                    str(duration_ms)
                ]
                subprocess.run(cmd, capture_output=True, timeout=5)
            except Exception:
                pass  # Non-critical, continue on failure

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
98% confidence
Finding

The CLI processes externally provided task files and can run arbitrary shell commands without any interactive warning, confirmation, or clearly gated execution flag. In an agent-skill context, this increases the likelihood of unsafe execution because users may treat task files as data rather than executable instructions.

Content

No source excerpt is available for this finding.

subprocess module call

Medium
Category
Dangerous Code Execution
Confidence
99% confidence
Finding

Shell tasks execute arbitrary task.command content via subprocess.run with shell=True because task.command is always a string, and that string is loaded from external JSON/TOON task files. This creates direct arbitrary command execution, allowing an attacker who can supply or influence task files to run system commands, access files, exfiltrate data, or modify the host.

Content

Scanner excerpt · scripts/batch_processor.py (reported line 358)May include surrounding context.

python
self.rate_limiter.acquire()
                
                use_shell = isinstance(task.command, str)
                proc = subprocess.run(
                    task.command if use_shell else task.command.split(),
                    capture_output=True,
                    text=True,

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The processor executes scripts specified in input tasks without prior warning or confirmation, making externally supplied task files an implicit code-execution vector. In this orchestration context, users could unknowingly run attacker-chosen scripts simply by processing a task definition file.

Content

No source excerpt is available for this finding.

subprocess module call

Medium
Category
Dangerous Code Execution
Confidence
91% confidence
Finding

Script execution accepts task.script_path and task.script_args from task input and runs them as a Python subprocess with no validation, allowlist, or confirmation. An attacker controlling the task file can cause execution of arbitrary local Python code, resulting in code execution with the privileges of the orchestrator process.

Content

Scanner excerpt · scripts/batch_processor.py (reported line 402)May include surrounding context.

python
self.rate_limiter.acquire()
                
                cmd = [sys.executable, str(task.script_path)] + task.script_args
                proc = subprocess.run(
                    cmd,
                    capture_output=True,
                    text=True,

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
86% confidence
Finding

This code silently deletes expired cache files with unlink() and writes cache contents to disk with write_text(), but there is no confirmation prompt, logging, or user-facing notice around these file modifications. For a code file, SQP-2 applies when file writes or deletions lack any visible disclosure, and the surrounding docstrings describe caching behavior but do not warn about automatic on-disk writes and deletions to users invoking the script.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The module-level docstring and class definition present this file as a working cache manager implementation, but the CLI path in main() tries to create TaskCache(), which does not exist anywhere in the file. This is not just incomplete documentation; the exposed command-line behavior contradicts the apparent intent that this script manages the cache through the defined class.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The script persists a task snippet to tokens.json and emits the full task, and potentially the full contents of a user-supplied context file, into the generated JSON output. If tasks or context files contain secrets, credentials, proprietary code, or sensitive prompts, this creates an unintended disclosure channel through logs and downstream tool invocations without any sanitization, minimization, or user warning.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
80% confidence
Finding

The function docstring at L45 says it updates delegation metrics files, and the surrounding code writes out successful/failed delegation counts. However, the emitted metrics preserve total_delegations unchanged from prior state and never increment it for a completed delegation, so the documented intent of updating completion metrics is not fully reflected in the actual behavior.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

The code persists failure records to disk in failures.json and includes task_type plus up to 200 characters of the raw error message. Error strings often contain prompts, file paths, tokens, identifiers, or user content, so this can create unintended persistent storage of sensitive data without any consent, retention control, or sanitization. In an orchestrator/recovery component, repeated failures increase the chance that confidential operational context is written and retained.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

This code persists task history and routing statistics to disk in a local JSON file without any indication of user consent, retention control, or data minimization. If task descriptions contain sensitive prompts, business data, or personal information, that information may be silently retained on disk and later exposed through filesystem access, backups, or log collection.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

This shell script overwrites or creates local files via redirection and copy operations, appends to a markdown log, and pushes commits to a remote repository. While the header comments describe the workflow, there is no user-facing prompt, warning, or visible disclosure before these state-changing actions occur.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The step-3 comment at L34 describes committing both generated files and pushing, and the git add command also stages docs/phase5_log.md at L37. However, the actual append to docs/phase5_log.md happens later at L42, after the commit and push, so the log update is not included in the commit described by the comment and staging step. This is an active contradiction between the documented workflow and the code's real behavior.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The delete_task method permanently removes a JSON file via unlink(), but it provides no confirmation prompt, logging, print statement, or explanatory comment/docstring warning about the destructive action. For code files, destructive or irreversible operations should have some form of user disclosure unless already clearly warned elsewhere.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Low
Category
Not specified by scanner
Confidence
89% confidence
Finding

The module docstring describes the output as limited to three fields, suggesting a minimal routing result. In practice, the returned JSON also includes internal scoring breakdowns and matched pattern categories, which is a direct documentation-to-code mismatch rather than a mere omitted implementation detail because it changes the exposed behavior of the skill.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
79% confidence
Finding

The processor always writes a TOON results file to the output directory, which is a file-write side effect. Although completion is printed after the write, the CLI help and interface do not clearly warn users up front that running the skill will persist task outputs and errors to disk.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
88% confidence
Finding

This Python file performs multiple file write operations to tokens.json, metrics.json, and metrics.toon, but the code provides no prior user disclosure beyond terse success/error output after the fact. The docstrings describe the behavior for developers, but there is no explicit warning or confirmation around modifying persistent project state.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.