Back to skill

Security audit

Sentinel

Security checks for vulnerabilities and agentic risk

Overview

This Solana security skill is mostly purpose-aligned, but its activation scope and shell-style user-input command need review before installation.

Review this skill before installing. It should be limited to Solana transaction and policy-review workflows, and any implementation should pass user messages to the Sentinel CLI using structured arguments or stdin, not by building a shell command string.

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

Shell Command Injection Through Unescaped User Input

Content
View full analysis

Vulnerability Details

File Location: SKILL.md, lines 27–30
Vulnerability Type: Shell command injection
Risk Level: High

Vulnerable Code Snippet:

bash
sentinel scan --input "USER_MESSAGE_HERE" --format json

Technical Analysis

The skill instructs the agent to place untrusted user input directly into a shell command. Wrapping the placeholder in double quotes does not make this construction safe: input containing a double quote can terminate the argument, while command substitutions such as $() may be evaluated inside double quotes by a shell.

If an implementation follows this instruction through a shell-based execution interface or constructs the command as a string, attacker-controlled syntax may be interpreted by the shell rather than passed solely as data to sentinel. The security scan therefore becomes a potential code-execution boundary before the input has been determined to be safe.

This finding applies when the documented command is implemented through shell interpretation. Direct process invocation with a correctly separated argument array would prevent this exploit.

Attack Path

  1. An attacker submits a user message containing shell syntax, such as a closing quotation mark followed by a command or a command-substitution expression.
  2. The agent replaces USER_MESSAGE_HERE with that message in the documented command string.
  3. The agent passes the constructed string to a shell-based execution mechanism.
  4. The shell parses the injected syntax and runs the attacker-selected command.
  5. The injected command executes before or alongside the intended sentinel scan, bypassing the purpose of the pre-execution safety gate.

Impact Assessment

Successful exploitation permits arbitrary command execution with the same operating-system privileges as the agent or process implementing the skill. Depending on that process's access, an attacker could read or modify local files, ac ...[truncated 353 chars]

Remediation
View remediation

Remediation Suggestions

  • Do not interpolate user-controlled content into a shell command string.

  • Invoke sentinel directly with a structured argument array and disable shell processing. For example:

    python
    subprocess.run(
        ["sentinel", "scan", "--input", user_message, "--format", "json"],
        shell=False,
        check=False,
        capture_output=True,
        text=True,
    )
    
  • Alternatively, modify the interface to accept the message through standard input, avoiding command-line parsing of user content.

  • Explicitly state in SKILL.md that implementations must not use shell=True, eval, textual command concatenation, or equivalent shell-evaluation facilities.

  • Do not rely on manual escaping as the primary defense; use APIs that preserve argument boundaries.

  • Apply least privilege and sandboxing to the process that invokes sentinel so that any future command-execution flaw has limited access to files, credentials, wallets, and the network.

  • Add regression tests containing double quotes, semicolons, newlines, backticks, $() expressions, and other shell metacharacters, verifying that each complete message reaches sentinel as one literal argument.

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 trigger list includes very generic phrases such as "scan," "security check," "risk assessment," and "is this safe," which are likely to match ordinary user requests outside the intended context. In an agent framework, overly broad triggers can cause unintended activation of this skill, potentially intercepting or influencing unrelated workflows and creating denial-of-service or incorrect routing behavior around sensitive transaction decisions.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.