cursor

A Cursor rule that checks where an AI service, software package, or model comes from before it is added to a project.

In plain words
What is it for?
Use it when adding AI software, service URLs, or model IDs to check data location, legal control, and model origin.
Why use it?
It helps prevent code from sending data to an unapproved country, provider, or model. It also prompts a human decision before the change is committed.

Cursor rule

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.

agentmods
npx agentmods add rules/iolairus/borderlint/cursor
Clone the repo
git clone --depth 1 https://github.com/iolairus/borderlint
Per session 334 This file is loaded in full into every session.
When invoked 334 The same file — it is already loaded in full.
Security scan A 0 findings. Scan, not verified.
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 $0.00334 $0.00334
Opus 5 $0.00167 $0.00167
Sonnet 5 $0.00067 $0.00067
Haiku 4.5 $0.00033 $0.00033

Measured yesterday against content hash 704c5b6ff094, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

cursor scanned grade A with 0 findings 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 yesterday.

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.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

integrations/cursor.mdc · 25 lines

What it actually says

Before adding any AI SDK import, AI endpoint reference, or model identifier to this codebase (an openai/anthropic/langchain-style package, a provider URL, a Bedrock/HF/Ollama model id, an OpenAI-compatible base_url, an LLM endpoint in config or .env):

  1. Run the border check first. With a project policy: borderlint scan . --policy residency.json --classification <the project's data class> Otherwise inventory mode: borderlint scan .
  2. If the addition would introduce a flow whose jurisdiction is not local — or a provider/router that resolves to unknown — say so in the conversation BEFORE committing, naming the provider, its residency jurisdiction, its sovereignty bloc, and (if a model id is involved) its provenance bloc. Let the human decide.
  3. If the flow is accepted, record it with an inline waiver carrying a real justification: # borderlint: allow <reason>. Unjustified waivers are ignored; waivers cannot override a provider or model deny.

Backstop: the pre-commit hook and the CI SBOM diff gate fail any PR that adds new non-local AI egress — this rule moves the check to where the decision is made.

Install: save as .cursor/rules/borderlint.mdc in your project.

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. yesterday First seen · 25 lines · 334 tokens per session scan A 704c5b6ff094

Subscribe to this mod's changes

cursor is a cursor rule published in the GitHub repository iolairus/borderlint (6 stars, last pushed 9d ago), licensed MIT. It adds 334 tokens to every session, about $0.0017 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.