
Moodle security audit
Audits Moodle plugin code for security issues and gives fix patterns
Moodle security audit is an open-source agent skill for security. It is available on Claude Code.
- Scripts
- None
- Platforms
- Claude Code
- GitHub stars
- 44
- Last commit
- License
- MIT
- Listing updated
Similar skills
About Moodle security audit
This skill guides an agent through reviewing or hardening Moodle plugin code. It walks through a fixed checklist for every entry script: login, context, capability, sesskey, and typed parameter handling, in that order. It then covers the common Moodle vulnerability classes, including SQL placeholders, output escaping, pluginfile callbacks, external HTTP via the core curl wrapper, uploads, secrets storage, logging, and open redirects.
The skill is organized as a set of bad-versus-good code examples and an anti-pattern table that maps each mistake to its Moodle replacement. It also points to phpcs with the Moodle code checker as a static analysis step, and explains that suspected core vulnerabilities should be reported privately to Moodle's security team rather than in a public issue.
It expects a Moodle plugin codebase in PHP and mustache templates, with the Moodle APIs available. It does not include scripts; the agent works from the instructions and the code it is given.
When your agent uses it
Use when reviewing or hardening Moodle plugin code for security — capability checks, sesskey CSRF, input validation, SQL injection, XSS, file serving, SSRF, IDOR, secrets handling, and Moodle's specific anti-patterns.
From the skill's SKILL.md. Your agent reads this description to decide when to load the skill.
What it can access
From a static check of its 1 file (10 KB) on GitHub on 3 December 2026. Nothing was run. Read the files before you install a skill: it can tell your agent to run anything its tools allow.
Check another skill before you install it.
Install
This skill ships in the moodle-dev plugin. In Claude Code, add the marketplace and install the plugin (it may include other skills too):
/plugin marketplace add SaadRahman01/claude-moodle-dev
/plugin install moodle-dev@moodle-devOr copy only this skill to ~/.claude/skills/moodle-security-audit:
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/SaadRahman01/claude-moodle-dev.git "$tmp" &&
mkdir -p ~/.claude/skills &&
rm -rf ~/.claude/skills/moodle-security-audit &&
cp -R "$tmp/skills/moodle-security-audit" ~/.claude/skills/moodle-security-audit &&
rm -rf "$tmp"For one project only, put the folder in .claude/skills/moodle-security-audit inside it instead.
Copy the skill folder to ~/.agents/skills/moodle-security-audit to use it in every repository:
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/SaadRahman01/claude-moodle-dev.git "$tmp" &&
mkdir -p ~/.agents/skills &&
rm -rf ~/.agents/skills/moodle-security-audit &&
cp -R "$tmp/skills/moodle-security-audit" ~/.agents/skills/moodle-security-audit &&
rm -rf "$tmp"For one repository only, put the folder in .agents/skills/moodle-security-audit inside it instead.
Copy the skill folder to ~/.cursor/skills/moodle-security-audit to use it in every project:
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/SaadRahman01/claude-moodle-dev.git "$tmp" &&
mkdir -p ~/.cursor/skills &&
rm -rf ~/.cursor/skills/moodle-security-audit &&
cp -R "$tmp/skills/moodle-security-audit" ~/.cursor/skills/moodle-security-audit &&
rm -rf "$tmp"For one project only, put the folder in .cursor/skills/moodle-security-audit inside it instead.
Run in a terminal (add --scope workspace to install it for the current workspace only):
gemini skills install https://github.com/SaadRahman01/claude-moodle-dev.git --path skills/moodle-security-auditOr copy the folder to ~/.gemini/skills/moodle-security-audit yourself.
For GitHub Copilot in VS Code, copy the skill folder to ~/.copilot/skills/moodle-security-audit:
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/SaadRahman01/claude-moodle-dev.git "$tmp" &&
mkdir -p ~/.copilot/skills &&
rm -rf ~/.copilot/skills/moodle-security-audit &&
cp -R "$tmp/skills/moodle-security-audit" ~/.copilot/skills/moodle-security-audit &&
rm -rf "$tmp"For one project only, put the folder in .github/skills/moodle-security-audit inside it instead.
Get the folder:
git clone --depth 1 https://github.com/SaadRahman01/claude-moodle-dev.gitThen copy claude-moodle-dev/skills/moodle-security-audit into your agent's skills folder as moodle-security-audit. Agents that support SKILL.md read one folder per skill.
What it does
- Entry script checklist
- A fixed order of login, context, capability, sesskey, and typed input checks for every entry point.
- IDOR and capability review
- Guidance to derive the context from the object being acted on rather than from URL parameters.
- SQL injection prevention
- Placeholder and get_in_or_equal patterns, plus safe LIKE handling for search inputs.
- Output escaping rules
- Which Moodle functions to use for escaping, and how Mustache escaping differs from raw output.
- File serving and uploads
- Checks for pluginfile callbacks and draft-area upload handling with type and size limits.
- Anti-pattern reference table
- A quick table mapping common insecure Moodle code to its recommended replacement.
Good for
- Review a Moodle plugin pull request for security problems
- Check a local plugin's AJAX endpoints for missing login and sesskey checks
- Find SQL concatenation and replace it with placeholders
- Audit a pluginfile callback for missing capability checks
- Respond to a vulnerability report against a Moodle plugin
Moodle security audit FAQ
When does Moodle security audit trigger?
When reviewing or hardening Moodle plugin code for security, covering capability checks, CSRF, input validation, SQL injection, XSS, file serving, SSRF, IDOR, secrets, and Moodle-specific anti-patterns.
Does Moodle security audit run any scripts or tools?
No scripts are included. It recommends running phpcs with the Moodle code checker as a static analysis step.
Where should I report a vulnerability found in Moodle core?
The skill says not to open a public issue and to email security@moodle.org under the Moodle security policy.
Which Moodle skill should I read first if I am writing new code?
The skill says to use moodle-plugin-development for new feature code, since it covers the basics.
How do I install Moodle security audit in Claude Code?
Copy the skill folder from GitHub to ~/.claude/skills/moodle-security-audit to use it in all your projects, or to .claude/skills/moodle-security-audit in one project. Or install the moodle-dev plugin, which includes it: /plugin marketplace add SaadRahman01/claude-moodle-dev, then /plugin install moodle-dev@moodle-dev.
Does Moodle security audit run scripts?
No. It is instructions only, with no scripts. This comes from a static check of the files on GitHub; nothing was run. Read the files before you install it.
Which AI agents can use Moodle security audit?
Claude Code. It reads skills in the SKILL.md format; the install steps on this page show where to put the folder.
What are the best alternatives to Moodle security audit?
The closest alternatives to Moodle security audit are Moodle plugin development, Moodle accessibility, Security review, Moodle upgrade migration and Security review.
Where this comes from
- Description: from the skill's own SKILL.md.
More from SaadRahman01/claude-moodle-dev

Guides building and calling Moodle web services: external functions, tokens and schemas
- Open source
- 44 GitHub stars
- Developer tools

Guides agents to build Moodle plugin UI that meets WCAG 2.1 AA accessibility rules
- Open source
- 44 GitHub stars
- Developer tools

Guides writing Moodle browser JavaScript as AMD modules with grunt builds and tests
- Open source
- 44 GitHub stars
- Developer tools

Guides writing and running Behat acceptance tests for Moodle plugins
- Open source
- 44 GitHub stars
- Developer tools

Guides building and migrating Moodle 4.4+ hook classes, listeners and tests
- Open source
- 44 GitHub stars
- Developer tools

Guides building Moodle plugin UI that renders inside the Moodle Mobile app
- Open source
- 44 GitHub stars
- Developer tools


