Skip to content

fix: replace bare except clauses with except Exception - #42

Open
KeloYuan wants to merge 1 commit into
c0dejump:mainfrom
KeloYuan:fix/bare-except-improvements
Open

fix: replace bare except clauses with except Exception#42
KeloYuan wants to merge 1 commit into
c0dejump:mainfrom
KeloYuan:fix/bare-except-improvements

Conversation

@KeloYuan

@KeloYuan KeloYuan commented May 8, 2026

Copy link
Copy Markdown

Summary

Replaces 2 bare except: clauses with except Exception: in:

  • modules/technos/cloudflare.py (line 51)
  • modules/cp_cve/CVE202557822.py (line 83)

Why

Bare except: catches SystemExit and KeyboardInterrupt, which can:

  • Mask Ctrl+C handling during scans
  • Hide critical system signals
  • Make debugging harder

Using except Exception: preserves the same error handling behavior while respecting system-level exceptions.

- modules/technos/cloudflare.py: bare except -> except Exception
- modules/cp_cve/CVE202557822.py: bare except -> except Exception

Bare except clauses catch SystemExit and KeyboardInterrupt,
which can mask critical signals and make debugging harder.
Copilot AI review requested due to automatic review settings May 8, 2026 12:49

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

This PR improves exception handling hygiene by replacing two bare except: clauses with except Exception: so that KeyboardInterrupt/SystemExit can still propagate during scans and debugging.

Changes:

  • Update modules/technos/cloudflare.py to use except Exception: instead of a bare except:.
  • Update modules/cp_cve/CVE202557822.py to use except Exception: instead of a bare except: in the nested request block.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
modules/technos/cloudflare.py Narrows a previously bare exception handler to Exception to avoid catching system-exiting exceptions.
modules/cp_cve/CVE202557822.py Narrows an inner bare exception handler to Exception while preserving existing control flow.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

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.

2 participants