-
Notifications
You must be signed in to change notification settings - Fork 27
[deps] upgrade client-go for ehance webhook request validation #122
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
Conversation
WalkthroughThis pull request includes two independent changes. First, it updates the dependency version of Changes
Possibly related PRs
📜 Recent review detailsConfiguration used: CodeRabbit UI ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (2)
🚧 Files skipped from review as they are similar to previous changes (2)
⏰ Context from checks skipped due to timeout of 90000ms (3)
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (1)
go.sumis excluded by!**/*.sum
📒 Files selected for processing (2)
go.mod(1 hunks)pkg/swagger/docs/requests.http(2 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (3)
- GitHub Check: Analyze (go)
- GitHub Check: E2E
- GitHub Check: lint
🔇 Additional comments (1)
go.mod (1)
7-7:✅ Verification successful
Update to client-go package version for webhook validation improvements
This change updates the
github.com/android-sms-gateway/client-godependency from a stable release version (v1.5.3) to a pseudo-version (v1.5.4-0.20250302231821-fae08f7208df). This corresponds to the PR objective of enhancing webhook request validation.To better understand what specific webhook validation enhancements this version brings, you may want to check the release notes or commit history.
🏁 Script executed:
#!/bin/bash # Verify if the client-go repository has this specific commit available gh repo view github.com/android-sms-gateway/client-go --json url -q .url > /dev/null 2>&1 if [ $? -eq 0 ]; then echo "Repository exists, checking commit..." gh api repos/android-sms-gateway/client-go/commits/fae08f7208df --silent > /dev/null 2>&1 if [ $? -eq 0 ]; then echo "Commit exists in the repository!" else echo "Warning: Commit 'fae08f7208df' not found in the repository." fi else echo "Warning: Repository not found or not accessible." fiLength of output: 345
Verified: Client-go Dependency Update Confirmed
The executed script confirms that the commit
fae08f7208dfexists in thegithub.com/android-sms-gateway/client-gorepository, validating the update fromv1.5.3to the pseudo-versionv1.5.4-0.20250302231821-fae08f7208df. This update aligns with the PR objective to enhance webhook request validation. For additional context on the improvements, please review the release notes or commit history.
|
|
||
| ### | ||
| GET {{baseUrl}}/api/3rdparty/v1/webhooks HTTP/1.1 | ||
| GET {{baseUrl}}/3rdparty/v1/webhooks HTTP/1.1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💡 Verification agent
🧩 Analysis chain
Updated webhook API routes by removing /api prefix
These changes align with the client-go dependency update by modifying the webhook endpoints to remove the /api prefix. This is consistent with the PR objective to enhance webhook request validation.
Is this change applied consistently to all webhook endpoints? I notice that some other API routes in the file still retain the /api prefix (lines 48, 67, 101). Let's check if this pattern is intentional:
Also applies to: 86-86, 97-97
🏁 Script executed:
#!/bin/bash
# Check for consistency of API endpoint patterns in the codebase
echo "Checking API endpoint patterns..."
echo "Routes with '/api/3rdparty/v1/webhooks' pattern:"
rg "/api/3rdparty/v1/webhooks" --type go
echo -e "\nRoutes with '/3rdparty/v1/webhooks' pattern (new format):"
rg "/3rdparty/v1/webhooks" --type go --no-filename | grep -v "/api/3rdparty/v1/webhooks"Length of output: 586
Inconsistent API Route Prefixes in HTTP Docs
- The Go annotations have been updated correctly to use the
/3rdparty/v1/webhooksformat (no/apiprefix), as confirmed by our search. - However, in
pkg/swagger/docs/requests.http, some endpoints (lines 48, 67, and 101) still reference the/apiprefix. - Please update these lines in the HTTP docs to remove the
/apiprefix so that all webhook endpoints are consistent with the changes made in the Go code.
7b6730d to
b02d486
Compare
b02d486 to
526492c
Compare
Summary by CodeRabbit