-
Notifications
You must be signed in to change notification settings - Fork 10
refactor(callgraph): Create analysis/taint, extraction packages and complete registry #374
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
Merged
Conversation
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
SafeDep Report SummaryNo dependency changes detected. Nothing to scan. This report is generated by SafeDep Github App |
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #374 +/- ##
=======================================
Coverage ? 79.85%
=======================================
Files ? 78
Lines ? 6886
Branches ? 0
=======================================
Hits ? 5499
Misses ? 1157
Partials ? 230 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
6 tasks
Owner
Author
This was referenced Nov 15, 2025
Owner
Author
Merge activity
|
…omplete registry This PR completes the registry layer with stdlib support and creates the foundation for taint analysis by establishing the analysis/taint and extraction packages. Package Structure Created: - analysis/taint: Intra-procedural taint analysis (15 tests, 94.8% coverage) - extraction: AST statement extraction (46 tests, 89.1% coverage) - registry: Enhanced with stdlib loader and remote CDN support Files Migrated: - taint.go → analysis/taint/analyzer.go - statement_extraction.go → extraction/statements.go - stdlib_registry_loader.go → registry/stdlib_loader.go - stdlib_registry_remote.go → registry/stdlib_remote.go Type Aliases: All original files updated with backward-compatible type aliases to maintain zero breaking changes. Bug Fix: Enhanced matchesFunctionName in analysis/taint/analyzer.go to handle parentheses and support suffix/prefix matching, fixing test failures in intra-procedural taint detection. Verification: gradle clean buildGo (SUCCESS), gradle testGo (all pass), gradle lintGo (0 issues), coverage 89.1-94.8% (exceeds 85% target). 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
5b7b8fd to
0ccaeb2
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
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.

This PR completes the registry layer with stdlib support and creates the foundation for taint analysis by establishing the analysis/taint and extraction packages. The refactoring establishes three new packages for improved code organization while maintaining complete backward compatibility through type aliases.
New packages created include analysis/taint for intra-procedural taint analysis with 15 tests achieving 94.8% coverage, extraction for AST statement extraction with 46 tests at 89.1% coverage, and registry enhancements for stdlib loader and remote CDN support. Files migrated from their original locations to the new package structure include taint.go to analysis/taint/analyzer.go, statement_extraction.go to extraction/statements.go, stdlib_registry_loader.go to registry/stdlib_loader.go, and stdlib_registry_remote.go to registry/stdlib_remote.go.
The refactoring includes a critical bug fix that enhanced matchesFunctionName in analysis/taint/analyzer.go to properly handle parentheses in call targets and support suffix/prefix matching patterns, resolving test failures in intra-procedural taint detection that were uncovered during the refactoring process.
Verification completed successfully with gradle clean buildGo showing successful compilation with no errors, gradle testGo confirming all test suites pass including diagnostic callgraph analysis/taint and extraction packages, and gradle lintGo reporting zero issues. Test coverage ranges from 89.1% to 94.8% across new packages exceeding the 85% target.