Skip to content

refactor(internal/librarian/golang): refactor version functions in Go #4059

Open
JoeWang1127 wants to merge 8 commits intomainfrom
chore/refactor-version
Open

refactor(internal/librarian/golang): refactor version functions in Go #4059
JoeWang1127 wants to merge 8 commits intomainfrom
chore/refactor-version

Conversation

@JoeWang1127
Copy link
Contributor

Create functions to calculate client directory and versioned api path for Go package.

For #3617

@codecov
Copy link

codecov bot commented Feb 13, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 82.06%. Comparing base (82168a3) to head (3339477).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4059      +/-   ##
==========================================
+ Coverage   82.04%   82.06%   +0.02%     
==========================================
  Files          78       78              
  Lines        6515     6519       +4     
==========================================
+ Hits         5345     5350       +5     
+ Misses        825      824       -1     
  Partials      345      345              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Contributor

@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 refactors version-related functions into new helpers, improving code organization. However, it introduces or maintains several security vulnerabilities related to unvalidated configuration parameters. Specifically, the ClientDirectory value is used to construct filesystem paths and as a Go package name without proper validation, leading to potential Path Traversal and Code Injection vulnerabilities. I've provided suggestions to refine the refactoring to avoid redundant function calls and improve efficiency, along with test updates.

@JoeWang1127 JoeWang1127 marked this pull request as ready for review February 13, 2026 20:03
@JoeWang1127 JoeWang1127 requested a review from a team as a code owner February 13, 2026 20:03
@JoeWang1127 JoeWang1127 enabled auto-merge (squash) February 13, 2026 20:03
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