《Cursor文檔》-Vulnerability Remediation

Vulnerability Remediation finds and fixes security issues in code that’s already merged: pre-existing vulnerabilities, long-standing issues, and problems missed during PR review.

To check pull requests before they merge, use Security Review.

Setup

Open the Vulnerability Remediation page in Automations to create and configure Vulnerability Scanner agents. Vulnerability Scanner agents run on the Automations platform and require Cloud Agents.

Source control support

Vulnerability Scanner supports repositories on Origin, GitHub, GitLab, and Bitbucket Cloud.

Source control provider Vulnerability Remediation
Origin Supported
GitHub Supported
GitLab Supported
Bitbucket Cloud Supported
Bitbucket Data Center Not supported
Azure DevOps Services Not supported

Triggers

Vulnerability Scanner agents support cron-based triggers. Use these triggers to scan your codebase on a recurring schedule, independent of pull request activity.

Vulnerability Scanner cron trigger configuration

Each Vulnerability Scanner has one schedule. To change when it runs, edit its existing trigger. To scan on another schedule, create a separate Vulnerability Scanner. A scan across more than 1,000 repositories can hit provider rate limits, so split large scopes into separate Vulnerability Scanners with smaller repository scopes.

CVE scanning

Vulnerability Scanner supports CVE scanning. On each run, it pulls the latest published CVE reports and scans your selected repositories against them. This allows for newly disclosed vulnerabilities to get caught and auto-remediated after each scheduled scan.

CVE scanning is in beta. It runs on every scan, and there’s no setting to turn it off. Findings from CVE scanning carry a CVE tag, and the Type filter under more filters shows CVE or Code findings.

Security checks

Vulnerability Scanner includes built-in security checks. Enable or disable individual checks based on what you want each scanner to look for.

Custom instructions

Use custom instructions to give each scanner more context. You can describe the types of issues to prioritize, explain project-specific security expectations, or define how the agent should behave.

Tools and MCPs

A Vulnerability Scanner saves without a tool or MCP and reports its findings to the Remediation agents section on the Vulnerability Remediation page in Automations. Add tools and MCPs to connect it to the systems where your team tracks security work.

  • Send vulnerabilities to a Slack channel, issue tracker, or another connected system.
  • Add custom instructions that explain when and how the agent should use each MCP.
  • Give the agent extra context from tools or MCPs before it reports a finding.

Environment setup

Both Cursor-managed hosting and Cloud Agents are used in this solution. If a team requires Self-Hosted Machines then scans remain on Cloud Agents.

Billing

Vulnerability Scanner and Remediation Agents are billed at the team usage level:

  • Usage is charged to the team’s usage pool.
  • Agents run under a shared team service account, so they don’t affect any individual user’s usage.

Viewing runs

The Vulnerability Remediation page in Automations lists Recent Runs for your Vulnerability Scanner agents. Use the run history to see when a scanner ran, which tools it used, its final status, and how long it took.

Open a run to inspect the underlying Cloud Agent for more detail about what the agent did. A scan that ran on Cursor-managed hosting has no Cloud Agent.

To run a saved scanner once without waiting for its schedule, click Test on its page. Run Test scans the default branch of the repository you pick, CVE scanning included. Team admins can also turn on Verify Findings and Open Fix PRs. The scanner’s saved settings don’t change.

Remediation Agents

Remediation Agents check the findings produced by the scanner and help you verify and fix them. They also take findings from other sources, such as a penetration test or another scanner.

For each finding, Cursor starts an agent that writes exploit tests to verify the issue and automatically patches the confirmed ones.

Find them in the Vulnerability Remediation section and on each scanner’s detail page.

Remediation Agents are available on Teams and Enterprise plans.

How it works

Each finding moves through four steps:

  1. Flagged. Vulnerability Scanner reports the finding, or the finding is submitted from another source.
  2. Verified. A verification agent writes tests against the real code path and runs them. It returns one of three verdicts:
    - Confirmed: the tests confirm the issue.
    - Refuted: the tests show the issue can’t happen.
    - Inconclusive: the agent couldn’t reach a conclusion.
  3. Tests PR. For a confirmed finding, the verification agent opens a draft pull request with its tests. These tests fail on purpose until the issue is fixed.
  4. Fix PR. A patch agent writes the fix, checks it against the tests, and opens a draft pull request for you to review.

Cursor never merges a fix for you. Merging is always your call.

Remediation settings

Each Vulnerability Scanner has two remediation settings. Turn them on in the scanner’s settings in Automations.

Setting What it does
Verify new findings Starts a verification agent for each new finding the scanner reports.
Open fix PRs for confirmed findings Starts a patch agent for each confirmed finding, which opens a draft fix PR.

Findings from other sources

Your Vulnerability Scanner can also verify and fix findings it didn’t report, such as results from a penetration test or another security tool. Each submitted finding names a repository, an optional commit, and the finding’s severity, title, locations, and description. Without a commit, the agents test the repository’s default branch.

A submission either verifies its findings first or skips verification and goes straight to a fix:

  • Verify first (default). Each finding gets a verification agent, whatever Verify new findings is set to. Confirmed findings get a fix PR when Open fix PRs for confirmed findings is on.
  • Skip verification. Each finding goes straight to a patch agent, which opens a draft fix PR. No verification agent runs, and the patch starts whatever either remediation setting says.

A finding submitted again with the same repository, commit, title, and locations maps to the existing verification instead of starting a new one. Nothing is queued when Vulnerability Remediation isn’t enabled for your team. Submitted findings appear in the Vulnerability Remediation section with the details they were submitted with.

Reviewing findings

The Vulnerability Remediation section groups findings into tabs by what they need next:

Tab What’s in it
Needs you Findings with a fix PR to review, confirmed findings waiting for a patch, and inconclusive findings.
In flight Findings being verified or patched, and findings queued for either.
Agent-refuted Findings the verification agent showed aren’t vulnerabilities.
Fixed Findings whose fix PR has merged.
Not verified Findings that haven’t been queued for verification.

Findings are labeled with their OWASP Top 10:2025 category, such as OWASP A05 Injection. Filter by OWASP category to see one category, or No category for findings without one.

Open a finding to take manual actions on it as needed. Its Finding history lists the finding’s events, and Export history downloads them as a CSV file.

To download findings, click Download report above the findings:

  • CSV offers two downloads:
  • Findings: the rows the table lists across all pages, with your filters and search applied.
  • All events: every audit event for your team’s findings.
  • PDF opens a print-ready remediation report for your whole team, whatever the table’s filters. Click Save as PDF to save it from your browser’s print dialog, or Close to go back.

The report shows open, overdue, and fixed counts, the SLA breach rate, and time to fix (median and p90). It charts findings detected and fixed per week, open findings by age, and findings by stage, and it breaks findings down by severity, repository, and merger.

Vulnerability Remediation API

Enterprise teams can use the Vulnerability Remediation API to list findings, request verifications and fixes, and track their progress. Create an API key from Cursor Dashboard → API Keys and authenticate with Basic Authentication.

Each endpoint allows 20 requests per minute per team. List endpoints use cursor pagination: pass a response’s nextCursor as cursor to read the next page. When nextCursor is null, there are no more pages.

If Vulnerability Remediation isn’t enabled for your team, every endpoint returns 403 Forbidden.

List findings

GET

/security/findings

Return the findings your team’s Vulnerability Scanners have reported, sorted by repository and then by finding ID.

Requires an API key with read:* scope.

Query Parameters

limit number (optional)

Number of findings per page. Default: 50, max: 100.

cursor string (optional)

The nextCursor from the previous page.

curl --get https://api.cursor.com/security/findings \
  -u YOUR_API_KEY: \
  --data-urlencode 'limit=50'

Response:

{
  "findings": [
    {
      "findingId": "3f2b8c1e-7a4d-4e2f-9b6a-1c5d8e0f2a47",
      "repository": "github:your-org/your-repo",
      "severity": "high",
      "title": "Missing authorization check on invoice export",
      "location": "src/billing/export.ts",
      "status": "active"
    }
  ],
  "nextCursor": "Z2l0aHViOnlvdXItb3JnL3lvdXItcmVwbwozZjJi..."
}

severity is critical, high, or medium. status is active, or dismissed if someone dismissed the finding.

Request verifications and fixes

POST

/security/verifications

Ask Cursor to verify findings, patch them, or both. The request returns as soon as the work is queued. Agents start within a few minutes.

Requires an API key with admin:* scope.

Request Body

findingIds string[] (required)

Finding IDs from GET /security/findings. Send 1 to 50 IDs per request.

verify boolean (required)

When true, verify every finding that hasn’t been verified. A finding that’s already verified, or being verified, keeps its existing verification.

patch boolean (required)

Whether confirmed findings get a fix PR. Set verify, patch, or both to true.

  • Both: verify, then open fix PRs for confirmed findings.
  • verify only: verify without opening fix PRs.
  • patch only: patch findings that already have a verdict, including refuted ones.

These flags override the scanner’s Open fix PRs for confirmed findings setting.

curl --request POST \
  --url https://api.cursor.com/security/verifications \
  -u YOUR_API_KEY: \
  --header 'Content-Type: application/json' \
  --data '{
    "findingIds": ["3f2b8c1e-7a4d-4e2f-9b6a-1c5d8e0f2a47"],
    "verify": true,
    "patch": true
  }'

Response (202 Accepted):

{
  "verifications": [
    {
      "findingId": "3f2b8c1e-7a4d-4e2f-9b6a-1c5d8e0f2a47",
      "verificationId": "3f2b8c1e-7a4d-4e2f-9b6a-1c5d8e0f2a47"
    }
  ],
  "skipped": []
}

Save each verificationId to track its progress. A finding that couldn’t be queued appears in skipped with a reason:

  • finding_not_found: no finding with this ID.
  • not_verifiable: can’t be verified, such as on an unsupported host.
  • not_verified: no verdict yet to patch. Request verify first.

If your team doesn’t have a running Vulnerability Scanner to take the request, the endpoint returns 409 Conflict:

{
  "code": "error",
  "message": "No vulnerability scanner is running for this team"
}

List verifications

GET

/security/verifications

Return your team’s verifications, newest first.

Requires an API key with read:* scope.

Query Parameters

limit number (optional)

Number of verifications per page. Default: 50, max: 100.

cursor string (optional)

The nextCursor from the previous page.

curl --get https://api.cursor.com/security/verifications \
  -u YOUR_API_KEY: \
  --data-urlencode 'limit=50'

Response:

{
  "verifications": [
    {
      "verificationId": "3f2b8c1e-7a4d-4e2f-9b6a-1c5d8e0f2a47",
      "findingId": "3f2b8c1e-7a4d-4e2f-9b6a-1c5d8e0f2a47",
      "repository": "github:your-org/your-repo",
      "commitSha": "9f3c2a1b7d8e4f5061728394a5b6c7d8e9f0a1b2",
      "severity": "high",
      "status": "completed",
      "verdict": "confirmed",
      "verifiedAt": "2026-10-20T18:04:11.000Z",
      "testsPrUrl": "https://github.com/your-org/your-repo/pull/128",
      "verificationAgent": {
        "id": "bc-5b1e9d2a-0c47-4f8e-a3d6-7e2b9c4f1a08",
        "url": "https://cursor.com/agents/bc-5b1e9d2a-0c47-4f8e-a3d6-7e2b9c4f1a08"
      },
      "patch": {
        "status": "completed",
        "agent": {
          "id": "bc-8d4a7f3c-2e19-4b6d-9a05-c1f7e8b3d264",
          "url": "https://cursor.com/agents/bc-8d4a7f3c-2e19-4b6d-9a05-c1f7e8b3d264"
        },
        "fixPrUrl": "https://github.com/your-org/your-repo/pull/129",
        "fixPrMerged": false
      }
    }
  ],
  "nextCursor": null
}

Get a verification

GET

/security/verifications/{verificationId}

Return one verification. Use this to poll a request until it finishes.

Requires an API key with read:* scope.

The response is a single verification object, in the same shape as the items in GET /security/verifications. See Verification fields. If your team has no verification with that ID, the endpoint returns 404 Not Found.

curl https://api.cursor.com/security/verifications/3f2b8c1e-7a4d-4e2f-9b6a-1c5d8e0f2a47 \
  -u YOUR_API_KEY:

Verification fields

Field Description
verificationId ID of the verification.
findingId Finding this verification checks.
repository Repository, in host:owner/repo form.
commitSha Commit the verification ran against. null until known.
severity Severity reported by the scanner.
status Where the work stands. See the table below.
verdict confirmed, refuted, inconclusive, or null while verification runs.
verifiedAt When the verdict was reached. null until then.
testsPrUrl Draft pull request with the verification tests, when one was opened.
verificationAgent ID and URL of the verification agent. null until it starts.
patch The fix, once Cursor decides whether to patch. null until then.
patch.status Where the fix stands. See the table below.
patch.agent ID and URL of the patch agent. null until it starts.
patch.fixPrUrl Draft pull request with the fix, once opened.
patch.fixPrMerged true once the fix PR is merged.

status values:

Value Meaning
queued Waiting for a verification agent to start.
verifying The verification agent is running.
patching Verification finished and a fix is queued or in progress.
completed Nothing more is running for this finding.

patch.status values:

Value Meaning
queued Waiting for a patch agent to start.
running The patch agent is working on a fix.
completed The patch agent finished. Check fixPrUrl for the fix PR.
not_requested No fix was requested for this finding.
false_positive The finding was refuted, so no fix was needed.
no_tests_pr Verification ended without a verdict or tests to build a fix on.
failed The patch agent couldn’t be started.

Errors

Errors return a JSON body with a message:

{
  "code": "error",
  "message": "Vulnerability verification is not enabled for this team"
}
Status When
400 Bad Request The request body or query is invalid, or the cursor wasn’t issued by this API.
401 Unauthorized The API key is missing or doesn’t have the required scope.
403 Forbidden Vulnerability Remediation isn’t enabled for your team.
404 Not Found The verification doesn’t exist for your team.
409 Conflict Your team has no running Vulnerability Scanner.
429 Too Many Requests You exceeded 20 requests per minute for this endpoint.

Verify and fix findings

  1. Call GET /security/findings and pick the findings you want to act on.
  2. Call POST /security/verifications with their findingIds. Set verify and patch to true to verify them and open fix PRs for confirmed ones.
  3. Save each returned verificationId.
  4. Poll GET /security/verifications/{verificationId} until status is completed.
  5. Review the pull request at patch.fixPrUrl.
  • Security Review checks pull requests for vulnerabilities before they merge.
  • Automations runs Vulnerability Scanner on a schedule.
  • Bugbot reviews pull requests for bugs before they merge.
羽毛球分组比赛记分
小程序二维码

欢迎使用《羽毛球分组比赛记分》微信小程序

小夜