.cursorrules · .cursor/rules/**/*.mdcOne ruleset for every reviewer.
You already maintain rule files for your IDE assistant — Cursor, Copilot, Claude, Windsurf, and more. Mesrai imports them automatically, so cloud PR reviews and the CLI enforce the exact same policy your local assistant does.
URL parameter injection vulnerability
The code directly uses URL search parameters without sanitization, which could lead to XSS attacks.
Suggested Fix: Sanitize the error message before displaying it.
BEFORE
const errorMessage = searchParams.get("error");AFTER
const errorMessage = DOMPurify.sanitize( searchParams.get('error') ?? '');● High — URL parameter injection vulnerability
Uses URL search parameters without sanitization. Could lead to XSS attacks.
Suggested Fix: Sanitize the error message before displaying.
Before:
After:
.github/copilot-instructions.md · .github/instructions/**CLAUDE.md · .claude/settings.json.windsurfrules.sourcegraph/**/*.rule.md.opencode.json.aider.conf.yml · .aiderignore.agents.md · .agent.md.rules/** · docs/coding-standards/**Mesrai scans your repo
On install, Mesrai detects existing rule files for any supported tool — Cursor, Copilot, Claude, and the rest.
Each file becomes a Mesrai Rule
Parsed into the same Mesrai Rules format you use in the dashboard. Editable, taggable, audit-tracked.
Auto-sync on every push
When the rule file changes upstream, Mesrai re-syncs and the cloud reviewer + CLI pick up the new policy.
One source of truth
Your IDE assistant + Mesrai cloud reviewer + Mesrai CLI all use the exact same rules. No drift between local and remote review.
Which IDEs and AI coding assistants does Mesrai sync with?+
Cursor (`.cursorrules`, `.cursor/rules/`), GitHub Copilot (`.github/copilot-instructions.md`), Claude Code (`CLAUDE.md`, `.claude/`), Windsurf (`.windsurfrules`), Cody (`cody-rules.yaml`), OpenCode (`opencode.json`), Aider (`.aider.conf.yml`), and Agentic (`AGENTS.md`). Mesrai reads whichever rule files already exist in the repo — no migration needed.
How does rule sync actually work?+
On first install Mesrai scans the repo for any of the supported rule files, parses them into a normalised Mesrai Rules format, and shows you a one-screen import preview. You approve which rules to bring in; rejected ones are ignored. After that the cloud reviewer applies the same rules on every PR — your IDE and the cloud now agree on what 'good' looks like.
Will syncing overwrite my existing .cursorrules or CLAUDE.md files?+
No. Sync is read-only by default — Mesrai never modifies the source rule files in your repo. Two-way sync (cloud rule changes flowing back to your IDE files) is an opt-in setting per repository, off by default.
Do I have to install an extension or plugin in my IDE?+
No. The sync runs entirely off the rule files already committed in the repository — those files are what your IDE reads. There's no Mesrai extension to install. If you want IDE-side suggestions, your existing AI assistant (Cursor, Copilot, etc.) keeps doing that job using the same rule files Mesrai reads.
Can I write rules in YAML instead of plain English?+
Yes. Mesrai Rules accept three formats: plain English (recommended for most rules), YAML (structured triggers + remediation), or a hybrid Markdown-with-frontmatter format. Each is converted to the same internal representation. Pick whatever your team already uses — Mesrai doesn't force a format.
Does rule sync work both ways (IDE → cloud AND cloud → IDE)?+
By default it's one-way: IDE rule files are imported into Mesrai cloud. Two-way sync (cloud → IDE) is an opt-in flag — when a rule is added or edited in the Mesrai web app, Mesrai opens a PR back to your repo with the updated rule file. Useful for centralised rule management; off by default to avoid surprising the team with bot PRs.
Already have rules? Bring them.
Mesrai imports your existing rule files in seconds. No rewrites, no migration.