|
| 1 | +# Installing Rogue Security for Cursor |
| 2 | + |
| 3 | +Rogue Security AIDR sits inside Cursor and observes every agent event — prompts, tool calls, shell commands, MCP invocations, file reads, subagents — forwarding each one to Rogue's detection engine for prompt-injection, secret-exfiltration, and destructive-command analysis. Allow / ask / deny decisions come from your Rogue org configuration; there are no client-side policy knobs to misconfigure. |
| 4 | + |
| 5 | +There are two ways to install: |
| 6 | + |
| 7 | +1. **Org-wide** via a Cursor Team Marketplace — recommended for security teams that want every developer covered automatically, with no opt-out. |
| 8 | +2. **Per-developer** via a one-line installer — fastest path for an individual to try Rogue on their own machine. |
| 9 | + |
| 10 | +--- |
| 11 | + |
| 12 | +## 1. Org-wide install (Cursor Team Marketplace) |
| 13 | + |
| 14 | +> Requires a **Cursor Teams or Enterprise** plan (Cursor 2.6+). Only Cursor admins can add team marketplaces. |
| 15 | +
|
| 16 | +In the Cursor admin dashboard: |
| 17 | + |
| 18 | +1. Open **Settings → Plugins**. |
| 19 | +2. Under **Team Marketplaces**, click **Import**. |
| 20 | +3. Paste the repository URL: |
| 21 | + ``` |
| 22 | + https://github.com/qualifire-dev/rogue-plugin-cursor |
| 23 | + ``` |
| 24 | +4. Cursor parses the marketplace and shows the `rogue` plugin. Set a marketplace **name** (e.g. "Rogue Security") and **description**. |
| 25 | +5. Under **Team Access**, choose which distribution groups receive the plugin — typically all developers. |
| 26 | +6. Set the `rogue` plugin distribution mode to **Required**: |
| 27 | + |
| 28 | + | Mode | Behavior | |
| 29 | + |---------------|-------------------------------------------------------------------------| |
| 30 | + | Default Off | Visible in the marketplace; developer chooses to install. | |
| 31 | + | Default On | Installed automatically; developer can uninstall. | |
| 32 | + | **Required** | Installed automatically; developer **cannot** uninstall or disable it. | |
| 33 | + |
| 34 | + Cursor's own guidance is to reserve **Required** for security-critical tools — that's the right mode here. |
| 35 | + |
| 36 | +If your org uses SCIM with Cursor, manage distribution groups in your IdP (Okta, Entra, etc.) — Cursor syncs group membership automatically, so onboarding a new engineer to your "Engineering" group will deploy Rogue to their Cursor install on next launch. |
| 37 | + |
| 38 | +> **GitHub Enterprise Server (self-hosted)**: register a Cursor GHE app at `cursor.com/dashboard?tab=integrations` and install it in your organization before importing the marketplace. |
| 39 | +
|
| 40 | +### Distributing credentials |
| 41 | + |
| 42 | +Each install needs `ROGUE_API_KEY` (and optionally `ROGUE_ACTOR_EMAIL` and `ROGUE_ACTOR_NAME`) to authenticate against the Rogue API. Marketplaces don't ship secrets, so pick one of the following: |
| 43 | + |
| 44 | +- **MDM-managed system env file** (*recommended for Enterprise*) — push `/etc/rogue/env` (mode 600) via Jamf, Intune, or Kandji. No developer action required; works the moment Cursor launches. |
| 45 | +- **Per-user setup command** — developers run `/rogue:setup` inside Cursor once after install, which writes `~/.rogue-env`. Works well for smaller teams. |
| 46 | +- **MDM provisioning script** — push a script that runs the one-line installer in `--non-interactive` mode with `ROGUE_API_KEY` pre-set. |
| 47 | + |
| 48 | +API keys are issued at <https://app.rogue.security/settings/api-keys>. |
| 49 | + |
| 50 | +### Plan sizing |
| 51 | + |
| 52 | +| Plan | Team marketplaces | |
| 53 | +|------------|-------------------| |
| 54 | +| Teams | 1 | |
| 55 | +| Enterprise | Unlimited | |
| 56 | + |
| 57 | +--- |
| 58 | + |
| 59 | +## 2. Per-developer install (one-line) |
| 60 | + |
| 61 | +For an individual developer on macOS: |
| 62 | + |
| 63 | +```bash |
| 64 | +curl -fsSL https://raw.githubusercontent.com/qualifire-dev/rogue-plugin-cursor/main/install.sh | bash |
| 65 | +``` |
| 66 | + |
| 67 | +The installer: |
| 68 | + |
| 69 | +- Prompts for an API key (or reads `ROGUE_API_KEY` from the environment). |
| 70 | +- Validates the key against `https://api.rogue.security`. |
| 71 | +- Writes `~/.rogue-env` (mode 600). |
| 72 | +- Installs the plugin into `~/.cursor/plugins/local/rogue/`. |
| 73 | +- Enables a background auto-update that runs at most once every 24h. |
| 74 | + |
| 75 | +Non-interactive (suitable for CI or provisioning scripts): |
| 76 | + |
| 77 | +```bash |
| 78 | +curl -fsSL https://raw.githubusercontent.com/qualifire-dev/rogue-plugin-cursor/main/install.sh \ |
| 79 | + | ROGUE_API_KEY=rsk_xxxxxxxx \ |
| 80 | + ROGUE_ACTOR_EMAIL=alice@yourco.com \ |
| 81 | + ROGUE_ACTOR_NAME='Alice Engineer' \ |
| 82 | + bash -s -- --non-interactive |
| 83 | +``` |
| 84 | + |
| 85 | +Supported flags: `--api-key`, `--email`, `--name`, `--api-url`, `--non-interactive`. |
| 86 | + |
| 87 | +After install, **fully quit Cursor and reopen**, then run `/rogue:status` to verify. |
| 88 | + |
| 89 | +--- |
| 90 | + |
| 91 | +## Configuration reference |
| 92 | + |
| 93 | +These environment variables are read from `~/.rogue-env` (or `/etc/rogue/env` for MDM-managed installs): |
| 94 | + |
| 95 | +| Variable | Required | Purpose | |
| 96 | +|------------------------|----------|------------------------------------------------------------------| |
| 97 | +| `ROGUE_API_KEY` | Yes | API key from <https://app.rogue.security/settings/api-keys>. | |
| 98 | +| `ROGUE_ACTOR_EMAIL` | No | Identifies the developer in the AIDR dashboard. | |
| 99 | +| `ROGUE_ACTOR_NAME` | No | Display name in the dashboard. | |
| 100 | +| `ROGUE_BASE_URL` | No | Override the API endpoint (default `https://api.rogue.security`). | |
| 101 | +| `ROGUE_AUTO_UPDATE` | No | Set `0` to disable the background updater (one-line install only). | |
| 102 | +| `ROGUE_PLUGIN_VERSION` | No | Pin to a specific release (e.g. `v1.0.0`). | |
| 103 | + |
| 104 | +Both file locations use mode 600. The system-wide `/etc/rogue/env` takes precedence when present. |
| 105 | + |
| 106 | +--- |
| 107 | + |
| 108 | +## Verifying the install |
| 109 | + |
| 110 | +1. Fully restart Cursor. |
| 111 | +2. Run `/rogue:status` inside Cursor — you should see `API: reachable` and a non-zero hook count. |
| 112 | +3. Send any prompt in agent mode. Within a few seconds it should appear at <https://app.rogue.security/aidr>. |
| 113 | + |
| 114 | +--- |
| 115 | + |
| 116 | +## FAQ |
| 117 | + |
| 118 | +**Can I enforce this plugin so developers can't disable it?** |
| 119 | +Yes — via a Cursor Team Marketplace with the `rogue` plugin set to **Required**. The per-developer one-line install is not enforceable on its own (developers can disable plugins they installed themselves). Pair the marketplace install with an MDM-pushed `/etc/rogue/env` and the plugin runs on every Cursor session with no developer opt-out. |
| 120 | + |
| 121 | +**Does the plugin block developers if the Rogue API is unreachable?** |
| 122 | +No. Rogue's plugin is fail-open by design: missing API key, network failure, non-200 responses, or malformed bodies all result in no detection and no block. Developers are never stopped by Rogue infrastructure issues. Policy decisions only apply when the API responds successfully. |
| 123 | + |
| 124 | +**How does the plugin update itself?** |
| 125 | +- **Marketplace install:** Cursor manages updates from the marketplace repository automatically. |
| 126 | +- **One-line install:** the plugin runs an auto-updater on each Cursor `sessionStart`, rate-limited to once per 24h. Disable it by setting `ROGUE_AUTO_UPDATE=0`, or pin a version with `ROGUE_PLUGIN_VERSION=v1.0.0`. |
| 127 | + |
| 128 | +**What gets stored on the developer's machine?** |
| 129 | +- Plugin files (managed by Cursor for marketplace installs, or `~/.cursor/plugins/local/rogue/` for the one-line install). |
| 130 | +- Credentials at `~/.rogue-env` or `/etc/rogue/env` (mode 600). |
| 131 | + |
| 132 | +**Is the source code reviewable before deployment?** |
| 133 | +Yes — the plugin is an open repository at <https://github.com/qualifire-dev/rogue-plugin-cursor>. Security teams typically review it before importing it as a team marketplace. |
| 134 | + |
| 135 | +**Is there a way to mark a detection as a false positive?** |
| 136 | +Yes — prepend `rgx!` to any prompt. That request is allowed through and the previous detection is flagged as a false positive in your AIDR dashboard. Per-prompt only. |
| 137 | + |
| 138 | +--- |
| 139 | + |
| 140 | +Questions or rollout help: <support@rogue.security>. |
0 commit comments