Installation¶
Prerequisites¶
- Node.js 18+ (native fetch, crypto.randomUUID)
- Cursor IDE with hooks support
- Prisma AIRS API key (
x-pan-token) - AIRS security profiles configured for prompt and response scanning
Install¶
Environment Variables¶
Add to your shell profile (~/.zshrc, ~/.bashrc, or ~/.zsh.d/):
export AIRS_API_KEY=<your-x-pan-token> # required
export AIRS_API_ENDPOINT=https://service.api.aisecurity.paloaltonetworks.com # optional
export AIRS_PROMPT_PROFILE=cursor-ide-prompt-profile # optional
export AIRS_RESPONSE_PROFILE=cursor-ide-response-profile # optional
Only AIRS_API_KEY is required
The endpoint defaults to the US region. Profile names default to cursor-ide-prompt-profile and cursor-ide-response-profile.
Regional Endpoints¶
| Region | Endpoint |
|---|---|
| US (default) | https://service.api.aisecurity.paloaltonetworks.com |
| EU | https://service-de.api.aisecurity.paloaltonetworks.com |
| India | https://service-in.api.aisecurity.paloaltonetworks.com |
| Singapore | https://service-sg.api.aisecurity.paloaltonetworks.com |
Validate Connectivity¶
Register Hooks in Cursor¶
This writes hooks.json pointing at the precompiled JS in dist/ and copies airs-config.json to the hooks config directory.
Global installation recommended
Use --global to install hooks at ~/.cursor/hooks.json so they apply across all workspaces without per-project setup.
Restart Cursor¶
Cursor reads hooks.json at startup. Restart Cursor to activate the hooks.
Verify¶
Uninstall¶
Removes AIRS entries from hooks.json while preserving other hooks, config, and logs.