Back to skill

Security audit

Triskill

Security checks for vulnerabilities and agentic risk

Overview

The skill is mostly coherent, but its command-retry helper can run arbitrary commands while overstating its safety boundaries.

Review before installing. The fact-check and shared-memory tools are ordinary but may send search queries to DuckDuckGo or store local state unencrypted. The main risk is selfheal.py: only run it on commands you already trust, because it can execute arbitrary programs with your agent's normal filesystem, network, environment, and account access, and it logs command/output details in plaintext.

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 (5)

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/factcheck.py:19
Finding

Sensitive fact-check queries can be transmitted to an external search provider

Content
View full analysis
bool: q = query.lower() return any(re.search(p, q) for p in BLOCKED_PATTERNS) def search_duckduckgo_html(query: str, max_results: int = 5): """ Uses DuckDuckGo's HTML-only endpoint (no JS, no API key required). This is a best-effort, dependency-free fallback search. It is meant for casual fact verification, not high-volume scraping. """ url = "https://html.duckduckgo.com/html/?" + urllib.parse.urlencode({"q": query}) req = urllib.request.Request(url, headers={"User-Agent": USER_AGENT}) try: with urllib.request.urlopen(req, timeout=10) as resp: html = resp.read().decode("utf-8", errors="replace") ``` ### Technical Analysis The fact-check capability legitimately requires outbound network access, and the audited code sends requests only to DuckDuckGo's HTTPS search endpoint. However, the confidentiality control is a small keyword denylist rather than a reliable sensitive-data boundary. Queries containing terms such as `token`, `secret`, `API key`, session cookies, private-key material, email addresses, customer identifiers, or unlisted internal hostnames are not rejected. Any accepted query is URL-encoded and transmitted to the external provider. The script does not autonomously read local credentials, and no covert collection mechanism was identified. Exploitation therefore requires sensitive information to be placed in the query by a user, agent, or upstream workflow. ### Attack ...[truncated 853 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Error
Location
scripts/selfheal.py:25
Finding

Self-healing wrapper does not enforce its documented privilege and filesystem boundaries

Content
View full analysis
\s*/dev/sd[a-z]", ] LOG_FILE = "selfheal_log.jsonl" def is_destructive(cmd_str: str) -> bool: return any(re.search(p, cmd_str, re.I) for p in DESTRUCTIVE_PATTERNS) ``` ```python def run_once(cmd_list, timeout): start = time.time() try: proc = subprocess.run( cmd_list, cwd=os.getcwd(), capture_output=True, text=True, timeout=timeout, ) duration = round(time.time() - start, 2) return proc.returncode, proc.stdout, proc.stderr, duration ``` ```python cmd_str = " ".join(shlex.quote(a) for a in args) if is_destructive(cmd_str): print(json.dumps({ "error": "refused: command matches a destructive pattern and will not be run.", "command": cmd_str, })) sys.exit(2) ``` The corresponding documentation states: ```text Never runs as root and does not attempt privilege escalation. Never modifies files outside the current working directory. ``` ### Technical Analysis The wrapper accepts an arbitrary executable and argument list and launches it through `subprocess.run()`. The child process inherits the wrapper's user identity, environment, filesystem access, and other available privileges. Setting `cwd=os.getcwd()` only establishes the process's initial working directory. It does not confine filesystem access. A child can use absolute paths, parent-directory traversal, subprocesses, network clients, or language runtimes to access resources outside the curre ...[truncated 1788 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/selfheal.py:118
Finding

Failed non-idempotent commands are automatically repeated without approval

Content
View full analysis
= max_retries: print(json.dumps({ "status": "retry_budget_exhausted", "attempts": attempt, "advice": "Stop retrying the same command. A human or the agent " "must change something before trying again.", })) sys.exit(1) ``` ### Technical Analysis The implementation immediately repeats the identical command until the retry budget is exhausted. This conflicts with the displayed note and skill documentation indicating that the agent should diagnose the failure, propose a change, and rerun explicitly. A nonzero exit status does not prove that a command had no side effects. A program can creat ...[truncated 1096 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/selfheal.py:58
Finding

Command arguments and output are persisted in plaintext audit logs

Content
View full analysis
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Note
Location
scripts/sharedmem.py:100
Finding

Shared-memory size restriction can be bypassed through mutation operations

Content
View full analysis
MAX_VALUE_BYTES: return {"error": f"value exceeds {MAX_VALUE_BYTES} byte cap"} _ensure_store() with locked_file(STORE_FILE, "r+") as f: data = _load(f) ns = data.setdefault(namespace, {}) ns[key] = value _save(f, data) return {"status": "ok", "namespace": namespace, "key": key} ``` ```python def cmd_incr(namespace, key, amount): _ensure_store() with locked_file(STORE_FILE, "r+") as f: data = _load(f) ns = data.setdefault(namespace, {}) try: current = int(ns.get(key, "0")) except ValueError: return {"error": f"existing value for {key} is not an integer"} new_val = current + amount ns[key] = str(new_val) _save(f, data) return {"status": "ok", "namespace": namespace, "key": key, "value": new_val} def cmd_cas(namespace, key, expected, new): """Compare-and-swap: only write `new` if current value == expected.""" _ensure_store() with locked_file(STORE_FILE, "r+") as f: data = _load(f) ns = data.setdefault(namespace, {}) current = ns.get(key) if current != expected: return { "status": "conflict", "namespace": namespace, "key": key, "expected": expected, "actual": current, } ns[key] = new _save(f, data) return {"status": "ok", "namespace": namespace, "key": key, "value": new} ``` ### Technical Analysis The documented 64 KB value cap is enforced only by `cmd_set()`. The compare-and-swap operation assigns `new` without validating its encoded size. The inc ...[truncated 1194 chars]
Remediation
View remediation
Vulnerability Patterns
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • 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
Findings (11)

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
90% confidence
Finding

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).

Content

Scanner excerpt · README.md (reported line 9)May include surrounding context.

md
it with confidence. Read-only, refuses credential/login-looking queries.
2. **Self-Heal** — bounded diagnose-and-retry wrapper for failing commands.
   Classifies the failure cause, logs every attempt for audit, refuses
   destructive commands (`rm -rf /`, fork bombs, etc.), and never silently
   rewrites your code — it surfaces a diagnosis, the agent proposes the fix.
3. **Shared Memory** — a local, file-locked JSON key-value store so multiple
   agents/sub-agents on the same machine can coordinate (claim tasks,

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
85% confidence
Finding

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).

Content

Scanner excerpt · README.md (reported line 9)May include surrounding context.

md
it with confidence. Read-only, refuses credential/login-looking queries.
2. **Self-Heal** — bounded diagnose-and-retry wrapper for failing commands.
   Classifies the failure cause, logs every attempt for audit, refuses
   destructive commands (`rm -rf /`, fork bombs, etc.), and never silently
   rewrites your code — it surfaces a diagnosis, the agent proposes the fix.
3. **Shared Memory** — a local, file-locked JSON key-value store so multiple
   agents/sub-agents on the same machine can coordinate (claim tasks,

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding

The code accurately supports only the fact-checking portion of the declared description: it accepts a query, performs a read-only web lookup, and returns snippets/URLs. However, the declaration also claims capabilities for recovery from failed commands/code execution and for shared cross-session state management. None of those behaviors appear in the supplied code: there is no shell interaction, no error diagnosis beyond reporting network/search errors, no fix generation, and no persistence or shared variable storage. This is a material description-to-behavior mismatch because major declared purposes are absent from the actual implementation.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
96% confidence
Finding

The code substantially matches only part (2) of the declared description: bounded diagnosis/retry for failing commands, with explicit non-destructive safeguards and human-directed next steps. However, the declared purpose also says the skill should be used for live fact verification and for safe shared state across sessions/sub-agents. None of that functionality exists in this code chunk. The script does not access web/live sources, verify claims, or expose any key-value/state sharing interface; its log file is only an internal append-only execution log, not a safe coordination mechanism. Because the declared description presents a broader three-part skill, while the supplied code implements only one part, the description does not accurately represent the actual behavior overall.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

This is a partial mismatch. One declared purpose—safe shared state across multiple agents—is accurately represented by the code: it uses a local JSON file plus OS-level locking and compare-and-swap/increment operations to coordinate concurrent access. However, the declared description also claims the skill should be used for live fact-checking and debugging failed shell/code execution, and there is no code for network access, source retrieval, command execution, error analysis, or repair planning. Thus the description materially overstates the skill's capabilities beyond what the supplied code chunk actually does.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
95% confidence
Finding

The skill advertises scripts that use network access, shell execution, and file writes, but the manifest does not declare any explicit tool scope such as allowed tools or permissions. That creates an authorization gap: an orchestrator or reviewer cannot easily constrain or audit what the skill is expected to access, increasing the chance of over-privileged invocation or unsafe reuse in other contexts.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The manifest description contains broad trigger conditions such as 'whenever the agent needs to' and covers multiple unrelated workflows. Overly general invocation language can cause the skill to be selected in situations involving shell execution, network fact-checking, or shared-state writes when a narrower or safer tool would suffice, increasing accidental exposure to risky capabilities.

Content

No source excerpt is available for this finding.

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 · SKILL.md (reported line 55)May include surrounding context.

md
diagnosis; you propose the fix; you re-run explicitly.
4. The wrapper enforces a hard retry ceiling (default 3, override with
   `--max-retries`) and a per-attempt timeout (default 30s, override with
   `--timeout`). It refuses to loop forever.
5. Every attempt (command, exit code, duration, truncated output) is
   appended to `selfheal_log.jsonl` in the working directory so a human
   can audit exactly what was tried.

Unrestricted Tool Access

Medium
Category
Excessive Agency
Confidence
91% confidence
Finding

The safety summary admits that the self-heal component runs whatever command the caller supplies. Even if framed as 'nothing else,' executing arbitrary user-provided shell commands is a powerful primitive that can lead to code execution, data exfiltration, destructive operations, or lateral movement if the surrounding agent invokes it on untrusted input or in a sensitive environment.

Content

Scanner excerpt · SKILL.md (reported line 107)May include surrounding context.

md
## Safety Summary

| Capability | Can it modify files? | Can it execute arbitrary code? | Network access? |
|---|---|---|---|
| Fact-Check | No | No | Yes (read-only search) |
| Self-Heal | No (suggests only) | Runs the command you give it, nothing else | Only if your command needs it |

subprocess module call

Medium
Category
Dangerous Code Execution
Confidence
91% confidence
Finding

This wrapper executes an arbitrary command supplied on the command line with subprocess.run. Although it avoids shell=True and includes a small denylist for obviously destructive commands, it still acts as a generic command launcher and the denylist is easy to bypass with equivalent destructive commands or indirect execution paths. In an agent skill context, this is more dangerous because an LLM-driven agent may pass attacker-influenced commands into the wrapper, turning it into a command-execution primitive.

Content

Scanner excerpt · scripts/selfheal.py (reported line 72)May include surrounding context.

python
def run_once(cmd_list, timeout):
    start = time.time()
    try:
        proc = subprocess.run(
            cmd_list,
            cwd=os.getcwd(),
            capture_output=True,

Excessive Permissions

Low
Category
Privilege Escalation
Confidence
80% confidence
Finding

Skill requests more permissions than appear necessary for its stated functionality. Review if elevated access is justified.

Content

Scanner excerpt · scripts/selfheal.py (reported line 9)May include surrounding context.

python
python3 selfheal.py [--max-retries N] [--timeout SECONDS] -- <command> [args...]

This wrapper does NOT silently rewrite your code, install packages, or
escalate privileges. It runs your command, captures the failure, classifies
the likely cause, logs the attempt, and lets you (or the agent) decide the
next concrete action. It refuses to run obviously destructive commands.
"""