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.
git clone --depth 1 https://github.com/SaadRahman01/claude-moodle-devWrote 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.
[](https://agentmods.dev/rules/saadrahman01/claude-moodle-dev/cmd-moodle-security-review)<a href="https://agentmods.dev/rules/saadrahman01/claude-moodle-dev/cmd-moodle-security-review"><img src="https://agentmods.dev/badge/rules/saadrahman01/claude-moodle-dev/cmd-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.
<a href="https://agentmods.dev/rules/saadrahman01/claude-moodle-dev/cmd-moodle-security-review"><img src="https://agentmods.dev/badge/rules/saadrahman01/claude-moodle-dev/cmd-moodle-security-review.svg" alt="Reviewed on agentmods" width="80" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00026 | $0.00704 |
| Opus 5.5 | $0.00010 | $0.00282 |
| Sonnet 5.5 | $0.00005 | $0.00141 |
| Haiku 4.5 | $0.00003 | $0.00070 |
Grade A, and why
cmd-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 3mo 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)` What it actually says
You will perform a Moodle-specific security review.
User's input: {user_input}
Activate the moodle-security-audit skill for context.
If {user_input} 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):
require_login()present and called earlyrequire_capability()against the object's context (not arbitrary system context)require_sesskey()on every state-changing request (POST or mutating GET)- All input via
required_param/optional_paramwith appropriatePARAM_*type — flag any$_GET/$_POST/$_REQUESTusage
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
For secrets:
17. No tokens / API keys committed in source — use set_config/get_config
For dangerous PHP:
18. No eval(), create_function(), unserialize() on user input
19. print_error is replaced with throw new \moodle_exception()
For sessions:
20. \core\session\manager::write_close() called early on AJAX endpoints that don't write session
After audit:
- Print summary:
N CRITICAL, N HIGH, N MEDIUM, N LOW - Offer to apply fixes one-by-one or as a single patch (ask before writing)
- For unresolved CRITICAL findings, recommend not deploying until fixed
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.
- 3mo ago First seen · 64 lines · 704 tokens per session scan A 804280f79a52
cmd-moodle-security-review is a cursor rule published in the GitHub repository SaadRahman01/claude-moodle-dev (43 stars, last pushed 5mo ago), licensed MIT. It adds 26 tokens to every session and 704 once invoked, about $0.0001 per session on Opus 5.5. 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.
cmd-moodle-security-review compared with cursor rules from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| cmd-moodle-security-reviewSaadRahman01/claude-moodle-dev | Cursor rule | 43 | 5mo ago | MIT | A | 26 | Cursor |
| add-landing-templateclassroomio/classroomio | Cursor rule | 1.8k | today | AGPL-3.0 | A | 0 | Cursor |
| webrtcAcKeskin/contexture | Cursor rule | 2 | 7d ago | MIT | A | 1,211 | Cursor |
| agentsonesimplecode/agent-engineering-standards | Cursor rule | 4 | 2mo ago | MIT | A | 102 | Cursor |
| ponytailDietrichGebert/ponytail | Cursor rule | 201k | 8d ago | MIT | A | 604 | Cursor |
| angular-20angular/angular | Cursor rule | 102k | 4d ago | MIT | A | 0 | Cursor |
| dev-standardapache/superset | Cursor rule | 76k | today | Apache-2.0 | A | 1,147 | Cursor |