Repository navigation
Add Dependabot alert update tool - #3887
Merged
Merged
Conversation
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
8 of 14 tasks
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
The unconditional API version breaks some Enterprise Server requests, and treating successful responses with unusable bodies as update failures risks duplicate non-idempotent Copilot remediation requests.
2 open issues
What changed in this PR
Adds update_dependabot_alert to the opt-in Dependabot toolset, enabling alert triage updates alongside existing read tools.
Changes:
- Supports reopening, dismissing, and replacing assignees, with strict validation and exact alert-number handling.
- Applies existing authentication, scope, security-labeling, and read-only filtering conventions.
- Adds behavioral and integration coverage, a schema snapshot, and updated documentation.
| File | Description |
|---|---|
README.md |
Documents the new tool and its parameters. |
pkg/skills/catalog/tools.go |
Maps the update tool to the security triage skill. |
pkg/skills/catalog/skills/security-alert-triage/SKILL.md |
Explains confirmed updates and accurate outcome reporting. |
pkg/skills/catalog/skills/security-alert-triage/references/alert-sources.md |
Lists the optional Dependabot update capability. |
pkg/github/update_dependabot_alert.go |
Implements validation, PATCH requests, and narrow responses. |
pkg/github/update_dependabot_alert_test.go |
Covers updates, validation, exact numbers, protocols, and inventory. |
pkg/github/typed_security_outputs_test.go |
Adds output-schema support for the new tool’s tests. |
pkg/github/tools.go |
Registers the tool in the inventory. |
pkg/github/__toolsnaps__/update_dependabot_alert.snap |
Records tool metadata and input/output schemas. |
cmd/github-mcp-server/main_test.go |
Tests scope reporting and read-only exclusion. |
Review effort: Max (adaptive)
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
tommaso-moro
approved these changes
Nov 19, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Summary
Add
update_dependabot_alertto the opt-in Dependabot toolset for reopening, dismissing, or assigning alerts. Preserve exact alert IDs and return only the actual update response fields.Why
Dependabot tools currently retrieve alerts but cannot apply a triage decision or change ownership. This adds the public REST update operation alongside those reads without changing their behavior. No linked issue.
What changed
agent_assignment.get_dependabot_alertbefore retrying; retain diagnostic details and never retry automatically.MCP impact
update_dependabot_alertrequires separateowner,repo, and integeralertNumber, plus state or assignees. It is opt-in throughdependabot; existing tools are unchanged. Cross-field requirements are checked at runtime without top-level schema combinators.Prompts tested (tool changes only)
Equivalent tool calls were tested against mocked REST responses, not through live natural-language sessions:
Security / limits
Uses existing authentication and the classic OAuth
security_eventsscope, matching the alert reads; fine-grained tokens need Dependabot alerts write permission. GitHub continues to enforce permissions, licensing, repository policies, and delegated-dismissal review. No new grants or confirmation field are introduced. Success returns a narrow, security-labeled response; API errors are surfaced without fallback writes. Comments are limited to 280 characters. Tests cover exact9007199254740993and max-int64 IDs, fractional/overflow rejection, nulls, omission, and both supported protocol eras.The public 2022-11-28 OpenAPI schema includes all PATCH fields used here, including assignment; no newer API version is required. Cloud and enterprise requests retain client defaults. Unsupported features remain explicit API errors. Unusable successful responses are not evidence that the mutation failed: inspect the alert before any retry.
Tool renaming
deprecated_tool_aliases.goNo existing tool names change.
Note: if you're renaming tools, you must add the tool aliases. For more information on how to do so, please refer to the official docs.
Lint & tests
./script/lint— passed, zero issues, including the review fixes../script/test— passed, full race-enabled suite, including the review fixes.Additional validation:
UPDATE_TOOLSNAPS=true go test ./...— passed for the initial tool addition; review fixes do not alter schemas.go test ./pkg/github ./pkg/inventory ./pkg/skills/catalog ./cmd/github-mcp-server -run 'TestUpdateDependabotAlert|TestDependabotUpdateListScopes|TestCatalogToolRequirementsAreRegistered|TestCreateToolScopeFilter|TestTypedSecurity' -count=1— passed matching tests; inventory had no matching selectors and was covered by the full suite.go test ./pkg/github -run TestUpdateDependabotAlert -count=1— passed after removing version overrides and adding uncertain-outcome handling; covers client defaults/authentication/base URLs, unsupported enterprise assignment, successful decode/validation failures, and exact single-PATCH counts.go build ./cmd/github-mcp-server— passed../github-mcp-server list-scopes --toolsets=dependabot --output=json— passed; reportssecurity_eventsfor the write tool../github-mcp-server list-scopes --toolsets=dependabot --read-only --output=json— passed; excludes the write tool.git diff --check— passed.Live API/e2e tests were not run; no repository alerts were modified.
Docs
script/generate-docs— passed; README tool documentation regenerated. Review fixes preserve the tool schema and generated documentation.Skills
Updated the security-alert-triage skill, alert source reference, and tool mapping to cover requested Dependabot updates without treating a recommendation as a completed update. The skill also requires inspecting the alert before retrying an update with an uncertain result.