feat: Go third-party QueryType classes + GORM SQLi & Gin SSRF rules#644
Merged
shivasurya merged 1 commit intomainfrom Apr 7, 2026
Merged
feat: Go third-party QueryType classes + GORM SQLi & Gin SSRF rules#644shivasurya merged 1 commit intomainfrom
shivasurya merged 1 commit intomainfrom
Conversation
SafeDep Report SummaryNo dependency changes detected. Nothing to scan. This report is generated by SafeDep Github App |
Code Pathfinder Security ScanNo security issues detected.
Powered by Code Pathfinder |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #644 +/- ##
=======================================
Coverage 84.24% 84.24%
=======================================
Files 162 162
Lines 23358 23358
=======================================
Hits 19677 19677
Misses 2941 2941
Partials 740 740 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
This was referenced Apr 7, 2026
Owner
Author
This was referenced Apr 7, 2026
Owner
Author
Merge activity
|
Add 15 new QueryType classes for popular Go frameworks (GORM, Gin, Echo, Fiber, gRPC, pgx, sqlx, go-redis, MongoDB, JWT, Gorilla Mux, Resty, Chi, Viper, YAML) to python-sdk/codepathfinder/go_rule.py. Add example security rules: - rules/golang/gorm_sqli_taint.py: GORM SQL injection via Gin/Echo/net/http sources - rules/golang/gin_ssrf.py: SSRF via Resty HTTP client with Gin/net/http sources Add 27 tests in test_go_thirdparty_querytypes.py covering FQN correctness, multi-FQN types, MethodMatcher IR, negative matching, and no-duplicate-FQN invariant. Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
61d181d to
19785a8
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.




Summary
QueryTypeclasses inpython-sdk/codepathfinder/go_rule.pyfor popular Go frameworks: GORM, Gin, Echo, Fiber, gRPC, pgx, sqlx, go-redis, MongoDB, golang-jwt, Gorilla Mux, Resty, Chi, Viper, YAML v3rules/golang/gorm_sqli_taint.py— GORM SQL injection (CWE-89) with Gin/Echo/net-http sourcesrules/golang/gin_ssrf.py— SSRF (CWE-918) via Resty HTTP client with Gin/net-http sourcestest_go_thirdparty_querytypes.pycovering FQN correctness, multi-FQN types,MethodMatcherIR output, negative matching, and a no-duplicate-FQN invariantWhy
Rule authors can now write type-constrained matchers like
GoGormDB.method("Raw", "Exec")instead of fragilecalls("*Raw"). This eliminates false positives from unrelatedRaw()calls on non-GORM types, and enables cross-framework taint tracking:Dependencies
Stacked on PR-03 (
shiva/pr-03-golang-thirdparty): package-level var resolution + StdlibLoader embed fix.Test plan
cd python-sdk && python3 -m pytest tests/test_go_thirdparty_querytypes.py -v— 27 new tests passcd python-sdk && python3 -m pytest tests/ -v— 408 total tests, zero regressionspython3 -c "from codepathfinder.go_rule import GoGormDB, GoGinContext"— imports work🤖 Generated with Claude Code