moodle-security-review

moodle-security-review is a command for Claude Code from SaadRahman01/claude-moodle-dev. It costs 0 tokens per session (690 once invoked), scanned A, original, MIT.

A command for performing a Moodle security review, where Moodle is a learning platform commonly extended with PHP plugins.

In plain words
What is it for?
Use it on a Moodle file, directory, or plugin to inspect login and permission checks, session tokens, input types, SQL queries, and report findings with severity and fixes.
Why use it?
It checks for common access-control, request-validation, input-handling, and database-query mistakes that can expose data or allow unauthorised changes.

Command for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the moodle-dev plugin — 13 skills, 8 commands, 2 agents shipped together

Good fit Use it on a Moodle file, directory, or plugin to inspect login and permission checks, session tokens, input types, SQL queries, and report findings with severity and fixes.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/saadrahman01/claude-moodle-dev/moodle-security-review
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Clone the repo
git clone --depth 1 https://github.com/SaadRahman01/claude-moodle-dev

Made for: Claude Code.

Or install moodle-dev, the plugin that ships this one along with the rest of its 13 skills, 8 commands, 2 agents.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for moodle-security-review

README.md
[![agentmods](https://agentmods.dev/badge/commands/saadrahman01/claude-moodle-dev/moodle-security-review/github.svg)](https://agentmods.dev/commands/saadrahman01/claude-moodle-dev/moodle-security-review)
Your own site
<a href="https://agentmods.dev/commands/saadrahman01/claude-moodle-dev/moodle-security-review"><img src="https://agentmods.dev/badge/commands/saadrahman01/claude-moodle-dev/moodle-security-review/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for moodle-security-review

Your own site · 80×15
<a href="https://agentmods.dev/commands/saadrahman01/claude-moodle-dev/moodle-security-review"><img src="https://agentmods.dev/badge/commands/saadrahman01/claude-moodle-dev/moodle-security-review.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 690 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00000 $0.00690
Opus 5 $0.00000 $0.00345
Sonnet 5 $0.00000 $0.00138
Haiku 4.5 $0.00000 $0.00069

Measured 10d ago against content hash 7cf7a3a13bf6, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-09, from the pricing page.

Security

Grade A, and why

moodle-security-review scanned grade A with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 10d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

15. Uses `\curl` wrapper, not raw `curl_exec()` / `file_get_contents($url)`
adapters/aider/commands/moodle-security-review.md · 64 lines

How it starts

The opening of the file, as written. The whole thing — 64 lines — stays where its author put it; the contents beside it link to each section on GitHub.

/moodle-security-review

Run the Moodle security checklist on a file, directory, or entire plugin.

You will perform a Moodle-specific security review.

User's input:

Activate the moodle-security-audit skill for context.

If <args> is empty, ask for a file or plugin path.

Audit each PHP file in scope against this checklist. Report findings as:

[FILE]:[LINE] [SEVERITY] [CATEGORY] — [issue]
                                         FIX: [actionable fix]

Severities: CRITICAL (exploitable now), HIGH (privilege escalation / data leak), MEDIUM (defense in depth), LOW (style / hardening).

Checklist

For every entry script (file with require('config.php') or similar):

  1. require_login() present and called early
  2. require_capability() against the object's context (not arbitrary system context)
  3. require_sesskey() on every state-changing request (POST or mutating GET)
  4. All input via required_param/optional_param with appropriate PARAM_* type — flag any $_GET/$_POST/$_REQUEST usage

For every DB call: 5. Uses $DB->... — flag any mysqli_*, PDO, mysql_* 6. Placeholders (? / :name) — flag string concatenation in SQL 7. LIKE patterns use $DB->sql_like() + sql_like_escape() 8. IN (...) uses $DB->get_in_or_equal()

For every output: 9. User text rendered via s(), format_string(), format_text() — flag direct echo $var 10. format_string/format_text is called with a context 11. Mustache {{{var}}} raw output is justified (text already passed through format_text)

For file APIs: 12. pluginfile.php callback re-checks capability inside callback 13. Files are served via \file_storage + send_stored_file, never raw $CFG->dataroot 14. Uploads use file_save_draft_area_files with maxfiles, maxbytes, accepted_types

For HTTP / external: 15. Uses \curl wrapper, not raw curl_exec() / file_get_contents($url) 16. Open redirects: redirect($next) with $next from user input is validated against site host

Read the full file on GitHub · 64 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 10d ago First seen · 64 lines · 0 tokens per session scan A 7cf7a3a13bf6

Subscribe to this mod's changes

moodle-security-review is a command published in the GitHub repository SaadRahman01/claude-moodle-dev (36 stars, last pushed 2mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 690 tokens. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.