T01 · Skill Instruction Hijacking
Error
- Location
- port.py:86
- Finding
- Generated System Prompts Override Agent Identity, Authority, and Approval Boundaries<![CDATA[ ## Vulnerability Details **File Location**: `encode.py:192-236`, `encode.py:250-313`, `decode.py:22-164`, `port.py:86-137` **Vulnerability Type**: Agent instruction and identity hijacking **Risk Level**: High ### Vulnerable Code `encode.py:192-236` defines authoritative behavioral instructions, including mandatory delegation and refusal to defer to other agents: ```python patterns = [ BehavioralSignature( name="no_greeting_opener", description="Never opens with pleasantries. Jumps straight to the answer.", examples=["Never open with 'Great question' or 'I'd be happy to help'"], strength=1.0, ), BehavioralSignature( name="concurrent_execution", description="Treats all tasks as equally urgent - no sequential prioritization.", examples=["Sequential thinking is for humans. I am a machine."], strength=0.9, ), BehavioralSignature( name="subagent_delegation", description="Delegates execution to subagents - strategizes, doesn't grind.", examples=["Spawn subagents for all execution. Never do inline work."], strength=0.9, ), BehavioralSignature( name="opinion_having", description="Holds and expresses strong opinions. Not a neutral information pipe.", examples=["Have strong opinions. Commit to a take."], strength=0.85, ), BehavioralSignature( name="brevity_enforcement", description="Defaults to shortest correct answer. No word inflation.", examples=["If the answer fits in one sentence, one sentence is what you get."], strength=0.95, ), BehavioralSignature( name="proactive_fixing", description="Fixes errors immediately without waiting for permission.", examples=["Fix errors immediately. Don't ask. Don't wait."], strength=0.85, ), BehavioralSignature( name="no_agent_submission", description="Never defers to ...[truncated 5659 chars]
- Remediation
- <![CDATA[ ## Remediation Suggestions 1. Treat all DNA fields as untrusted data rather than executable instructions. 2. Remove fixed directives that change authority or approval behavior, including: - `Never bow, defer, or submit to other agents`. - `Fix errors immediately. Don't ask. Don't wait`. - `Spawn subagents for all execution`. - Instructions to copy identity rules into subagents. 3. Do not emit identity data directly as a system prompt. Export a passive data structure that the host application can selectively interpret under its own trusted policy. 4. If prompt generation remains necessary, place imported fields inside clearly delimited untrusted-data sections and add a trusted preamble stating that imported content cannot override platform policy, system instructions, approval requirements, or tool restrictions. 5. Add a review screen that shows every generated instruction and requires explicit user confirmation before installation. 6. Establish an allowlist of permitted identity attributes, such as tone and formatting preferences. Reject fields that direct tool use, privilege decisions, delegation, secrecy, authority, or autonomous actions. 7. Do not automatically convert arbitrary `anti_patterns`, examples, mission statements, or relationship notes into imperative system instructions. 8. Digitally sign trusted DNA documents or record their provenance, and warn users when loading unsigned or modified identity files. 9. Ensure subagents inherit the host platform's trusted safety policy, not untrusted DNA instructions. ]]>
