Thanks to visit codestin.com
Credit goes to github.com

Skip to content

fix(slackbot): remove global logging.basicConfig(DEBUG)#5696

Open
yashhzd wants to merge 1 commit intoOWASP-BLT:mainfrom
yashhzd:fix/slackbot-remove-global-debug-logging
Open

fix(slackbot): remove global logging.basicConfig(DEBUG)#5696
yashhzd wants to merge 1 commit intoOWASP-BLT:mainfrom
yashhzd:fix/slackbot-remove-global-debug-logging

Conversation

@yashhzd
Copy link
Contributor

@yashhzd yashhzd commented Feb 12, 2026

Summary

logging.basicConfig(level=logging.DEBUG) in slackbot.py sets the root logger to DEBUG for the entire Django application, not just this module. This causes:

  • Excessive log output from all third-party libraries (requests, urllib3, slack_bolt, Django internals)
  • Potential sensitive data leaks in production (HTTP headers, tokens in debug logs)
  • Performance overhead from processing thousands of DEBUG-level log messages

Changes

  • Remove logging.basicConfig(level=logging.DEBUG) — Django projects should configure logging through settings.LOGGING instead
  • Remove redundant pass statement after logger.debug() in exception handler (the except block already has a statement)

Note

The module-level logger = logging.getLogger(__name__) is preserved. Its effective level is controlled by Django's LOGGING configuration in settings.py, which is the correct approach for Django applications.

logging.basicConfig(level=logging.DEBUG) sets the root logger to DEBUG
for the entire application, not just this module. This causes excessive
log output from all libraries (requests, urllib3, slack_bolt, etc.) and
can leak sensitive data in production. Django projects should rely on
the LOGGING setting in settings.py instead. Also remove redundant pass
after logger.debug in exception handler.
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Feb 12, 2026

Warning

Rate limit exceeded

@yashhzd has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 18 minutes and 5 seconds before requesting another review.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions
Copy link
Contributor

👋 Hi @yashhzd!

This pull request needs a peer review before it can be merged. Please request a review from a team member who is not:

  • The PR author
  • DonnieBLT
  • coderabbitai
  • copilot

Once a valid peer review is submitted, this check will pass automatically. Thank you!

@github-actions github-actions bot added the needs-peer-review PR needs peer review label Feb 12, 2026
@github-actions
Copy link
Contributor

📊 Monthly Leaderboard

Hi @yashhzd! Here's how you rank for February 2026:

Rank User Open PRs PRs (merged) PRs (closed) Reviews Comments CR chats Total
#4 @DonnieBLT 1 0 1 11 29 1 112
#5 @yashhzd 50 2 0 0 7 0 84
#6 @S3DFX-CYBER 4 3 5 3 22 71 83

Scoring this month: Open PRs (+1 each), Merged PRs (+10), Closed (not merged) (−2), Reviews (+5; first two per PR in-month), Comments (+2, excludes CR). Coderabbit chats column is visible. Points per chat: 0; daily cap per user (UTC): 7.

@github-actions github-actions bot added the pre-commit: passed Pre-commit checks passed label Feb 12, 2026
Copy link
Contributor

@Nachiket-Roy Nachiket-Roy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you please create one more PR so we can verify whether the 50-PR cap guard is working as expected?

@yashhzd
Copy link
Contributor Author

yashhzd commented Feb 12, 2026

Yes its working fine

Copy link
Contributor

@Jayant2908 Jayant2908 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removing logging.debug seems correct. Removing pass seems to be unnecessary but fine.

@github-actions github-actions bot added the last-active: 0d PR last updated 0 days ago label Feb 13, 2026
@gojo-satorou-v7
Copy link
Member

gojo-satorou-v7 commented Feb 13, 2026

@yashhzd STOP spamming the project with so many PRs, there are multiple PRs covering same file with slightly different feature/chore/bug-fix and if you have any question join the slack channel and discuss them there. https://join.slack.com/t/owasp/shared_invite/zt-3pe2u9d9g-NTPxlRsHc6PznHklsfutyQ

You are free to open pull requests but so many at once creates insane burden for code review not to mention some of them are very low quality.

@github-actions github-actions bot added last-active: 1d PR last updated 1 day ago and removed last-active: 0d PR last updated 0 days ago labels Feb 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

files-changed: 1 last-active: 1d PR last updated 1 day ago needs-peer-review PR needs peer review pre-commit: passed Pre-commit checks passed

Projects

Status: Backlog

Development

Successfully merging this pull request may close these issues.

4 participants