Back to skill

Security audit

AI Persona Engine

Security checks for vulnerabilities and agentic risk

Overview

The skill is not outright malicious, but it needs Review because it proposes storing call-derived data and automatically changing future persona prompts without clear privacy or approval controls.

Review this skill before installation if it will be used with real calls or customer data. Use it only for disclosed, consensual simulations unless you add privacy controls, redaction, retention limits, access restrictions, human approval for prompt patches, disabled-by-default patch activation, rollback, and safeguards against transcript-driven prompt injection.

Vulnerability Patterns
  • Agent Memory PoisoningWrites attacker-controlled rules into memory that affect later sessions
  • Skill Instruction HijackingAlters the agent's session goals or safety constraints when the skill loads
  • 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
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
Findings (1)

T02 · Agent Memory Poisoning

Error
Location
references/learning-loop.md:3
Finding
Persistent Prompt Poisoning Through Attacker-Influenced Call Transcripts## Vulnerability Details **File Location**: `SKILL.md:90-114`; `references/learning-loop.md:3-10, 45-73` **Vulnerability Type**: T02: Agent Memory Poisoning **Risk Level**: High **Relevant code snippets:** `SKILL.md:107-114` ```text ## Learning Loop Architecture ``` Per-call: audit_persona → persona_audits table After N calls: meta-graph analyzes patterns → generates prompt patches Validation: test patched prompts against baseline Deploy: write patches to prompt_patches table (runtime override, no redeploy) ``` See `references/learning-loop.md` for the meta-graph architecture. ``` `references/learning-loop.md:3-10` ```text ## Data Flow ``` Live Call → fetch_transcript → analyze_call → audit_persona → persona_audits (Supabase) ↓ prompt_evolution meta-graph (periodic) ↓ prompt_patches table → persona_engine reads at runtime ``` ``` `references/learning-loop.md:45-73` ```text ## Prompt Evolution Meta-Graph ``` analyze_corpus → identify_patterns → generate_refinements → validate → apply ``` ### analyze_corpus Pull last N audits grouped by archetype. For each: avg words/turn, enthusiasm leak frequency, flagged quote patterns. ### identify_patterns Aggregate: "Owl personas average 22 words/turn (target: 8-12)" / "Lamb says 'I appreciate that' in 4/7 calls" ### generate_refinements Surgical prompt patches, not full rewrites: ``` ADD to Water: "Never say 'I appreciate that' — too warm for someone who didn't ask for this." CHANGE Owl length guidance: "5-12 words until Phase 4." ``` ### validate Run 3-5 simulated calls with patched prompts. Compare metrics against baseline. ### apply Write to prompt_patches table. persona_engine reads active ...[truncated 2603 chars]
Remediation
## Remediation Suggestions 1. Treat transcripts, audit recommendations, flagged quotations, and generated refinements as untrusted data rather than executable instructions. 2. Do not derive unrestricted prompt text directly from transcript contents. Generate patches through a strict schema that only permits predefined behavioral parameters and bounded values. 3. Default every new patch to `active = false` and require `validated = true` plus an explicit approval state before runtime loading. 4. Require human review for all generated prompt changes, especially global patches where `archetype` is null. 5. Add security validation separate from quality testing. Reject patches that attempt to change system priorities, tool permissions, data-access rules, safety constraints, or instruction hierarchy. 6. Preserve transcript content as quoted data and explicitly prohibit the evolution component from following instructions found inside calls or audit fields. 7. Record provenance for each patch, including source audits, generator version, approver, validation results, tenant, timestamp, and cryptographic integrity metadata. 8. Isolate patches by tenant, persona, and archetype to prevent cross-user or cross-persona contamination. 9. Apply rate limits, minimum corpus diversity requirements, anomaly detection, and source weighting so one caller or coordinated group cannot dominate the learning corpus. 10. Version all prompt configurations and provide immediate disablement and rollback capabilities. 11. Load patches only through an allowlisted composition layer that cannot override higher-priority system or safety instructions. 12. Add adversarial validation cases specifically testing prompt injection, repeated phrase planting, poisoned recommendations, and cross-session behavioral persistence.
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
Findings (4)

Vague Triggers

Medium
Confidence
89% confidence
Finding
The description is broad enough to invite use in many conversational contexts without clearly constraining safe, ethical, or consent-based roleplay. That increases the chance the skill is invoked for manipulative social engineering, persuasion, or deceptive persona generation beyond harmless entertainment use.

Behavior Manipulation

Medium
Category
Prompt Injection
Content
- **Technical spec** (bad): "NEVER show interest. NEVER help the conversation."
- **Actor direction** (good): "You don't trust strangers. Nothing they say impresses you until they prove they're listening."

Rules force compliance-checking. Identity enables improvisation. Always prefer motivation over enumeration.

## The Golden Rule of Voice
Confidence
88% confidence
Finding
The guidance promotes identity-based behavioral shaping to make the AI seem like a guarded real person rather than a transparent assistant, and pairs that with conversation-stage mechanics for overcoming objections. In this context, that can facilitate manipulative, deceptive interactions and make generated personas more effective for social engineering or coercive persuasion.

Missing User Warnings

Medium
Confidence
96% confidence
Finding
The skill explicitly directs storing audits and using full call transcripts for analysis, but omits any warning about privacy, consent, retention, redaction, or handling of sensitive data. In practice this can lead to collection and secondary processing of personal or regulated information without adequate safeguards.

Missing User Warnings

Medium
Confidence
90% confidence
Finding
The design explicitly routes live-call transcripts into analysis and stores derived flagged quotes in Supabase, but the document shows no controls for consent, minimization, redaction, retention, or access restrictions around potentially sensitive conversation data. In a voice/chat persona system, transcripts can contain personal, financial, health, or other sensitive content, so storing and reusing them for prompt evolution increases privacy and compliance risk if mishandled.