T09 · Insecure Skill Coding Practices
- Location
scripts/rlm_auto.py:63- Finding
Untrusted slice content is not isolated from sub-agent instructions
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
The skill appears purpose-built for long-document analysis, but it uses autonomous exec and session spawning while some advertised safety limits and prompt-isolation protections are not fully enforced.
Install only if you are comfortable with a skill that can run bundled helper scripts, write full input copies and prompts to disk, and spawn sub-agent sessions. Use it in a workspace you control, avoid sensitive inputs unless you trust the redaction limits, review generated toolcalls before execution, consider enabling disableModelInvocation for confirmation, and run cleanup carefully because CLEAN_RETENTION=0 deletes matching scratch files.
scripts/rlm_auto.py:63Untrusted slice content is not isolated from sub-agent instructions
scripts/rlm_auto.py:28Documented hard limits can be overridden during prompt generation
scripts/rlm_auto.py:36Derived output paths can follow symlinks outside the workspace
This finding highlights undeclared cleanup and file deletion behavior exposed through scripts/cleanup.sh, including environment-controlled retention and ignore settings. Hidden destructive filesystem operations are dangerous because operators may invoke the skill expecting analysis only, while it can also purge artifacts or potentially remove unintended files if path handling or retention logic is flawed.
This finding highlights undeclared cleanup and file deletion behavior exposed through scripts/cleanup.sh, including environment-controlled retention and ignore settings. Hidden destructive filesystem operations are dangerous because operators may invoke the skill expecting analysis only, while it can also purge artifacts or potentially remove unintended files if path handling or retention logic is flawed.
This finding highlights undeclared cleanup and file deletion behavior exposed through scripts/cleanup.sh, including environment-controlled retention and ignore settings. Hidden destructive filesystem operations are dangerous because operators may invoke the skill expecting analysis only, while it can also purge artifacts or potentially remove unintended files if path handling or retention logic is flawed.
This finding highlights undeclared cleanup and file deletion behavior exposed through scripts/cleanup.sh, including environment-controlled retention and ignore settings. Hidden destructive filesystem operations are dangerous because operators may invoke the skill expecting analysis only, while it can also purge artifacts or potentially remove unintended files if path handling or retention logic is flawed.
This finding highlights undeclared cleanup and file deletion behavior exposed through scripts/cleanup.sh, including environment-controlled retention and ignore settings. Hidden destructive filesystem operations are dangerous because operators may invoke the skill expecting analysis only, while it can also purge artifacts or potentially remove unintended files if path handling or retention logic is flawed.
This finding highlights undeclared cleanup and file deletion behavior exposed through scripts/cleanup.sh, including environment-controlled retention and ignore settings. Hidden destructive filesystem operations are dangerous because operators may invoke the skill expecting analysis only, while it can also purge artifacts or potentially remove unintended files if path handling or retention logic is flawed.
This finding highlights undeclared cleanup and file deletion behavior exposed through scripts/cleanup.sh, including environment-controlled retention and ignore settings. Hidden destructive filesystem operations are dangerous because operators may invoke the skill expecting analysis only, while it can also purge artifacts or potentially remove unintended files if path handling or retention logic is flawed.
This finding highlights undeclared cleanup and file deletion behavior exposed through scripts/cleanup.sh, including environment-controlled retention and ignore settings. Hidden destructive filesystem operations are dangerous because operators may invoke the skill expecting analysis only, while it can also purge artifacts or potentially remove unintended files if path handling or retention logic is flawed.
This finding highlights undeclared cleanup and file deletion behavior exposed through scripts/cleanup.sh, including environment-controlled retention and ignore settings. Hidden destructive filesystem operations are dangerous because operators may invoke the skill expecting analysis only, while it can also purge artifacts or potentially remove unintended files if path handling or retention logic is flawed.
This finding highlights undeclared cleanup and file deletion behavior exposed through scripts/cleanup.sh, including environment-controlled retention and ignore settings. Hidden destructive filesystem operations are dangerous because operators may invoke the skill expecting analysis only, while it can also purge artifacts or potentially remove unintended files if path handling or retention logic is flawed.
This finding highlights undeclared cleanup and file deletion behavior exposed through scripts/cleanup.sh, including environment-controlled retention and ignore settings. Hidden destructive filesystem operations are dangerous because operators may invoke the skill expecting analysis only, while it can also purge artifacts or potentially remove unintended files if path handling or retention logic is flawed.
This finding highlights undeclared cleanup and file deletion behavior exposed through scripts/cleanup.sh, including environment-controlled retention and ignore settings. Hidden destructive filesystem operations are dangerous because operators may invoke the skill expecting analysis only, while it can also purge artifacts or potentially remove unintended files if path handling or retention logic is flawed.
This finding highlights undeclared cleanup and file deletion behavior exposed through scripts/cleanup.sh, including environment-controlled retention and ignore settings. Hidden destructive filesystem operations are dangerous because operators may invoke the skill expecting analysis only, while it can also purge artifacts or potentially remove unintended files if path handling or retention logic is flawed.
This finding highlights undeclared cleanup and file deletion behavior exposed through scripts/cleanup.sh, including environment-controlled retention and ignore settings. Hidden destructive filesystem operations are dangerous because operators may invoke the skill expecting analysis only, while it can also purge artifacts or potentially remove unintended files if path handling or retention logic is flawed.
This finding highlights undeclared cleanup and file deletion behavior exposed through scripts/cleanup.sh, including environment-controlled retention and ignore settings. Hidden destructive filesystem operations are dangerous because operators may invoke the skill expecting analysis only, while it can also purge artifacts or potentially remove unintended files if path handling or retention logic is flawed.
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).
These scripts:
- Accept only structured CLI arguments (argparse)
- Produce only JSON or plain-text output to stdout
- Never call `eval()`, `exec()`, `subprocess.Popen(shell=True)`, or equivalent
- Never interpret model output as code or commands
- Never make network requests
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).
These scripts:
- Accept only structured CLI arguments (argparse)
- Produce only JSON or plain-text output to stdout
- Never call `eval()`, `exec()`, `subprocess.Popen(shell=True)`, or equivalent
- Never interpret model output as code or commands
- Never make network requests
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
cmd = [
sys.executable,
os.path.join(SCRIPTS_DIR, 'rlm_ctx.py'),
'store', '--infile', '../../../etc/passwd',
'--ctx-dir', self.tmpdir,
]
result = subprocess.run(cmd, capture_output=True, text=True, cwd=self.tmpdir)
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
cmd = [
sys.executable,
os.path.join(SCRIPTS_DIR, 'rlm_ctx.py'),
'store', '--infile', '../../../etc/passwd',
'--ctx-dir', self.tmpdir,
]
result = subprocess.run(cmd, capture_output=True, text=True, cwd=self.tmpdir)
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
cmd = [
sys.executable,
os.path.join(SCRIPTS_DIR, 'rlm_ctx.py'),
'store', '--infile', '../../../etc/passwd',
'--ctx-dir', self.tmpdir,
]
result = subprocess.run(cmd, capture_output=True, text=True, cwd=self.tmpdir)
The skill advertises use of powerful capabilities (read, write, exec, sessions_spawn) but does not declare an explicit tool scope such as permissions or allowed-tools. That creates a policy gap where the runtime may grant broader access than intended, increasing the blast radius if prompts, helper scripts, or spawned sessions are abused.
The skill explicitly uses exec and sessions_spawn, both of which materially increase attack surface, yet the only stated guard is a textual safelist claim in documentation. Without enforceable tool scoping and independently verified argument/path constraints, a compromised helper script, prompt-manipulated workflow, or unsafe spawned session could lead to command execution, file modification, or lateral expansion of model actions.
## Tooling
- Uses OpenClaw tools: `read`, `write`, `exec`, `sessions_spawn`
- `exec` is used **only** to invoke the safelisted helper scripts bundled in `scripts/`
- Does **not** execute arbitrary code from model output
- All emitted toolcalls are validated against an explicit safelist before output
## Autonomous Invocation
The documentation provides a destructive cleanup command that can delete all retained files by setting CLEAN_RETENTION=0, but it does not include warnings, confirmation steps, scope limitations, or examples showing how to verify the target directories before execution. In a controller skill that operates over workspace scratch data and generated run artifacts, this increases the chance of accidental data loss by operators or downstream automation that follows the documented flow verbatim.
The manifest describes a controller for treating inputs as external context, slicing/searching them, and spawning bounded recursive subcalls for analysis. This script instead deletes files from scratch and log directories, which is operational workspace maintenance rather than long-context control behavior.
subprocess module calls execute external commands. Without careful input validation, this enables command injection.
def run_plan(ctx, goal):
cmd = ["python3", os.path.join(os.path.dirname(__file__), "rlm_plan.py"),
"--ctx", ctx, "--goal", goal]
out = subprocess.check_output(cmd, text=True)
return json.loads(out)
def read_text(path):
No suspicious patterns detected.