Cursor
Install (Recommended)
Install StackHawk rules to your global Cursor config so they’re available in every project:
# Clone the agent-skills repo
git clone https://github.com/stackhawk/agent-skills.git /tmp/stackhawk-skills
# Copy Cursor rules to your global Cursor config
mkdir -p ~/.cursor/rules
cp -r /tmp/stackhawk-skills/cursor/.cursor/rules/* ~/.cursor/rules/
# Clean up
rm -rf /tmp/stackhawk-skills # Clone the agent-skills repo
git clone https://github.com/stackhawk/agent-skills.git $env:TEMP\stackhawk-skills
# Copy Cursor rules to your global Cursor config
New-Item -ItemType Directory -Force "$env:USERPROFILE\.cursor\rules"
Copy-Item -Recurse "$env:TEMP\stackhawk-skills\cursor\.cursor\rules\*" "$env:USERPROFILE\.cursor\rules\"
# Clean up
Remove-Item -Recurse -Force "$env:TEMP\stackhawk-skills"CMD users: use PowerShell (built into Windows 10+) or WSL.
Global rules in ~/.cursor/rules/ are loaded automatically in every project you open.
Install — Per-Project (Alternative)
To distribute rules to a team via a specific repo:
git clone https://github.com/stackhawk/agent-skills.git /tmp/stackhawk-skills
cp -r /tmp/stackhawk-skills/cursor/.cursor/rules/* your-project/.cursor/rules/
rm -rf /tmp/stackhawk-skills
git add .cursor/rules
git commit -m "feat: add StackHawk DAST rules for Cursor" git clone https://github.com/stackhawk/agent-skills.git $env:TEMP\stackhawk-skills
New-Item -ItemType Directory -Force "your-project\.cursor\rules"
Copy-Item -Recurse "$env:TEMP\stackhawk-skills\cursor\.cursor\rules\*" "your-project\.cursor\rules\"
Remove-Item -Recurse -Force "$env:TEMP\stackhawk-skills"
git add .cursor/rules
git commit -m "feat: add StackHawk DAST rules for Cursor"CMD users: use PowerShell (built into Windows 10+) or WSL.
Set Your API Key
export HAWK_API_KEY=hawk.xxxxxxxxxxxxxxxxxxxx $env:HAWK_API_KEY = "hawk.xxxxxxxxxxxxxxxxxxxx"CMD users: use PowerShell (built into Windows 10+) or WSL.
Verify
Open any project in Cursor. Ask the AI: “What StackHawk rules do you have?” It should describe HawkScan scanning and API reporting capabilities.
Usage
Ask Cursor’s AI to scan your application:
Scan my app running on localhost:8080 for security vulnerabilities
Tips
- Install once, scan everywhere: Global rules in
~/.cursor/rules/work across all projects - Team distribution: For team-wide rollout, commit
.cursor/rules/stackhawk-*.mdcfiles to your repos - The rules are split into 10 modular files so Cursor loads only what’s relevant for the current task
- The agent checks if your app is running and will prompt you to start it if needed