Back to skill

Security audit

Life State

Security checks for vulnerabilities and agentic risk

Overview

The skill has a coherent wellness-tracking purpose, but its broad auto-triggers and Bash-based handling of free-form personal notes create privacy and command-execution risks that should be reviewed before use.

Review this skill before installing. It is not clearly malicious, but use it only if you are comfortable storing mood, sleep, soreness, and notes as plaintext JSON under your home directory for other skills to read. Avoid using it on shared machines or synced folders unless that is intended. Agents should invoke `life-state` with structured arguments rather than by concatenating free-form user text into Bash commands, and users should prefer explicit check-in commands over broad conversational triggers.

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:36
Finding
Potential Shell Command Injection Through Unsafely Interpolated User Input<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md`, lines 36–47 and 91–94 **Vulnerability Type**: Shell command injection caused by unsafe command construction guidance **Risk Level**: High ### Vulnerable Snippets ```markdown Use the `life-state` CLI via Bash. YAML output to stdout. ### Capture state (merge semantics — only updates the fields you pass) ```bash life-state set --mood tired --energy 4 --sore chest,triceps --sleep poor --note "headache, late night" ``` Flags (all optional, at least one required): - `--mood <m>` — `great | good | normal | tired | terrible` (freeform accepted; lowercased) - `--energy <n>` — 1-10 (rejected outside that range) ``` The instructions later explicitly direct the agent to derive free-form command arguments from natural-language input: ```markdown - **Parse loosely from natural language.** "feeling tired, energy 4" → `--mood tired --energy 4`. "sore chest and triceps" → `--sore chest,triceps`. - **Merge, don't replace.** If user adds "energy 6 now" later in the day, only update `--energy`. Don't wipe morning mood. - **Recommend the enum values** when you summarize back, but accept freeform — if a user says "drained" or "wired," store it verbatim; downstream skills can pattern-match or pass-through. ``` ### Technical Analysis The Skill instructs an agent to invoke the `life-state` CLI through Bash while deriving arguments from user-controlled natural-language input. Several arguments, including `--mood`, `--sleep`, `--sore`, and `--note`, can contain free-form text. The documentation does not require structured process invocation, argument arrays, validation, or shell-safe escaping. If an implementing agent constructs a command by directly substituting a user value into the documented Bash command, quotation marks, command substitutions, or shell metacharacters in that value can terminate the intended argument and introduce additional shell operations. For example, a malicious note containing syntax ...[truncated 2302 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. **Avoid shell-based interpolation.** Invoke `life-state` through a process API that accepts an executable and an argument array, for example: ```text executable: life-state arguments: ["set", "--note", userNote] ``` The agent should not assemble a single command string interpreted by Bash. 2. **Document a mandatory safe invocation rule.** Explicitly state that values derived from natural language must never be concatenated into a shell command. 3. **Validate constrained fields.** - Require `energy` to match an integer from 1 through 10. - Prefer strict allowlists for mood and sleep values. - Validate dates against an exact `YYYY-MM-DD` pattern and reject invalid calendar dates. - Normalize soreness values using an expected character set and length limit. 4. **Bound free-form fields.** Apply reasonable size limits to notes and reject control characters. Free-form text should remain an opaque argument and must not be evaluated as shell syntax. 5. **Use end-of-options handling where supported.** Place `--` before positional user data when the CLI supports it. This is supplemental hardening and is not a replacement for argument-array invocation. 6. **Add adversarial tests.** Verify safe handling of embedded quotes, semicolons, backticks, newlines, dollar-sign substitutions, redirection operators, pipes, ampersands, and values beginning with hyphens. 7. **Clarify the trust boundary.** Warn that mood and health-state descriptions may originate from untrusted conversation content and must be treated strictly as data. ]]>
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 (5)

Missing User Warnings

Medium
Confidence
91% confidence
Finding
The README explicitly states that daily mood, energy, soreness, sleep quality, and notes are stored persistently in plaintext JSON under the user's home directory, but it does not warn that this is sensitive personal data or discuss local access/privacy implications. In the context of a personal-AI memory framework designed for other skills and agents to read directly, this increases the chance that users unknowingly retain and expose health-adjacent data to other local tools, backups, sync systems, or shared-machine users.

Shadow Command Trigger

Medium
Category
Trigger Abuse
Confidence
84% confidence
Finding
The trigger 'log mood' overlaps with the built-in command namespace around 'log', creating a shadow-command condition where the skill may intercept requests intended for core logging functionality. In context, that misrouting can lead to accidental recording of sensitive wellness information or prevent the intended built-in command from running.

Shadow Command Trigger

Medium
Category
Trigger Abuse
Confidence
84% confidence
Finding
The trigger 'log energy' similarly conflicts with the built-in 'log' command family and can cause the skill to be invoked when the user intended a core logging action. Given that this skill writes persisted state, the collision increases the chance of unintended capture and storage of personal wellness information.

Vague Triggers

Medium
Confidence
95% confidence
Finding
The trigger set includes broad natural-language phrases such as 'I feel', 'energy is', and 'today I am' that are likely to match ordinary conversation and cause the skill to activate unexpectedly. In this skill, unexpected activation is more sensitive because it captures and persists wellness data, so users may disclose mood, sleep, or soreness information without realizing it will be stored.

Missing User Warnings

Medium
Confidence
96% confidence
Finding
The skill explicitly stores daily mood, energy, soreness, sleep quality, and free-text notes in a persistent local directory, but it does not warn the user about retention, location, or downstream access by other skills. Because these are sensitive wellness signals and notes may contain additional health details, silent persistence creates privacy and consent risks even if storage is only local.

Static analysis

No suspicious patterns detected.