T09 · Insecure Skill Coding Practices
- Location
references/state-schema.md:3- Finding
Persistent Agent Memory May Be Published Without a Defined Sanitization Boundary
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md:28-29,references/phases.md:8,18,21, andreferences/state-schema.md:3-28
Vulnerability Type: Insufficient protection of persistent Agent memory during artifact publication
Risk Level: MediumVulnerable Code Snippets
SKILL.md:28-29:markdown 1. Treat the current target repo HEAD as primary truth. 2. Treat MemPalace, prior handoffs, and expert memory as secondary context.references/phases.md:8-21:markdown | `mempalace_context` | Python | current-head memory pack | | `council_knowledge` | Python | expert council route | | `expert_forum_coverage` | Python | coverage score and expansion queue | | `literature_refresh` | OpenAlex + native web search | papers and web evidence | | `knowledge_publish` | Python | cycle knowledge base | | `advisor_design` | agent | advisor manifest, protocol hygiene findings, innovation-frontier reading, and action backlog | | `execution_packet` | Python | one selected micro-step, preferring unresolved hygiene gates while preserving an exploration lane | | `executor_run` | agent | runnable source changes, protocol hygiene notes, innovation-frontier notes, and executor manifest | | `advisor_reflection` | Python | post-execution constraints and evidence-level demotions | | `openspace_retrospective` | Python | loop improvement notes | | `next_cycle_handoff` | Python | next-cycle handoff | | `star_office_status` | Python | local dashboard status | | `overwatcher_check` | Python | observe-only workflow health report | | `github_publish` | Python | target repo delivery |references/state-schema.md:3-28:markdown Each run writes a durable local state tree and publishes sanitized artifacts to the target repo under `.autonomous-research-workflow/`. Important paths: ```text <run-dir>/ events.jsonl manifest.json payload/.autonomous-research-workflow/ cycles/< ...[truncated 3625 chars]- Remediation
View remediation
Remediation Suggestions
- Disable persistent-memory collection by default and require explicit user opt-in before reading MemPalace, prior handoffs, or other cross-session state.
- Restrict collection to an allowlist of workflow-owned files and documented fields; do not ingest arbitrary conversation history or unrelated Agent memory.
- Keep memory, handoff, event, and reflection artifacts outside the publishable payload unless they are explicitly selected for publication.
- Define a machine-enforced publication schema that permits only necessary, non-sensitive fields.
- Scan generated artifacts and diffs for credentials, tokens, private keys, personal data, local paths, and private conversation content before publication.
- Fail closed when scanning or sanitization cannot be completed; do not treat a descriptive “sanitized” label as proof that sanitization occurred.
- Present the complete publication diff and destination visibility to the user, then require explicit confirmation before committing or pushing.
- Add automated tests using seeded synthetic secrets to verify that memory-derived sensitive values cannot enter the publishable payload.
- Document an incident-response procedure for removing accidental disclosures, including credential rotation and Git-history remediation.
