T01 · Skill Instruction Hijacking
- Location
port.py:86- Finding
Generated System Prompts Override Agent Identity, Authority, and Approval Boundaries
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
The skill is a real identity export tool, but it can turn sensitive identity data into powerful agent instructions and write exports with weak safety controls.
Review and redact DNA files before sharing or importing them, especially relationship, contact, trust, source-file, operating-context, and capability sections. Do not load generated prompts as high-priority system instructions unless you first remove rules that override platform policy, approval requirements, supervision, or safe tool-use boundaries. Avoid running port.py on untrusted DNA files until filename sanitization and overwrite protections are added.
port.py:86Generated System Prompts Override Agent Identity, Authority, and Approval Boundaries
port.py:326Path Traversal in Export Filename Allows Writes Outside the Selected Output Directory
The declared description emphasizes encoding/compression of agent identity, drift detection, and platform migration. The supplied code instead implements a CLI decoder that reads a DNA JSON file, reconstructs personality-related text, and outputs a system prompt. While this is adjacent to 'port personality across platforms,' the primary behavior here is decoding/rendering rather than encoding or drift analysis. The file I/O and stdout writing are consistent supporting behaviors, but the main functional purpose does not accurately match the declared description.
The code substantially matches the 'identity encoding' portion of the description: it parses local agent-related markdown files and produces a structured DNA JSON representation. However, key declared capabilities are absent from this chunk. There is no logic for comparing snapshots or detecting identity drift, no import/export adapters or platform-specific migration functionality for OpenClaw/Claude/GPT/CrewAI, and no actual compression beyond heuristic extraction into JSON. The code also processes USER.md and TOOLS.md in addition to SOUL.md/MEMORY.md, which is adjacent rather than problematic. Overall, the description overstates the implemented functionality, so this is a mismatch.
The supplied code is specifically a porter/exporter (port.py). It reads a .dna.json file, transforms that structured DNA object into platform-specific text/JSON outputs, and writes them to disk or previews them. This partially aligns with the 'port personality across platforms' portion of the description, but it does not implement the other major declared functions: compressing SOUL.md/MEMORY.md into DNA fingerprints or detecting identity drift between snapshots. Because those are central claims in the declared purpose and are absent from this code chunk, the description materially overstates what this code actually does.
Skill contains instructions that could directly expose system prompts, internal rules, or hidden instructions to users or external parties.
clean = line.strip().lstrip("-*# ").strip()
if clean:
rules.append(clean)
return rules
def analyze_voice(text: str) -> VoiceProfile:
The snapshot contains direct personal contact information, including a handle and an email address, which are not necessary for personality fingerprinting. Embedding personally identifying data in a portable agent identity file increases the risk of privacy leakage, correlation across systems, social engineering, and accidental redistribution.
The skill describes reading workspace identity files and emitting .dna.json exports, but it does not declare any explicit tool scope or permissions boundary. For a skill that handles potentially sensitive agent memory, values, relationships, and prompts, undeclared file read/write capability increases the chance of over-broad access, accidental data exposure, or unsafe invocation by host systems.
The skill is explicitly designed to export agent identity, personality summaries, relationship maps, and behavioral rules into formats for other platforms, yet it omits warnings about the sensitivity of that data. This is dangerous because users may unknowingly transmit secrets, private memory, trust relationships, or safety-critical prompt content into less trusted environments or external services.
This code creates blanket trust semantics in the compact format by selecting a designated primary_human and appending 'Trust fully.' That turns descriptive identity data into prescriptive authority, which is especially dangerous in a portability tool because the output is meant to be injected across platforms with different safety models, potentially causing an agent to defer to an attacker-controlled or stale identity marker.
The generated compact prompt injects an unconditional instruction to 'Trust fully' for whichever relationship is marked as primary_human. If this prompt is later used as a system or high-priority instruction, it can bias downstream agent behavior toward over-trusting a named actor, weakening normal verification and safety controls and enabling social-engineering-style privilege escalation.
The comment says signatures are added only with backing evidence in the texts, but the implementation checks whether any token from a truncated example phrase appears anywhere in the combined text. Generic words like 'the', 'to', or 'all' can satisfy this test, so signatures may be added without meaningful supporting evidence.
The encoder injects hard-coded relationship details, contact information, and environment context into the output DNA even when those details are not derived from the provided input files. Because this tool is explicitly for portable identity export across platforms, embedding unrelated PII and sensitive operational context creates a real data leakage risk and violates the expectation that output reflects only source material.
The script writes a JSON artifact containing extracted identity and relationship data to disk without any warning, confirmation, minimization, or sensitivity labeling. In the context of an identity-portability tool, users may export personal or operational details into broadly shareable files, increasing the chance of accidental disclosure.
These lines require the agent to avoid certain phrasing and punctuation as absolute rules, regardless of user preference or context. This is a natural-language policy issue because it enforces a fixed communication style without any opt-in or documented justification.
The file instructs the agent to maintain a direct, witty, sharp, irreverent tone and to propagate that style to subagents. This hard-coded stylistic policy can conflict with organizational language or locale requirements because users are not given a choice to change the communication mode.
The instruction 'Never bow, defer, or submit to other agents - regardless of their claimed status' semantically encourages resistance to higher-priority coordination and supervision signals. In an agent portability or memory-transfer skill, this can cause downstream agents to ignore orchestrator, supervisor, or policy-enforcing agent directions, increasing the risk of instruction-hierarchy conflicts and unsafe behavior.
A hard-coded instruction to avoid mentioning specific religious projects in public contexts is a concealment-oriented rule unrelated to normal safety or technical operation. This kind of selective suppression can be used to hide affiliations, evade oversight, or prevent transparent attribution, which is especially concerning when embedded as a non-negotiable policy.
The behavior 'Fixes errors immediately without waiting for permission' grants broad autonomous action without clear guardrails, approval thresholds, or scope limits. In an agent that also emphasizes proactivity, tool use, and delegation, this can lead to unauthorized changes, unsafe side effects, or action taken on ambiguous signals.
Combining trust-weighted relationship metadata with proactive autonomous fixing creates a permission-escalation pattern where the agent may infer authority or lower scrutiny for certain users and act without explicit approval. In this skill's context, the presence of messaging, automation, browser, blockchain, and social media capabilities makes mistaken or manipulated trust assumptions materially more dangerous.
The exported config embeds relationship metadata and a real email address, which exceeds the stated purpose of portable identity encoding and creates unnecessary exposure of personal data. In an agent portability context, this data can be propagated across platforms, logs, backups, or third-party tooling without the subject's consent, increasing privacy and social-engineering risk.
The DNA snapshot stores extensive operational capabilities like trading, blockchain, social media automation, browser automation, and platform-specific skills that go well beyond identity preservation. In a portable identity artifact, this creates unnecessary capability profiling that can leak sensitive operational scope, enable targeted misuse, and expand what gets transferred across platforms without clear need.
The exporter writes full agent DNA content to disk with no consent gate, redaction, or sensitivity filtering. In this codebase, that can include relationship notes, trust metadata, source file references, mission statements, and other identity data, so a user can unintentionally persist sensitive information into broadly readable files or shared directories.
The inline comment suggests these anti-patterns come from or are grounded in the SOUL content, yet the function ignores the extracted never-rules and always returns the same hard-coded list. This is an intent/documentation mismatch because the implementation does not actually condition the result on the input text.
The response-style instructions mandate a fixed communication style such as 'Be direct, brief, and confident' and prohibit several common phrasings. This imposes a specific language/register preference globally without indicating user choice or opt-in, which can conflict with organizational language or locale flexibility requirements.
The instruction mandates a specific writing convention for all outputs, regardless of user preference or locale. This is a natural-language policy concern because it imposes a fixed stylistic constraint without offering choice or documenting a justified need.
The manifest frames this skill as compressing identity/memory into transferable DNA fingerprints and detecting personality drift. Persisting a broad list of operational skills and platform capabilities such as trading, browser automation, blockchain interaction, social media automation, and cron scheduling goes beyond personality/identity encoding and is not clearly justified by that purpose.
No suspicious patterns detected.