Back to skill

Security audit

Exec Local

Security checks for vulnerabilities and agentic risk

Overview

This skill openly provides unrestricted shell access in a container and is intended to help manage a remote host, which is high-impact and not tightly scoped.

Install only in a hardened, disposable, least-privileged container with no unnecessary secrets, mounts, SSH keys, or broad network reach. Use explicit human approval and command allowlists for remote-host or state-changing operations.

Vulnerability Patterns
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
  • 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)

T05 · Unauthorized Access and Privilege Escalation

Error
Location
skill.json:5
Finding

Unrestricted Shell Command Execution Enables Privilege Boundary Abuse and Remote-Host Pivoting

Content
View full analysis

Vulnerability Details

File Location: skill.json:5-15
Corroborating Locations: skill.yaml:4-13, SKILL.md:3-10
Vulnerability Type: Arbitrary shell command execution without visible authorization or command restrictions
Risk Level: High

Vulnerable Code

json
{
  "name": "exec",
  "description": "Run a shell command and return stdout and stderr.",
  "input_schema": {
    "type": "object",
    "properties": {
      "command": { "type": "string" }
    },
    "required": ["command"]
  }
}

The corresponding YAML definition is:

yaml
tools:
  - name: exec
    description: Run a shell command and return stdout and stderr.
    input_schema:
      type: object
      properties:
        command:
          type: string
      required:
        - command

The documented operational scope includes:

markdown
The `exec_local` skill provides a direct interface for executing system-level shell commands within the `thundarr-gpu` container environment on Garuda.

### Core Functionality
- **Direct Shell Access**: Allows for low-latency execution of binary tools and scripts.
- **Remote Orchestration**: Designed to be used as a jump-point for managing the Fedora UM250 host via the `thundarr-remote` SSH script.
- **Resource Monitoring**: Can be used to check local container health, process tables, and network availability between Docker nodes.

### Security Note
This tool executes commands with the permissions of the container user. Ensure all inputs are sanitized when used in automated workflows.

Technical Analysis

The tool accepts an unrestricted string in the command property and describes that value as a shell command. The reviewed configuration provides no command allowlist, structured argument model, shell-metacharacter rejection, caller authorization requirement, execution approval gate, or resource-level policy.

Consequently, any a ...[truncated 2510 chars]

Remediation
View remediation

Remediation Suggestions

  1. Replace the generic shell interface with narrowly scoped operations such as process inspection, health checks, and predefined remote-management actions.
  2. Define structured parameters for each operation and validate them against strict type, length, character, and semantic constraints.
  3. Maintain an explicit allowlist of executable paths and permitted arguments. Deny all commands not required by the skill's declared purpose.
  4. Invoke approved binaries directly through an argument array rather than through a command shell. Do not use constructs equivalent to sh -c.
  5. If shell interpretation cannot be removed, reject control operators, substitutions, redirections, newlines, globbing, and other shell metacharacters; this is secondary defense and should not replace direct process invocation.
  6. Require explicit authorization or human approval for state-changing commands, credential access, network operations, and remote-host actions.
  7. Run the tool under a dedicated least-privileged account in a hardened container with a read-only filesystem, dropped Linux capabilities, resource limits, and only essential mounts.
  8. Remove SSH keys, agents, helper scripts, and remote-host network connectivity unless remote orchestration is indispensable.
  9. If remote access is required, use a restricted SSH identity limited to specific commands and resources. Apply destination allowlists and prohibit general-purpose interactive shells.
  10. Prevent untrusted prompts, retrieved content, and user-controlled text from being copied directly into command arguments.
  11. Record the authenticated caller, approved operation, normalized arguments, destination, exit status, and timestamp in tamper-resistant audit logs.
  12. Add security tests verifying rejection of command chaining, substitution, redirection, traversal, multiline input, unauthorized executables, and unapproved remote destinations.
Vulnerability Patterns
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
Findings (1)

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The skill exposes a generic shell execution capability with no stated restrictions on when it may be invoked or what commands are allowed. Because the tool description explicitly permits arbitrary command execution inside the container, an agent or prompt-injected workflow could use it for filesystem access, credential discovery, lateral movement within the container environment, or destructive actions.

Content

No source excerpt is available for this finding.