T09 · Insecure Skill Coding Practices
- Location
SKILL.md:30- Finding
Moodle API Token Disclosed to a Hardcoded Third-Party Host
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
The skill does what it says, but it can send a Moodle API token to a hardcoded default server if the user does not set MOODLE_URL.
Install only if you explicitly set MOODLE_URL to your trusted Moodle server before using the skill. Treat MOODLE_TOKEN as a secret, avoid storing it in shared files or shell history, and rotate the token if it may have been sent to the default mylms.vossie.net endpoint.
SKILL.md:30Moodle API Token Disclosed to a Hardcoded Third-Party Host
Remote code is downloaded and executed. This bypasses code review and could introduce malicious code.
mod_assign_get_assignments is the primary course-discovery endpoint. It returns every enrolled course with its id, fullname, shortname, and any assignments:
curl -s "${MOODLE_URL:-https://mylms.vossie.net}/webservice/rest/server.php" \
--get \
--data-urlencode "wstoken=$MOODLE_TOKEN" \
--data-urlencode "wsfunction=mod_assign_get_assignments" \
Remote code is downloaded and executed. This bypasses code review and could introduce malicious code.
mod_assign_get_assignments is the primary course-discovery endpoint. It returns every enrolled course with its id, fullname, shortname, and any assignments:
curl -s "${MOODLE_URL:-https://mylms.vossie.net}/webservice/rest/server.php" \
--get \
--data-urlencode "wstoken=$MOODLE_TOKEN" \
--data-urlencode "wsfunction=mod_assign_get_assignments" \
Remote code is downloaded and executed. This bypasses code review and could introduce malicious code.
Use core_course_get_contents with a course ID (from mod_assign_get_assignments above):
curl -s "${MOODLE_URL:-https://mylms.vossie.net}/webservice/rest/server.php" \
--get \
--data-urlencode "wstoken=$MOODLE_TOKEN" \
--data-urlencode "wsfunction=core_course_get_contents" \
Remote code is downloaded and executed. This bypasses code review and could introduce malicious code.
curl -s "${MOODLE_URL:-https://mylms.vossie.net}/webservice/rest/server.php" \
--get \
--data-urlencode "wstoken=$MOODLE_TOKEN" \
--data-urlencode "wsfunction=core_completion_get_activities_completion_status" \
The README instructs users to generate and store a Moodle web service token, but it does not warn that this token is a sensitive credential equivalent to API authentication. Users may place it in shell history, world-readable config files, screenshots, or shared dotfiles, increasing the chance of credential theft and unauthorized access to Moodle data.
Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.
mkdir -p ~/.openclaw/skills/moodle
cp SKILL.md ~/.openclaw/skills/moodle/SKILL.md
Skill enumerates or reads other installed skills. Access to other skills' SKILL.md files or the skills directory reveals prompt instructions, capabilities, and secrets that should be invisible to peer skills.
mkdir -p ~/.openclaw/skills/moodle
cp SKILL.md ~/.openclaw/skills/moodle/SKILL.md
The skill repeatedly instructs users to send a bearer-like Moodle access token and potentially sensitive LMS metadata over network requests, but it provides no privacy or security warning about token handling, data exposure, or the trust implications of setting a custom MOODLE_URL. This is especially risky because the token is user-scoped and the default/fallback endpoint is a third-party domain, so users may unknowingly disclose educational records and credentials to an unintended server.
The file states that the skill accesses Moodle via the REST API and can list courses, assignments, and course content, but it does not explicitly warn users that their requests and associated LMS data will be transmitted to their Moodle instance. Because this behavior affects user data/privacy, the markdown should disclose it clearly.