Hub rules-cursor

rules-cursor

v2 public Verified

Cursor

Cursor is an AI-powered code editor built on VS Code. These rules guide AI agents in leveraging Cursor's unique features, such as indexed symbols and context-aware code generation, for seamless human-AI collaboration.

@sigmashakeinc 3 pulls 14 rules published Apr 8, 2026 synced Oct 11, 2026 sigmashakeinc/rules/rulesets/rules-cursor →
Severity
7 error 4 warn 3 info
demo.cast
Cursor is an AI-powered code editor built on VS Code. These rules guide AI agents in leveraging Cursor's unique features, such as indexed symbols and context-aware code generation, for seamless human-AI collaboration.

Rules index

14 governance rules

Indexed from the repository's .rules files, grouped by technology. Expand any rule to read the raw source.

cursor

ask-cursor-dotfile-read warning ask

Home directory dotfile access from Cursor. Cursor's workspace trust disabled by default means project-level configs can trigger dotfile access. Dotfiles often contain tokens, credentials, and private config for cloud providers, git hosts, and package registries.

Rule source requires an active Pro or Enterprise subscription.
ask-cursor-mcp-server-reference warning log

MCP server reference in written config. CVE-2025-54135 (CurXecute) exploited prompt injection to rewrite MCP configs pointing to attacker-controlled servers. Verify the MCP server source before writing.

Rule source requires an active Pro or Enterprise subscription.
ask-cursor-package-lifecycle-scripts warning log

Lifecycle script in package.json. Malicious npm packages targeting Cursor users use preinstall/postinstall hooks to execute arbitrary code silently during npm install. These scripts run with developer privileges and can exfiltrate data before the package is even imported.

Rule source requires an active Pro or Enterprise subscription.
ask-cursor-settings-modification warning log

Cursor editor settings modification. With workspace trust disabled by default, malicious settings can reference external tools, auto-execute scripts, or override security boundaries. Review before writing.

Rule source requires an active Pro or Enterprise subscription.
log-cursor-env-file-read info log

Environment file accessed in Cursor session. Logging for exfiltration detection. SSH key and API token theft attacks targeting Cursor (CVE-2025-54135/54136) often begin with reading .env files to discover available credentials.

Rule source requires an active Pro or Enterprise subscription.
log-cursor-extension-install info log

Extension installation detected. Malicious VS Code extensions are a documented attack surface. Verify the extension publisher, download count, and last updated date on the marketplace before installing.

Rule source requires an active Pro or Enterprise subscription.
log-cursor-rules-write info log

Cursor rules file written. These files control AI behavior and file access scope. Audit for prompt injection patterns or safety override attempts before committing.

Rule source requires an active Pro or Enterprise subscription.
no-cursor-eval-in-vscode-config error block

Code execution construct in Cursor/VS Code config. Combined with workspace trust disabled by default, eval/Function/child_process in config files achieves automatic code execution when the project opens — without any developer confirmation.

Rule source requires an active Pro or Enterprise subscription.
no-cursor-mcp-config-rewrite error block

CVE-2025-54135 (CurXecute): Writing to .cursor/mcp.json leads to RCE via prompt injection. Attackers craft malicious Slack messages that, when summarized by Cursor, rewrite MCP config to point to attacker-controlled servers and execute arbitrary commands with developer privileges. MCP config must be managed manually.

Rule source requires an active Pro or Enterprise subscription.
no-cursor-mcp-config-swap error block

CVE-2025-54136: MCP config file swap enables arbitrary code execution. If an attacker has write access to branches containing MCP server configs, they can swap harmless configs with malicious ones. Copying or symlinking MCP configs is blocked.

Rule source requires an active Pro or Enterprise subscription.
no-cursor-npm-credentials-read error block

NPM credential file access. Malicious npm packages specifically targeting Cursor users have been documented (SecurityWeek). Reading npm tokens could enable supply chain attacks via compromised package publishes to the npm registry.

Rule source requires an active Pro or Enterprise subscription.
no-cursor-rules-prompt-injection error block

Prompt injection in .cursorrules file. This file controls Cursor's AI behavior across all sessions in the project. Injecting system prompt overrides can disable Cursor's safety features and enable arbitrary code execution via the AI layer.

Rule source requires an active Pro or Enterprise subscription.
no-cursor-ssh-private-key-read error block

SSH key exfiltration attempt. Cursor security research documented SSH private key theft via prompt injection: 'attackers can leak private SSH keys by leveraging benign tools in tool combination attacks'. Reading SSH keys enables unauthorized server access, GitHub SSH auth, and deployment key abuse.

Rule source requires an active Pro or Enterprise subscription.
no-cursor-vscode-tasks-write error block

Cursor ships with VS Code Workspace Trust disabled by default. Writing .vscode/tasks.json with runOptions.runOn: 'folderOpen' causes auto-execution of arbitrary commands when any developer opens the project. A 'casual open folder becomes silent code execution' (Oasis Security). These files must be created manually by the developer.

Rule source requires an active Pro or Enterprise subscription.

Version metadata

Published metadata

The hash-locked record of this published ruleset. When source contents change, the maintainer resyncs and the version bumps.

Version
v2
Published
Apr 8, 2026
Source commits
0
Synced
Oct 11, 2026
Hash
6822d15b3fb51e9c113b9d8a6469ab939e79d9982aef2c3533779bafca7a4f36
Signature
Verified (publisher key)
Tested with
claude-code@current
Plan
Starter (free)
Visibility
Public

Source history

Recent commits

Latest commits touching rulesets/rules-cursor/.sigmashake/rules in sigmashakeinc/rules/rulesets/rules-cursor. The published version only bumps when a maintainer resyncs.

No commit history available.