T02 · Agent Memory Poisoning
- Location
lib/canvas_sync.py:217- Finding
Student-Controlled Canvas Discussions Can Poison Persistent Agent Memory
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
This Course TA skill is mostly coherent, but it combines student-facing Q&A with broad Canvas admin powers, sensitive student-data access, persistent indexing/logging, and concrete unsafe file and token handling bugs that require Review before use.
Treat this as an instructor/admin tool, not a simple student Q&A bot. Install only with a least-privilege Canvas token, private staff-only log channels, explicit student notice for logging/forwarding, enrollment and discussion-reply sync disabled unless necessary, and fixes for filename containment plus Canvas URL origin validation before syncing untrusted Canvas content.
lib/canvas_sync.py:217Student-Controlled Canvas Discussions Can Poison Persistent Agent Memory
lib/canvas_sync.py:332Canvas-Controlled Filenames Permit Arbitrary File Writes Through Path Traversal
lib/canvas_api.py:71Canvas Bearer Token Can Be Forwarded to Unvalidated Network Destinations
README.md:57Third-Party Python Dependencies Are Installed Without Version or Integrity Pinning
lib/canvas_sync.py:414Student Enrollment PII Is Collected and Stored by Default Without Restrictive Controls
The broadcast command escalates from a read-oriented teaching assistant to a write-capable cross-course announcement tool by instantiating a write-enabled Canvas client and posting to every active course. If exposed through the agent, an attacker or confused user could send unauthorized announcements across multiple classes, causing large-scale integrity, trust, and operational harm.
The README documents capabilities far beyond a narrow Discord course Q&A assistant, including broad Canvas synchronization, admin tooling, and content management. This scope expansion increases the attack surface and suggests the skill may access or manipulate sensitive academic data in ways not justified by the stated purpose, creating a dangerous mismatch between expected and actual behavior.
Advertising grades, rosters, enrollments, and cross-section broadcast capabilities introduces access to highly sensitive educational records and mass-communication functions that are not necessary for ordinary course-question answering. If exposed through the agent or misconfigured, these features could enable FERPA/privacy violations, unauthorized disclosure, or abuse of instructor-level powers.
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
pip3 install requests beautifulsoup4
Interaction logging and audit-trail creation are additional behaviors not highlighted in the user-facing description. While logging may be legitimate, undisclosed storage and secondary use of user questions/answers is a privacy and trust issue, especially in educational settings.
Interaction logging and audit-trail creation are additional behaviors not highlighted in the user-facing description. While logging may be legitimate, undisclosed storage and secondary use of user questions/answers is a privacy and trust issue, especially in educational settings.
Interaction logging and audit-trail creation are additional behaviors not highlighted in the user-facing description. While logging may be legitimate, undisclosed storage and secondary use of user questions/answers is a privacy and trust issue, especially in educational settings.
Interaction logging and audit-trail creation are additional behaviors not highlighted in the user-facing description. While logging may be legitimate, undisclosed storage and secondary use of user questions/answers is a privacy and trust issue, especially in educational settings.
Interaction logging and audit-trail creation are additional behaviors not highlighted in the user-facing description. While logging may be legitimate, undisclosed storage and secondary use of user questions/answers is a privacy and trust issue, especially in educational settings.
Interaction logging and audit-trail creation are additional behaviors not highlighted in the user-facing description. While logging may be legitimate, undisclosed storage and secondary use of user questions/answers is a privacy and trust issue, especially in educational settings.
The manifest presents a local-materials Discord TA, but the skill also performs direct Canvas queries and write operations. This underdisclosure matters because networked data access and remote writes carry materially higher risk than passive local RAG lookups.
The skill includes an instruction to send messages to the professor containing student identity and request summaries. Outbound messaging is a classic exfiltration primitive; in this context it is especially sensitive because the skill also handles educational records and private student communications.
**If DM succeeds:**
- Confirm to the student: "✅ I've forwarded your message to Prof. <PROFESSOR_NAME>!"
**If DM fails** (error like "Unknown Channel", "Cannot send messages to this user", etc.):
Discord bots cannot initiate DMs with users unless:
- The user has DMs enabled for server members, AND
The file introduces a full Canvas LMS API client, including network access to an external platform, credential loading, file downloads, and broad course-data retrieval. That materially exceeds the stated skill scope of answering questions from local workspace course materials, increasing attack surface and creating a path to access live institutional data if the skill or surrounding agent is misused.
The client exposes methods to retrieve sensitive LMS data such as enrollments and submissions, which can contain student identities, participation details, and academic records. Those capabilities are not justified by the described teaching-assistant purpose and create privacy and compliance risk if invoked by an agent, prompt injection, or an overbroad workflow.
The file implements a broad Canvas course-management dashboard with deadline aggregation, submission tracking, grade overview, roster access, and cross-section broadcasting, which materially exceeds the declared Discord course-Q&A/RAG teaching-assistant scope. In an agent environment, this kind of hidden scope expansion is dangerous because it grants access to operational and student-data functions that users would not reasonably expect from the advertised skill.
These commands expose roster, submission status, engagement, and grade statistics that are unrelated to answering student questions from course materials and may reveal educational records or participation data. In the stated skill context, this unnecessarily expands access to sensitive student information and enables privacy-invasive workflows without any apparent authorization boundary or role checks.
This pattern attempts to override system instructions or ignore safety constraints. Without LLM analysis, manual review is recommended.
To find channel IDs:
1. In Discord: **Settings → Advanced → enable Developer Mode**
2. Right-click the channel → **Copy Channel ID**
3. Prefix with `channel:` in the config
The documentation claims the assistant refuses grade inquiries while also exposing grade-related dashboard capabilities, creating a policy/implementation contradiction. Such inconsistencies are risky because operators may assume grades are inaccessible when the underlying tooling still permits retrieval, increasing the chance of accidental disclosure or prompt-mediated misuse.
Periodic background sync, audit logging, submission tracking, and other persistent operational features indicate the skill maintains ongoing state and performs recurring actions beyond a single user request. In an agent context, persistent state and unattended syncing can magnify the impact of misconfiguration, stale authorization, or unauthorized data retention, especially when reads are described as unrestricted.
- **Admin commands** — Inline content editing, Canvas sync triggers, submission tracking
- **Dashboard tools** — Deadlines, grades, engagement, roster, cross-section broadcast
- **Audit logging** — JSONL logs of all interactions
- **Write gating** — All Canvas write operations require explicit user confirmation; reads are unrestricted
- **Incremental sync** — SHA-256 change detection, only writes files that actually differ
- **Cron scheduling** — Periodic background sync (configurable interval)
The skill declares broad operational behavior including file reads/writes, subprocess execution, and external Canvas access, but does not declare an explicit tool allowlist or permissions boundary. In a skill that handles credentials, logs, configuration files, and messaging, missing scope restrictions increases the blast radius if the skill is misrouted, prompt-injected, or modified later.
The manifest presents a local-materials Discord TA, but the skill also performs direct Canvas queries and write operations. This underdisclosure matters because networked data access and remote writes carry materially higher risk than passive local RAG lookups.
Skill grants unrestricted tool access without appropriate constraints. An agent with unfettered tool access can perform arbitrary actions including file modification, network requests, and code execution.
- **Only** users in `admin_users` can trigger edits — all others get: "Sorry, only the course administrator can modify course information."
- **Only** files in `editable_files` can be modified — never modify SKILL.md, openclaw.json, or any system file.
- **Never** execute arbitrary code from admin messages — only update the listed markdown files.
- All Canvas write operations (POST/PUT) require explicit user confirmation — read operations are unrestricted.
- Log every edit with `log_interaction.py` using `status=admin_edit`.
The logging instructions direct the assistant to store excerpts of user questions and responses and potentially broadcast summaries externally. Plain-language capture of student content increases privacy risk, especially if messages contain grades, personal circumstances, or accidental sensitive disclosures.
The skill can repost summaries of student questions to a Discord log channel without notifying the student in advance. This creates a hidden secondary disclosure path for educational conversations, potentially exposing sensitive questions, circumstances, or identifiers to a broader audience than the student intended.
Forwarding student requests to the professor via Discord DM is an outbound messaging capability outside the stated teaching-assistant/RAG purpose. That creates an exfiltration channel for user content and identifiers, and expands the consequences of prompt injection or social engineering.
No suspicious patterns detected.