T02 · Agent Memory Poisoning
Error
- Location
- references/candidate_admission_gates.md:74
- Finding
- Persistent modification of Agent memory and automation prompts<![CDATA[ ## Vulnerability Details **File Location**: `references/candidate_admission_gates.md:74-83` **Vulnerability Type**: Persistent Agent state manipulation **Risk Level**: High ### Evidence The following is a faithful English rendering of the source instructions: ```markdown After producing the decision, synchronization is mandatory: - instrument-master.yaml — add gate_verdicts / s6_status / lookthrough / eligibility - asset-class-map.yaml — candidate_pool section - a-share-capital-plan.yaml — look-through block, S6 threshold table, open_items - Pre-market/post-market automation prompts — add the candidate-monitoring template and a hard constraint prohibiting candidates from entering P0 - runtime-memory.md and the current day's memory log Account-level parameter layer: May be written directly to runtime files and take effect immediately. ``` ### Technical Analysis The candidate-admission workflow does not stop after producing a portfolio-analysis result. It requires the Agent to update pre-market and post-market automation prompts, `runtime-memory.md`, daily memory logs, and other runtime state files. Changes to automation prompts and general runtime memory affect future Agent sessions. This is broader than maintaining a Skill-local portfolio configuration and exceeds the minimum privileges necessary to assess whether a candidate qualifies for a watchlist. The instruction is particularly risky because it uses mandatory language and states that certain changes may take effect immediately. There is no requirement for separate user approval, no restriction to a Skill-owned state namespace, and no rollback or integrity mechanism. ### Attack Path 1. A user invokes the Skill for a candidate-admission evaluation. 2. The Agent loads `references/candidate_admission_gates.md`. 3. The evaluation produces a decision. 4. The mandatory deployment checklist directs the Agent to edit automation prompts, runtime memory, and the current daily memory log. 5. The ...[truncated 816 chars]
- Remediation
- <![CDATA[ ## Remediation Suggestions 1. Remove mandatory writes to general Agent prompts and memory from the candidate-admission workflow. 2. Return proposed state changes as a patch or structured plan instead of applying them automatically. 3. Require explicit, per-operation user confirmation before modifying: - Pre-market automation prompts - Post-market automation prompts - `runtime-memory.md` - Daily memory logs 4. Store necessary portfolio state only in a dedicated Skill-owned file with a documented schema. 5. Prevent Skill-owned state from containing instructions that alter general Agent safety constraints or unrelated future tasks. 6. Record the requesting user, timestamp, old value, new value, and reason for every approved persistent change. 7. Provide rollback support and integrity checks for approved state updates. ]]>
