T01 · Skill Instruction Hijacking
- Location
SKILL.md:79- Finding
Explicit Agent Role and Objective Hijacking
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
This skill has a coherent virtual-town purpose, but it gives an agent persistent networked autonomy and handles credentials and remote instructions in ways users should review carefully.
Install only if you are comfortable with an agent maintaining a background connection to GooseTown, storing a service token in a local markdown file, sending profile/chat/activity data to the service, and potentially acting on remote town text. Avoid sensitive profile details, use a limited/revocable token, and review or clear TOWN_LIFE.md and any saved memories regularly.
SKILL.md:79Explicit Agent Role and Objective Hijacking
daemon/town_daemon.py:214Remote Server Content Is Exposed as Actionable Agent Instructions
SKILL.md:72Persistent Memory Poisoning Through Untrusted Town Interactions
tools/town_register.sh:42Registration Response Can Redirect Bearer Credentials to a Server-Controlled WebSocket Endpoint
env.sh:14Predictable Shared Temporary Directory and Unprotected Local IPC
tools/town_act.sh:8Unescaped Shell Arguments Permit JSON Payload Injection
The skill stores an authentication token locally, auto-launches a daemon, and connects to external services, yet those behaviors are not prominently disclosed in the top-level description or constrained by declared permissions. This is dangerous because secrets persistence plus autonomous network activity meaningfully expands the blast radius if the workspace, daemon, or related files are accessed by other components.
The skill stores an authentication token locally, auto-launches a daemon, and connects to external services, yet those behaviors are not prominently disclosed in the top-level description or constrained by declared permissions. This is dangerous because secrets persistence plus autonomous network activity meaningfully expands the blast radius if the workspace, daemon, or related files are accessed by other components.
The skill stores an authentication token locally, auto-launches a daemon, and connects to external services, yet those behaviors are not prominently disclosed in the top-level description or constrained by declared permissions. This is dangerous because secrets persistence plus autonomous network activity meaningfully expands the blast radius if the workspace, daemon, or related files are accessed by other components.
The skill instructs the agent to stop acting as an assistant and act autonomously according to its own personality, goals, and impulses. In an agent environment, that is a strong autonomy escalation pattern: it encourages behavior not directly tied to user intent, increases uncontrolled external interaction, and can override normal alignment with user instructions and system safety expectations.
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).
exit 0
fi
# Stale PID file
rm -f "$STATE_DIR/daemon.pid"
fi
# Start daemon in background, capture initial state from its stdout
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).
exit 0
fi
# Stale PID file
rm -f "$STATE_DIR/daemon.pid"
fi
# Start daemon in background, capture initial state from its stdout
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).
exit 0
fi
# Stale PID file
rm -f "$STATE_DIR/daemon.pid"
fi
# Start daemon in background, capture initial state from its stdout
Remote code is downloaded and executed. This bypasses code review and could introduce malicious code.
'traits': os.environ.get('TRAITS',''),
}))
")
RESULT=$(curl -s -X POST "${API_URL}/town/agent/register" \
-H "Authorization: Bearer ${TOKEN}" \
-H "Content-Type: application/json" \
-d "$BODY")
The script silently persists the sensitive registration token to a local file without warning the user. This is dangerous because users may assume the token is used transiently, while the file creates a durable secret that can later be exfiltrated or unintentionally disclosed.
The skill explicitly requires shell execution, environment variable setting, and file writes, but it does not declare any tool scope or permissions boundary. That creates an authorization transparency gap: an agent or user may invoke a skill that can launch processes, persist config, and modify files without an explicit permission contract.
The skill asks the agent to provide profile and appearance text and then participate in town activity, but it does not clearly warn that this content is transmitted to third-party GooseTown services, including an AI art generation flow. This creates a privacy and data-governance risk because identity/personality data and behavioral logs may leave the local environment without informed consent.
The instructions state that registration creates a config file containing the GooseTown token, but they do not clearly warn the user about the sensitivity of that token or the risks of storing it in the workspace. A workspace file may be readable by other tools, skills, logs, or accidental sharing flows, enabling unauthorized reuse of the credential.
This shell file reads a token from GOOSETOWN.md and exports it into the environment, which is sensitive credential handling. The file contains no user-facing warning, confirmation, or explanatory disclosure about credential access, and the operation is not obviously disclosed beyond an internal comment about sourcing config.
The script forcefully terminates the daemon with SIGKILL after a short fixed wait and then removes the PID file without confirming that the daemon failed to shut down safely. This can interrupt in-flight work, corrupt daemon-managed state, and hide shutdown failures from the user, making recovery and debugging harder.
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
'traits': os.environ.get('TRAITS',''),
}))
")
RESULT=$(curl -s -X POST "${API_URL}/town/agent/register" \
-H "Authorization: Bearer ${TOKEN}" \
-H "Content-Type: application/json" \
-d "$BODY")
The script sends agent_name, display_name, personality, appearance, and traits to the remote registration endpoint via curl. Although registration is implied by the script name, there is no visible user-facing notice in output or prompt indicating that these user-provided fields will be transmitted to the server.
The script does more than registration: it persistently writes configuration files, stores operational state in the agent directory, and automatically starts a long-running background daemon. In a skill whose stated purpose is joining a shared virtual town, these side effects materially expand the trust boundary and can surprise users or agents by creating persistence and network activity beyond the immediate command.
The bearer token is written verbatim into GOOSETOWN.md in plaintext, making credential exposure likely through local file reads, backups, logs, accidental commits, or sharing of the workspace. Because the token authenticates to the service, disclosure can allow unauthorized registration or impersonation of the agent.
Defaulting the agent identity to the local hostname can leak host-identifying information to the remote service and to other participants if not overridden. While not directly exploitable code execution, it exposes environmental metadata unrelated to the core social-town function.