This monorepo can attach repository scans to PRs via:
- Workflow
.github/workflows/security-scan.yml— runs@cursor-security/mcpCLI, uploads SARIF, writes a job summary. - Composite action
.github/actions/security-scan— reusable step for other repos that vendor this package. - Ingest API
POST /api/scans— authenticated agents/CI can persist JSON reports into Postgres for/app/scans.
| Capability | Purpose |
|---|---|
checks:write |
Publish a Check Run with grade/score |
pull_requests:write |
Optional PR comment with top findings |
security_events:write |
SARIF upload to code scanning |
Webhook pull_request |
Trigger scan on open/sync |
Store the App private key in GitHub Secrets / a vault. Never put it in prompts or MCP tool args.
npm run build -w @cursor-security/mcp
node packages/cursor-security-mcp/dist/cli.js --format json --out report.json .
# POST report.json.report to https://<your-host>/api/scans with a session cookie or machine tokenUse packages/cursor-security-mcp/src/sandbox/policy.ts (gateAgentTool, createKillSwitch) in any GitHub App worker so tool-using agents cannot exceed budgets or skip approvals.