Skip to content

Commit 9f571cb

Browse files
Array Fleetcursoragent
andcommitted
fix: address peer review for security advisory write tools
Validate ghsaId format before REST path interpolation, add MCP safety annotations (OpenWorldHint/DestructiveHint), and drop unrelated #2605 confidence-parameter changes from this branch. Co-authored-by: Cursor <cursoragent@cursor.com>
1 parent aa0a64d commit 9f571cb

13 files changed

Lines changed: 147 additions & 433 deletions

docs/feature-flags.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,6 @@ runtime behavior (such as output formatting) won't appear here.
198198

199199
- **update_issue_type** - Update Issue Type
200200
- **Required OAuth Scopes**: `repo`
201-
- `confidence`: How confident you are in this choice. Use 'high' for clear signal or explicit user request, 'medium' for reasonable inference with some ambiguity, 'low' for best guess with limited signal. (string, optional)
202201
- `is_suggestion`: If true, this issue type change is sent to the API as a suggestion (suggest:true) rather than an applied value. Whether the type is applied or recorded as a proposal is determined by the API. (boolean, optional)
203202
- `issue_number`: The issue number to update (number, required)
204203
- `issue_type`: The issue type to set (string, required)
@@ -241,7 +240,7 @@ runtime behavior (such as output formatting) won't appear here.
241240
- `owner`: Repository owner (username or organization) (string, required)
242241
- `pullNumber`: The pull request number (number, required)
243242
- `repo`: Repository name (string, required)
244-
- `reviewers`: GitHub usernames or ORG/team-slug team reviewers to request reviews from (string[], required)
243+
- `reviewers`: GitHub usernames to request reviews from (string[], required)
245244

246245
- **resolve_review_thread** - Resolve Review Thread
247246
- **Required OAuth Scopes**: `repo`

pkg/github/__toolsnaps__/create_repository_security_advisory.snap

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
{
22
"annotations": {
3+
"destructiveHint": true,
4+
"openWorldHint": true,
35
"title": "Create repository security advisory"
46
},
5-
"description": "Create a draft repository security advisory.",
7+
"description": "Create a draft repository security advisory. When startPrivateFork is true, a temporary private fork is created for collaborating on a fix.",
68
"inputSchema": {
79
"properties": {
810
"credits": {

pkg/github/__toolsnaps__/request_cve_for_repository_security_advisory.snap

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
{
22
"annotations": {
3+
"openWorldHint": true,
34
"title": "Request CVE for repository security advisory"
45
},
56
"description": "Request a CVE ID from GitHub for a draft repository security advisory.",

pkg/github/__toolsnaps__/request_pull_request_reviewers.snap

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,4 +37,4 @@
3737
"type": "object"
3838
},
3939
"name": "request_pull_request_reviewers"
40-
}
40+
}

pkg/github/__toolsnaps__/set_issue_fields.snap

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4,22 +4,13 @@
44
"openWorldHint": true,
55
"title": "Set Issue Fields"
66
},
7-
"description": "Set issue field values for an issue. Fields are organization-level custom fields (text, number, date, or single select). Use this to create or update field values on an issue. When setting values, include a confidence level (low, medium, or high) reflecting how certain you are about the choice.",
7+
"description": "Set issue field values for an issue. Fields are organization-level custom fields (text, number, date, or single select). Use this to create or update field values on an issue.",
88
"inputSchema": {
99
"properties": {
1010
"fields": {
1111
"description": "Array of issue field values to set. Each element must have a 'field_id' (string, the GraphQL node ID of the field) and exactly one value field: 'text_value' for text fields, 'number_value' for number fields, 'date_value' (ISO 8601 date string) for date fields, or 'single_select_option_id' (the GraphQL node ID of the option) for single select fields. Set 'delete' to true to remove a field value.",
1212
"items": {
1313
"properties": {
14-
"confidence": {
15-
"description": "How confident you are in this choice. Use 'high' for clear signal or explicit user request, 'medium' for reasonable inference with some ambiguity, 'low' for best guess with limited signal.",
16-
"enum": [
17-
"low",
18-
"medium",
19-
"high"
20-
],
21-
"type": "string"
22-
},
2314
"date_value": {
2415
"description": "The value to set for a date field (ISO 8601 date string)",
2516
"type": "string"

pkg/github/__toolsnaps__/update_issue_labels.snap

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"openWorldHint": true,
55
"title": "Update Issue Labels"
66
},
7-
"description": "Update the labels of an existing issue. This replaces the current labels with the provided list. When setting values, include a confidence level (low, medium, or high) reflecting how certain you are about the choice.",
7+
"description": "Update the labels of an existing issue. This replaces the current labels with the provided list.",
88
"inputSchema": {
99
"properties": {
1010
"issue_number": {
@@ -22,15 +22,6 @@
2222
},
2323
{
2424
"properties": {
25-
"confidence": {
26-
"description": "How confident you are in this choice. Use 'high' for clear signal or explicit user request, 'medium' for reasonable inference with some ambiguity, 'low' for best guess with limited signal.",
27-
"enum": [
28-
"low",
29-
"medium",
30-
"high"
31-
],
32-
"type": "string"
33-
},
3425
"is_suggestion": {
3526
"description": "If true, this label is sent to the API as a suggestion (suggest:true) rather than an applied label. Whether the label is applied or recorded as a proposal is determined by the API.",
3627
"type": "boolean"

pkg/github/__toolsnaps__/update_issue_type.snap

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4,18 +4,9 @@
44
"openWorldHint": true,
55
"title": "Update Issue Type"
66
},
7-
"description": "Update the type of an existing issue (e.g. 'bug', 'feature'). When setting values, include a confidence level (low, medium, or high) reflecting how certain you are about the choice.",
7+
"description": "Update the type of an existing issue (e.g. 'bug', 'feature').",
88
"inputSchema": {
99
"properties": {
10-
"confidence": {
11-
"description": "How confident you are in this choice. Use 'high' for clear signal or explicit user request, 'medium' for reasonable inference with some ambiguity, 'low' for best guess with limited signal.",
12-
"enum": [
13-
"low",
14-
"medium",
15-
"high"
16-
],
17-
"type": "string"
18-
},
1910
"is_suggestion": {
2011
"description": "If true, this issue type change is sent to the API as a suggestion (suggest:true) rather than an applied value. Whether the type is applied or recorded as a proposal is determined by the API.",
2112
"type": "boolean"

pkg/github/__toolsnaps__/update_pull_request.snap

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,4 +61,4 @@
6161
"type": "object"
6262
},
6363
"name": "update_pull_request"
64-
}
64+
}

pkg/github/__toolsnaps__/update_repository_security_advisory.snap

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
{
22
"annotations": {
3+
"destructiveHint": true,
4+
"openWorldHint": true,
35
"title": "Update repository security advisory"
46
},
57
"description": "Update a repository security advisory, including publishing it.",

0 commit comments

Comments
 (0)