-
-
Couldn't load subscription status.
- Fork 371
[fix] bandit assert warnings #3243
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## dev #3243 +/- ##
==========================================
- Coverage 60.45% 60.27% -0.19%
==========================================
Files 111 111
Lines 14529 14583 +54
==========================================
+ Hits 8784 8790 +6
- Misses 5745 5793 +48 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
804b91b to
5c5814d
Compare
Co-authored-by: dni ⚡ <[email protected]>
Summary
Python’s assert statement is meant for debugging, not production security checks. The issue is that:
- When Python runs in optimized mode (with
-Oor-OO), all assert statements are stripped out at compile time.- That means any logic relying on assert will not run in production if the interpreter is optimized — potentially skipping critical checks.
Depends on: #3242