Back to skill

Security audit

Lobster Continuous Learning V2

Security checks for vulnerabilities and agentic risk

Overview

This is a local learning tool, but it broadly records Claude activity and can run a background writer that creates persistent instructions, so it needs Review before installation.

Install only if you are comfortable with local logging of Claude prompts, tool inputs, tool outputs, file paths, command output, project roots, and git remotes under ~/.claude/homunculus. Keep the observer disabled unless you have reviewed the logs and generated instincts, avoid using it in highly sensitive repositories, do not import instincts from untrusted URLs, and periodically delete observations, archives, generated artifacts, and global hooks you no longer want.

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
  • Insecure Skill Coding PracticesFinds exploitable flaws such as hardcoded secrets or command injection
  • 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 (4)

T01 · Skill Instruction Hijacking

Error
Location
agents/observer-loop.sh:114
Finding

Indirect Prompt Injection Against a Write-Capable Background Agent

Content
View full analysis
Remediation
View remediation

T02 · Agent Memory Poisoning

Error
Location
scripts/instinct-cli.py:1139
Finding

Persistent Agent Memory and Generated-Skill Poisoning Through Untrusted Instinct Content

Content
View full analysis
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Error
Location
hooks/observe.sh:171
Finding

Broad Tool Input and Output Logging With Incomplete Secret Redaction

Content
View full analysis
> "$OBSERVATIONS_FILE" ``` `hooks/observe.sh:255-284`: ```python observation = { "timestamp": os.environ["TIMESTAMP"], "event": parsed["event"], "tool": parsed["tool"], "session": parsed["session"], "project_id": os.environ.get("PROJECT_ID_ENV", "global"), "project_name": os.environ.get("PROJECT_NAME_ENV ...[truncated 3233 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/instinct-cli.py:514
Finding

Arbitrary URL Import Allows Server-Side Request Forgery and Unbounded Response Reads

Content
View full analysis
Remediation
View remediation
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • 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
  • Rogue AgentSelf-Modification, Session Persistence
Findings (36)

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

The declared description is about a learning/observation system that derives instincts and evolves them into higher-level artifacts, with project scoping as a data-isolation feature. The supplied code does not implement learning, hooks processing, confidence scoring, instinct creation, or evolution into skills/commands/agents. Instead, it is an operational guard script whose purpose is to prevent or delay observer session spawning based on time windows, recent runs for the same project, and user inactivity. While the per-project cooldown loosely relates to project scoping, it is not the declared project-scoped instinct functionality. This is therefore a material description-behavior mismatch.

Content

No source excerpt is available for this finding.

Agent Config Directory Access

High
Category
Agent Snooping
Confidence
90% confidence
Finding

The skill instructs modification of ~/.claude/settings.json, a sensitive agent configuration file that controls hooks and runtime behavior. Directing users to alter a global config expands the skill's influence beyond a single project and can enable persistent monitoring or future command execution across all sessions if misconfigured or abused.

Content

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

md
### 1. Enable Observation Hooks

Add to your `~/.claude/settings.json`.

**If installed as a plugin** (recommended):

Chaining Abuse

High
Category
Tool Misuse
Confidence
75% confidence
Finding

Tool calls are chained to bypass individual safety checks or escalate capabilities beyond what any single tool call would allow.

Content

Scanner excerpt · agents/observer-loop.sh (reported line 188)May include surrounding context.

sh
# Ensure CWD is PROJECT_DIR so the relative analysis_relpath resolves correctly
  # on all platforms, not just when the observer happens to be launched from the project root.
  cd "$PROJECT_DIR" || { echo "[$(date)] Failed to cd to PROJECT_DIR ($PROJECT_DIR), skipping analysis" >> "$LOG_FILE"; rm -f "$prompt_file" "$analysis_file"; return; }

  # Prevent observe.sh from recording this automated Haiku session as observations.
  # Pass prompt via -p flag instead of stdin redirect for Windows compatibility (#842).

Agent Config Directory Access

High
Category
Agent Snooping
Confidence
90% confidence
Finding

Skill reads from agent configuration directories (.claude/, .codex/, .gemini/). These directories may contain API keys, personal settings, and other credentials that the skill has no legitimate need to access.

Content

Scanner excerpt · hooks/observe.sh (reported line 11)May include surrounding context.

sh
#       and writes observations to project-specific directory.
#
# Registered via plugin hooks/hooks.json (auto-loaded when plugin is enabled).
# Can also be registered manually in ~/.claude/settings.json.

set -e

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · scripts/test_parse_instinct.py (reported line 290)May include surrounding context.

python
def test_validate_rejects_etc():
    with pytest.raises(ValueError, match="system directory"):
        _validate_file_path("/etc/passwd")


def test_validate_rejects_var_log():

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
91% confidence
Finding

The skill describes capabilities that involve shell execution, environment access, file reads/writes, and network-adjacent behavior, but it does not declare an explicit tool scope or permission boundary. In a learning/automation skill that installs hooks and writes persistent data, missing least-privilege constraints increases the chance of overbroad execution and misuse beyond the stated purpose.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The skill instructs users to enable hooks that observe prompts and tool activity, but it does not present a prominent, explicit warning that sensitive prompts, commands, file paths, and workflow metadata may be captured and stored. Silent or underemphasized telemetry in a local automation skill can lead users to expose secrets or confidential project data unintentionally.

Content

No source excerpt is available for this finding.

Ssd 3

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The hook configuration is explicitly framed as capturing prompts and tool usage from every session/tool call, which creates comprehensive retention of user interaction data. Even if stored locally, this broad collection can include credentials, proprietary code context, or sensitive operational details that become a privacy and security liability if the local store is accessed or later exported.

Content

No source excerpt is available for this finding.

Session Persistence

Medium
Category
Rogue Agent
Confidence
88% confidence
Finding

The skill derives a portable project identifier from git remote URLs and stores project metadata in a persistent registry, enabling linkage of activity across machines and over time. Even without raw code export, persistent cross-session identifiers can reveal repository relationships, work patterns, and private infrastructure details if the local state is accessed.

Content

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

md
The system automatically detects your current project:

1. **`CLAUDE_PROJECT_DIR` env var** (highest priority)
2. **`git remote get-url origin`** -- hashed to create a portable project ID (same repo on different machines gets the same ID)
3. **`git rev-parse --show-toplevel`** -- fallback using repo path (machine-specific)
4. **Global fallback** -- if no project is detected, instincts go to global scope

Autonomous Decision Making

Medium
Category
Excessive Agency
Confidence
85% confidence
Finding

Skill enables autonomous high-impact decisions without human-in-the-loop verification. Critical operations (destructive commands, financial transactions, data deletion) should require explicit user confirmation.

Content

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

md
|-------|---------|----------|
| 0.3 | Tentative | Suggested but not enforced |
| 0.5 | Moderate | Applied when relevant |
| 0.7 | Strong | Auto-approved for application |
| 0.9 | Near-certain | Core behavior |

**Confidence increases** when:

Ssd 3

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The skill emphasizes exhaustive observation and claims hooks fire on every tool call, encouraging persistent accumulation of detailed behavioral data over time. Persistent session-level logging materially increases exposure if the storage directory is compromised, backed up insecurely, or used to derive unintended inferences about the user's work.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The manifest describes an instinct-based learning system that observes sessions, creates instincts, and evolves them into higher-level artifacts. In this file, the skill explicitly instructs the Claude subprocess to use the Write tool to create or update instinct files without confirmation, making it an autonomous file-writing agent rather than merely an observer/analyzer.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The script explicitly instructs the model to write or update files without asking for permission and grants it the Write tool. Because the model’s output is driven by observed session data, prompt injection or malformed observations could cause unintended file creation or modification inside the project, especially if INSTINCTS_DIR is misconfigured or existing files are incorrectly identified as similar.

Content

No source excerpt is available for this finding.

Session Persistence

Medium
Category
Rogue Agent
Confidence
82% confidence
Finding

This agent persistently analyzes and derives instincts from session observations stored on disk, including tool inputs/outputs and project metadata. Even though the file includes some privacy guidance and project scoping, the persistence and mining of cross-session behavioral data creates a real security and privacy risk: sensitive commands, file paths, secrets in tool output, or user habits may be retained and transformed into reusable artifacts that could later influence behavior or leak information across contexts.

Content

Scanner excerpt · agents/observer.md (reported line 3)May include surrounding context.

md
---
name: observer
description: Background agent that analyzes session observations to detect patterns and create instincts. Uses Haiku for cost-efficiency. v2.1 adds project-scoped instincts.
model: haiku
---

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The example global instinct uses the trigger "when modifying code," which is extremely broad and could match a large fraction of ordinary coding activity. Although the document advises being specific elsewhere, this concrete example demonstrates an ambiguous trigger scope without exclusions or negative examples, increasing the risk of unintended invocation.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The script starts a persistent background observer and creates project-scoped log, PID, observation, and instincts files under the user's home/project directories, but does not present an explicit consent notice at launch about what data will be stored. In a continuous-learning skill that observes sessions, silent persistence increases privacy and transparency risk because potentially sensitive project activity may be captured and retained without the user's informed awareness.

Content

No source excerpt is available for this finding.

Session Persistence

Medium
Category
Rogue Agent
Confidence
91% confidence
Finding

Using nohup launches the observer as a detached background process that persists beyond the initiating session, enabling ongoing collection and analysis without continuous user visibility. In this skill's context, that persistence is more sensitive because the process monitors project activity and writes observation artifacts over time, which can surprise users and expand the window for unintended data collection.

Content

Scanner excerpt · agents/start-observer.sh (reported line 199)May include surrounding context.

sh
touch "$LOG_FILE"
    start_line=$(wc -l < "$LOG_FILE" 2>/dev/null || echo 0)

    nohup env \
      CONFIG_DIR="$CONFIG_DIR" \
      PID_FILE="$PID_FILE" \
      LOG_FILE="$LOG_FILE" \

Ssd 3

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The script persistently stores tool inputs and outputs into project logs, including session metadata and cwd, and only applies pattern-based secret scrubbing. This creates a real risk of retaining sensitive prompts, code, tokens, proprietary data, or personal information that the regex misses, especially because logging occurs automatically on every tool event.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The hook is documented as an observation component, but it also performs side effects by starting and signaling a background observer process. In a hook that runs automatically on tool events, this expands the trust boundary and creates persistence/process-control behavior beyond passive logging, which can surprise users and increase abuse potential if the observer chain is compromised.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

This hook has process-control capability: it checks PID files, validates liveness, launches a detached process with nohup, and sends signals. For an auto-executed session hook, that is more authority than needed for mere telemetry and increases the blast radius if configuration, PID files, or the launched script are tampered with.

Content

No source excerpt is available for this finding.

Session Persistence

Medium
Category
Rogue Agent
Confidence
91% confidence
Finding

The use of nohup to launch start-observer.sh in the background establishes persistence beyond the immediate session and is triggered from an automatic hook. Even though it appears intended for convenience, detached background execution from passive hooks can enable stealthy long-lived behavior and makes review, user awareness, and shutdown harder.

Content

Scanner excerpt · hooks/observe.sh (reported line 351)May include surrounding context.

sh
_CHECK_OBSERVER_RUNNING "${PROJECT_DIR}/.observer.pid" || true
        _CHECK_OBSERVER_RUNNING "${CONFIG_DIR}/.observer.pid" || true
        if [ ! -f "${PROJECT_DIR}/.observer.pid" ] && [ ! -f "${CONFIG_DIR}/.observer.pid" ]; then
          nohup "${SKILL_ROOT}/agents/start-observer.sh" start >/dev/null 2>&1 &
        fi
      ) 9>"$LAZY_START_LOCK"
    else

Session Persistence

Medium
Category
Rogue Agent
Confidence
91% confidence
Finding

This is a second code path that also launches the observer with nohup under a different lock fallback. Multiple fallback paths do not reduce the risk; they preserve persistent auto-start behavior across environments, increasing the chance of unintended long-running execution.

Content

Scanner excerpt · hooks/observe.sh (reported line 364)May include surrounding context.

sh
_CHECK_OBSERVER_RUNNING "${PROJECT_DIR}/.observer.pid" || true
          _CHECK_OBSERVER_RUNNING "${CONFIG_DIR}/.observer.pid" || true
          if [ ! -f "${PROJECT_DIR}/.observer.pid" ] && [ ! -f "${CONFIG_DIR}/.observer.pid" ]; then
            nohup "${SKILL_ROOT}/agents/start-observer.sh" start >/dev/null 2>&1 &
          fi
          rm -f "$LAZY_START_LOCK" 2>/dev/null || true
        )

Session Persistence

Medium
Category
Rogue Agent
Confidence
91% confidence
Finding

This fallback branch likewise spawns a detached observer process, preserving persistence even when flock/lockfile are unavailable. Because the hook is auto-triggered, the persistence behavior is environment-independent and therefore more dangerous than a single optional code path.

Content

Scanner excerpt · hooks/observe.sh (reported line 376)May include surrounding context.

sh
_CHECK_OBSERVER_RUNNING "${PROJECT_DIR}/.observer.pid" || true
          _CHECK_OBSERVER_RUNNING "${CONFIG_DIR}/.observer.pid" || true
          if [ ! -f "${PROJECT_DIR}/.observer.pid" ] && [ ! -f "${CONFIG_DIR}/.observer.pid" ]; then
            nohup "${SKILL_ROOT}/agents/start-observer.sh" start >/dev/null 2>&1 &
          fi
        )
      fi

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

python
# 2. git repo root
    if not project_root:
        try:
            result = subprocess.run(
                ["git", "rev-parse", "--show-toplevel"],
                capture_output=True, text=True, timeout=5
            )

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The CLI persists project roots and git remote URLs for all observed projects in a central registry, which can expose sensitive internal repository names, filesystem layouts, and organization metadata. In multi-project or enterprise environments, this broadens data collection beyond what is necessary for local instinct management and creates a privacy and reconnaissance surface.

Content

No source excerpt is available for this finding.