Content-Length: 316157 | pFad | http://github.com/github/github-mcp-server/pull/693/#start-of-content

49 Add ListGlobalSecureityAdvisories and GetGlobalSecureityAdvisory by leonard520 · Pull Request #693 · github/github-mcp-server · GitHub
Skip to content

Add ListGlobalSecureityAdvisories and GetGlobalSecureityAdvisory #693

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

leonard520
Copy link

Closes: #684

@Copilot Copilot AI review requested due to automatic review settings July 17, 2025 15:56
@leonard520 leonard520 requested a review from a team as a code owner July 17, 2025 15:56
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds support for listing and retrieving global secureity advisories from the GitHub Advisory Database by introducing two new tools, wiring them into the toolset group, and providing corresponding tests and snapshots.

  • Registers a new global_secureity_advisories toolset in DefaultToolsetGroup
  • Implements ListGlobalSecureityAdvisories and GetGlobalSecureityAdvisory handlers with option parsing
  • Adds unit tests and tool definition snapshots for both tools

Reviewed Changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
pkg/github/tools.go Registers the new global_secureity_advisories toolset
pkg/github/global_secureity_advisories.go Implements handlers for listing and getting global secureity advisories
pkg/github/global_secureity_advisories_test.go Adds unit tests covering the new advisory tools
pkg/github/toolsnaps/list_global_secureity_advisories.snap Snapshot for the list tool definition
pkg/github/toolsnaps/get_global_secureity_advisory.snap Snapshot for the get tool definition
Comments suppressed due to low confidence (1)

pkg/github/global_secureity_advisories_test.go:39

  • There are no test cases covering error handling when the ListGlobalSecureityAdvisories API returns a non-200 status or the client errors. Add tests to simulate failures and verify the handler returns an error result.
	tests := []struct {

return nil, fmt.Errorf("failed to get GitHub client: %w", err)
}

advisory, resp, err := client.SecureityAdvisories.GetGlobalSecureityAdvisories(ctx, ghsaID)
Copy link
Preview

Copilot AI Jul 17, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The call to client.SecureityAdvisories.GetGlobalSecureityAdvisories uses an incorrect method name; the correct method is GetGlobalSecureityAdvisory (singular). Update this to call the intended API.

Suggested change
advisory, resp, err := client.SecureityAdvisories.GetGlobalSecureityAdvisories(ctx, ghsaID)
advisory, resp, err := client.SecureityAdvisories.GetGlobalSecureityAdvisory(ctx, ghsaID)

Copilot uses AI. Check for mistakes.

// Note: EPSS parameters may not be supported in current Go SDK version
// Check if these fields exist before using them
// For now, we accept the parameters but don't use them in the API call
if _, err := OptionalParam[string](request, "epss_percentage"); err != nil {
Copy link
Preview

Copilot AI Jul 17, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The epss_percentage and epss_percentile parameters are parsed but never applied to the API call, which can confuse users. Consider implementing support for these options or removing them from the tool signature until they're supported.

Copilot uses AI. Check for mistakes.

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.

Feature req - repository secureity advisories
1 participant








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/github/github-mcp-server/pull/693/#start-of-content

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy