Back to skill

Security audit

slim

Security checks for vulnerabilities and agentic risk

Overview

This skill is a disclosed CLI output filter; its command-running mode is real but explicit and consistent with its purpose.

Before installing, understand that slim may hide the middle of large outputs and that 'slim -- some-command' executes that command under your normal agent privileges. Use pipe mode or rerun without slim when you need exact complete output. Avoid running bench.py unless you intentionally want local benchmark commands executed.

Vulnerability Patterns
  • 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
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
Vulnerability Patterns
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Tool MisuseTool Parameter Abuse, Chaining Abuse, Unsafe Defaults
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • Behavioral ASTexec() Call, eval() Call, Dynamic Import
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
Findings (7)

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
95% confidence
Finding

Using shell=True creates a tool-parameter abuse surface because the shell interprets metacharacters, expansions, and chained commands rather than executing a single intended program directly. Although the current commands are static, this skill’s purpose is to process command output, so reuse or extension could easily evolve into passing agent-controlled command strings into this function, at which point exploitation would become severe.

Content

Scanner excerpt · bench.py (reported line 29)May include surrounding context.

python
def run(cmd: str, cwd: str) -> str:
    p = subprocess.run(cmd, shell=True, cwd=cwd, capture_output=True, text=True)
    return p.stdout + p.stderr

Undeclared Tool Scope

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.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

This benchmark is explicitly designed to run real commands against local repositories and package environments on the host machine, but the header only says 'Run: python3 bench.py' and does not clearly warn that local state will be inspected and command execution will occur. In an agent-skill context, that is more dangerous because users may treat skills as passive text processors and not expect host command execution against specific paths.

Content

No source excerpt is available for this finding.

subprocess module call

Medium
Category
Dangerous Code Execution
Confidence
93% confidence
Finding

The benchmark executes shell commands via subprocess.run(..., shell=True), which is inherently risky because any future change that allows untrusted input into cmd would enable shell injection. In this file the current CASES are hardcoded, which lowers immediate exploitability, but the pattern is still dangerous and unnecessary for these simple commands.

Content

Scanner excerpt · bench.py (reported line 29)May include surrounding context.

python
def run(cmd: str, cwd: str) -> str:
    p = subprocess.run(cmd, shell=True, cwd=cwd, capture_output=True, text=True)
    return p.stdout + p.stderr

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

This is a manifest file, so vague-trigger review applies. The description says the filter is 'Always-on' and 'pluggable' but does not define when it activates, what commands it applies to by default, or any exclusions, which makes invocation scope ambiguous and could lead to unintended use.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The skill is described primarily as a pipe filter, but the -- mode allows it to launch arbitrary subprocesses and capture their combined stdout/stderr. In an agent setting, this broadens the tool from passive text filtering into active command execution, which increases the attack surface: a prompt or upstream tool can induce execution of unintended commands under the agent's privileges.

Content

No source excerpt is available for this finding.

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 · slim/cli.py (reported line 33)May include surrounding context.

python
if "--" in argv:
        i = argv.index("--")
        cmd = argv[i + 1:]
        proc = subprocess.run(cmd, capture_output=True, text=True)
        raw = proc.stdout + proc.stderr
        code = proc.returncode
        hint = " ".join(cmd)

Static analysis

No suspicious patterns detected.