Devtrack pulse/fixes#26
Merged
Merged
Conversation
- Updated the database query execution in `DevTrackDB` to use a cursor for better error handling and added fallback logic for retrieving column names, ensuring compatibility with various database quirks. - Improved the `RequestLogs` component by implementing a robust HTML escaping function to prevent XSS vulnerabilities and enhance the method for opening new windows with request details. - Added console logging in the `fetchStats` function to track API requests and responses for better debugging and monitoring.
- Introduced new release notes for v0.4.1, detailing critical bug fixes related to DuckDB compatibility and dashboard functionality, along with improvements in API logging and database query robustness.
- Incremented version to 0.4.1 and updated release date to 2025-12-23. - Verified all features and tests, with 48 automated tests passing. - Enhanced FastAPI middleware with 16 tests passing and updated metrics endpoints for v0.4.1. - Documented bug fixes related to DuckDB compatibility and request detail views. - Confirmed all functionalities are operational and ready for release.
Codacy's Analysis Summary8 new issues (≤ 0 issue) Review Pull Request in Codacy →
|
… parameters - Added validation to ensure limit and offset are non-negative integers to prevent SQL injection vulnerabilities in the `DevTrackDB` class. - Updated relevant SQL query executions to use sanitized limit values for improved security.
- Added a static method `_validate_int` to ensure integer parameters are validated and sanitized, preventing SQL injection vulnerabilities. - Updated SQL queries in various methods to use validated integer values for `days` and `hours` parameters, enhancing security and robustness of the database interactions.
- Added comments to clarify that SQL parameters are parameterized with placeholders, ensuring safety from SQL injection. - Updated the RequestLogs component to use the Blob API for creating safe URLs and added comments to confirm the safety of HTML encoding for data URLs. - Improved documentation within the code to enhance understanding of security measures implemented.
Owner
Author
|
I have reviwed Codacy Production / Codacy Static Code Analysis carefully, these shall not be blocker for this merge as
|
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.
DevTrack SDK v0.4.1 - Bugfix Release
🐛 Issues Fixed
Issue 1: Dashboard Displaying Incorrect Summary Statistics
Problem:
{"1": 10}instead of proper metricsRoot Cause:
conn.descriptionsometimes returns generic column names like["1"]or["NUMBER"]instead of actual SQL column namesget_stats_summary(),get_logs_by_path(), andget_logs_by_status_code()methodsFix:
Impact:
Issue 2: Request Detail View Not Displaying Styles in New Window
Problem:
Root Cause:
document.write()method can fail in certain browser environments or with Content Security PoliciesFix:
Impact:
📊 Additional Improvements
fetchStats()for better debugging✅ Testing
🔄 Migration
No breaking changes! This is a backward-compatible bugfix release.
Simply upgrade:
All existing functionality remains the same. The fixes are automatically applied.
📝 Summary
This release fixes two critical bugs that were preventing users from properly using the dashboard:
Both issues are now resolved, and the dashboard is fully functional for monitoring API health.