Skip to content

Add support for creating and updating repository security advisories#2631

Open
advancedresearcharray wants to merge 8 commits into
github:mainfrom
advancedresearcharray:feat/repository-security-advisory-write-2506
Open

Add support for creating and updating repository security advisories#2631
advancedresearcharray wants to merge 8 commits into
github:mainfrom
advancedresearcharray:feat/repository-security-advisory-write-2506

Conversation

@advancedresearcharray

@advancedresearcharray advancedresearcharray commented Jun 6, 2026

Copy link
Copy Markdown

Summary

  • Add create_repository_security_advisory, update_repository_security_advisory, and request_cve_for_repository_security_advisory tools to the security_advisories toolset
  • Implement REST API integration for POST/PATCH repository advisory endpoints (not yet exposed in go-github) plus CVE request via the existing client method
  • Add unit tests, tool schema snapshots, and generated README documentation

Closes #2506

Test plan

  • go test ./pkg/github -run 'Test_(Create|Update|RequestCVE|ParseAdvisory)'
  • go test ./pkg/github
  • go run ./cmd/github-mcp-server generate-docs

@advancedresearcharray advancedresearcharray requested a review from a team as a code owner June 6, 2026 21:57
@advancedresearcharray advancedresearcharray force-pushed the feat/repository-security-advisory-write-2506 branch from 6f86876 to 709eff1 Compare June 6, 2026 21:59
Expose create, update, and CVE request operations in the security_advisories toolset so security teams can manage advisories without leaving MCP workflows.

Closes github#2506
@advancedresearcharray advancedresearcharray force-pushed the feat/repository-security-advisory-write-2506 branch from 709eff1 to 2a1584f Compare June 6, 2026 21:59
@advancedresearcharray

Copy link
Copy Markdown
Author

Cleaned commit history and PR description (removed third-party attribution trailers).

PR adds three security_advisories toolset operations for repository advisory lifecycle management (create, update, CVE request) with unit tests and schema snapshots. Closes #2506.

CI workflows are awaiting maintainer approval for this fork PR.

root added 2 commits June 7, 2026 00:20
Reject update_repository_security_advisory calls that only provide
owner, repo, and ghsaId to avoid sending empty PATCH requests.
Regenerate docs so the security advisory PR only updates the
security_advisories toolset section.
@advancedresearcharray advancedresearcharray force-pushed the feat/repository-security-advisory-write-2506 branch 2 times, most recently from 7676be3 to dcc3220 Compare June 8, 2026 03:43
GitHub's create advisory API requires exactly one of severity or
cvss_vector_string. Reject invalid combinations at the MCP layer with
clear errors, and add regression tests.
@advancedresearcharray advancedresearcharray force-pushed the feat/repository-security-advisory-write-2506 branch from dcc3220 to a2f8099 Compare June 8, 2026 03:44
advancedresearcharray and others added 4 commits June 8, 2026 04:20
Implement validateSeverityOrCVSS that was documented but missing from
the prior commit. Create requires exactly one of severity or
cvssVectorString; update rejects both together. Also require package
name in vulnerability schema per GitHub API.

Co-authored-by: Cursor <cursoragent@cursor.com>
Add regression coverage ensuring create, update, and CVE request tools
are registered in the security_advisories toolset with write hints.

Co-authored-by: Cursor <cursoragent@cursor.com>
Implement three write operations in the security_advisories toolset using
direct REST calls for POST/PATCH endpoints not yet in go-github, plus
CVE request via the existing client. Consolidate unit tests into
security_advisories_test.go.

Closes github#2506

Co-authored-by: Cursor <cursoragent@cursor.com>
Reject advisories missing package.ecosystem before calling GitHub, and
remove unreachable AcceptedError handling since go-github already normalizes
202 responses from RequestCVE.

Co-authored-by: Cursor <cursoragent@cursor.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add support for creating and updating repository security advisories

1 participant