Skip to content

fix: use jobId for skill security breakdown#1

Closed
kantorcodes wants to merge 1 commit intomainfrom
feat/security-breakdown-jobid-only
Closed

fix: use jobId for skill security breakdown#1
kantorcodes wants to merge 1 commit intomainfrom
feat/security-breakdown-jobid-only

Conversation

@kantorcodes
Copy link
Copy Markdown
Member

Summary

  • add GetSkillSecurityBreakdown client method
  • require JobID in skill security breakdown options
  • call ID-only API path /skills/{jobId}/security-breakdown
  • update registrybroker coverage test for the new method

Verification

  • go test ./pkg/registrybroker/...

Signed-off-by: Michael Kantor <6068672+kantorcodes@users.noreply.github.com>
@kantorcodes kantorcodes requested a review from HGraphPunks as a code owner March 3, 2026 21:03
@gemini-code-assist
Copy link
Copy Markdown

Summary of Changes

Hello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request introduces a new client method to the registrybroker for fetching skill security breakdowns. The primary goal is to enable the retrieval of security-related information for skills, specifically by requiring a job identifier to ensure precise data fetching. This enhancement expands the client's capabilities to interact with a new security-focused API endpoint.

Highlights

  • New Client Method: Added a new client method GetSkillSecurityBreakdown to retrieve scanner summaries and findings for skill releases.
  • Required JobID: The GetSkillSecurityBreakdown method now requires a JobID in its options, ensuring requests are tied to a specific job.
  • API Path Update: The new method utilizes an ID-only API path /skills/{jobId}/security-breakdown for fetching security breakdown data.
  • Test Coverage: Updated the registrybroker coverage test to include a call to the newly added GetSkillSecurityBreakdown method.

🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console.

Changelog
  • pkg/registrybroker/coverage_test.go
    • Added a test call for the new GetSkillSecurityBreakdown method.
  • pkg/registrybroker/skills.go
    • Implemented the GetSkillSecurityBreakdown client method, including validation for JobID.
    • Constructed the API path dynamically using the provided JobID.
  • pkg/registrybroker/types.go
    • Defined the SkillSecurityBreakdownOptions struct, which includes a JobID field.
Activity
  • No human activity (comments, reviews) has been recorded on this pull request yet.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@kantorcodes
Copy link
Copy Markdown
Member Author

Superseded by #2 with feature-oriented branch/PR naming.

@kantorcodes kantorcodes closed this Mar 3, 2026
Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request introduces a new client method, GetSkillSecurityBreakdown, to retrieve skill security information based on a jobId. The changes are well-structured, including the new method, its options type, and an update to the coverage test. My review includes a minor suggestion to improve code clarity by removing a redundant operation.

return nil, err
}

path := "/skills/" + percentPath(strings.TrimSpace(options.JobID)) + "/security-breakdown"
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

medium

The percentPath function already trims whitespace from its input, so the call to strings.TrimSpace here is redundant and can be removed for cleaner code.

Suggested change
path := "/skills/" + percentPath(strings.TrimSpace(options.JobID)) + "/security-breakdown"
path := "/skills/" + percentPath(options.JobID) + "/security-breakdown"

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.

1 participant