Skip to content

Vulnerability & Code Quality Fixes#52

Merged
pallakartheekreddy merged 17 commits intomasterfrom
cts-vul-fixes
Feb 4, 2026
Merged

Vulnerability & Code Quality Fixes#52
pallakartheekreddy merged 17 commits intomasterfrom
cts-vul-fixes

Conversation

@maheshkumargangula
Copy link
Copy Markdown
Collaborator

No description provided.

pallakartheekreddy and others added 17 commits January 14, 2026 15:40
Replace kafka-node with kafkajs in the KafkaDispatcher
feat: using id and mid with the same UUID value.
- Updated KafkaDispatcher to extend from winston-transport instead of winston.Transport
- Changed KafkaDispatcher log method signature from log(level, msg, meta, callback) to log(info, callback) per Winston 3.x API
- Updated Dispatcher class to use winston.createLogger() instead of new winston.Logger()
- Removed winston.transports.Kafka registration as it's no longer needed in Winston 3.x
- Updated dispatch method to handle callback without passing it to logger.log (Winston 3.x doesn't support log callbacks)
- Updated all tests to work with Winston 3.x transports array structure
- Fixed test assertions to access transports by index instead of by name property
- All 29 tests passing, legacy Winston transport warning eliminated

Co-authored-by: maheshkumargangula <6985261+maheshkumargangula@users.noreply.github.com>
- Add *-audit.json pattern to .gitignore to exclude generated audit files
- Remove accidentally committed audit.json file from repository
- Use strict equality (===) instead of loose equality (==) consistently
- Improve comment on dispatch callback handling to clarify behavioral change

Co-authored-by: maheshkumargangula <6985261+maheshkumargangula@users.noreply.github.com>
- Changed dispatch method to call transport.log() directly instead of logger.log()
- This ensures callbacks are invoked only after logs are successfully written
- Transport.log() supports callbacks in Winston 3.x, allowing proper error handling
- Updated tests to spy on transport.log instead of logger.log
- Added tests to verify callbacks are invoked after log completion (success and error cases)
- All 31 tests passing (added 2 new callback verification tests)

Co-authored-by: maheshkumargangula <6985261+maheshkumargangula@users.noreply.github.com>
Co-authored-by: maheshkumargangula <6985261+maheshkumargangula@users.noreply.github.com>
Fix dispatcher callbacks to wait for log completion
@pallakartheekreddy pallakartheekreddy merged commit 741ba65 into master Feb 4, 2026
3 of 4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants