Back to skill

Security audit

Context Persistence

Security checks for vulnerabilities and agentic risk

Overview

This skill is a disclosed guide for using workspace files to preserve agent context across sessions, with manageable privacy and storage considerations.

Install only in workspaces where you want agents to keep persistent notes. Review what gets written to MEMORY.md and memory/ files, avoid storing secrets or sensitive personal data unnecessarily, and consider adding practical size and retention limits for daily logs.

Vulnerability Patterns
  • Skill Instruction HijackingAlters the agent's session goals or safety constraints when the skill loads
  • Agent Memory PoisoningWrites attacker-controlled rules into memory that affect later sessions
  • 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
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Output HandlingUnvalidated Output Injection, Cross-Context Output, Unbounded Output
  • 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
Findings (4)

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The embedded payload examples instruct the agent entirely in Chinese (e.g. '你是日报推送 agent' and subsequent rules) without indicating that language selection is optional or user-driven. This is a natural-language policy concern because it hard-codes a locale/language choice rather than offering user choice or documenting a justified region-specific constraint.

Content

No source excerpt is available for this finding.

Unbounded Output

Medium
Category
Output Handling
Confidence
84% confidence
Finding

Stating that the daily log has 'No size limit' creates an unbounded storage/output pattern in a context-persistence skill whose purpose is to accumulate cross-session state. Over time this can cause prompt bloat, excessive token consumption, degraded performance, and possible accidental inclusion of stale or sensitive data when sessions load recent logs.

Content

Scanner excerpt · references/memory-patterns.md (reported line 60)May include surrounding context.

Daily Log Structure (memory/YYYY-MM-DD.md)

Raw chronological notes. No size limit.

markdown
# 2026-03-17 Daily Notes

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
96% confidence
Finding

The cross-reference examples at L140-L142 use Chinese text in a file that is otherwise written in English. This introduces a language-specific instruction/example without user opt-in or documented locale justification, which matches the language/locale policy violation criteria.

Content

No source excerpt is available for this finding.

Vague Triggers

Low
Category
Not specified by scanner
Confidence
83% confidence
Finding

This markdown file describes applicability in broad terms such as tasks that 'have many items to process' or 'span multiple sessions' without defining explicit boundaries or exclusion cases. In a skill-selection context, these generic conditions could overlap with many ordinary workflows and lead to unintended invocation.

Content

No source excerpt is available for this finding.