You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Refactor] Modernize legacy v1.0 tools to v2.0 architecture #56
src/rapid7/api_r7_endpoints.py - Replaced by constants.py
src/rapid7/api_r7_isvm_sonar_add.py - Replaced by tools/create_sonar_queries.py
src/rapid7/api_r7_status_codes.py - Functionality integrated into new tool
Key Improvements
Architecture - Uses InsightVMClient and follows v2.0 patterns
Type Safety - Full type hints throughout
Documentation - Comprehensive docstrings with examples
User Experience - Better CLI with argparse, progress feedback, and result tracking
Code Quality - No linting errors, proper error handling, clean separation of concerns
Next Steps
Review the PR
Test with an actual InsightVM instance (if possible)
Merge the PR
Remove legacy files in a follow-up commit
Update documentation
The tools/ directory files (install_insight_agent.py and install_scan_assistant.py) were reviewed but don't require refactoring as they're system installation scripts that don't use the API.
Message: chore: remove redundant workflows and legacy files
Status: Pushed to main branch
All legacy v1.0 code has now been successfully migrated to v2.0 architecture. The project is cleaner, more maintainable, and follows modern Python patterns.
Activity
feat(sonar): add Sonar Query API and modernize tools
talltechy commentedon Oct 7, 2025
Pull Request Created
I've created PR #57 that implements the refactoring of legacy v1.0 tools to v2.0 architecture.
What Was Completed
New Files Created:
src/rapid7/constants.py- Centralized API endpoint constants and configurationsrc/rapid7/api/sonar_queries.py- Full Sonar Query API wrapper with CRUD operationssrc/rapid7/tools/create_sonar_queries.py- Modern CLI tool replacing legacy scriptFiles Updated:
src/rapid7/client.py- Addedsonar_queriesclient integrationLegacy Files to Remove (after PR merge):
src/rapid7/api_r7_endpoints.py- Replaced byconstants.pysrc/rapid7/api_r7_isvm_sonar_add.py- Replaced bytools/create_sonar_queries.pysrc/rapid7/api_r7_status_codes.py- Functionality integrated into new toolKey Improvements
InsightVMClientand follows v2.0 patternsNext Steps
The
tools/directory files (install_insight_agent.pyandinstall_scan_assistant.py) were reviewed but don't require refactoring as they're system installation scripts that don't use the API.Branch:
refactor/issue-56-legacy-toolsPR: #57
feat(sonar): add Sonar Query API and modernize tools (#57)
chore: remove redundant workflows and legacy files
talltechy commentedon Oct 7, 2025
Cleanup Complete ✅
Following the merge of PR #57, I've completed the cleanup of legacy files and redundant GitHub workflows.
Legacy Files Removed
src/rapid7/api_r7_endpoints.py- Replaced byconstants.pysrc/rapid7/api_r7_isvm_sonar_add.py- Replaced bytools/create_sonar_queries.pysrc/rapid7/api_r7_status_codes.py- Functionality integrated into new toolRedundant Workflows Removed
.github/workflows/codacy.yml- Duplicated Pylint + Bandit.github/workflows/crda.yml- Duplicated dependency-review.yml.github/workflows/devskim.yml- Overlapped with Bandit.github/workflows/jekyll-gh-pages.yml- Not applicable to Python libraryRetained Essential Workflows
pylint.yml- Python code quality lintingbandit.yml- Python security scanningdependency-review.yml- Dependency vulnerability checksCommit Details
chore: remove redundant workflows and legacy filesAll legacy v1.0 code has now been successfully migrated to v2.0 architecture. The project is cleaner, more maintainable, and follows modern Python patterns.
Closing this issue as complete. 🎉