-
Notifications
You must be signed in to change notification settings - Fork 46
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
Consider avoiding assert
statements in validate_config.py
#683
Comments
assert
statements in validate_config.py
I'd be happy to help with this. Would we need a small helper function that tests for truth and exits on false? |
That's right, simply refactoring the logic not to use |
I was thinking along the same lines. I think I'd make all those functions return a |
Planning to investigate config validation in the near future, will take this ticket on as a first step. |
Informational finding
TOB-SDW-024
from the 2020 SecureDrop Workstation audit (PDF) notes thatassert
statements are optimized out if Python is ever run with the-O
or-OO
flags and recommends eventually factoring them out in favor ofif
conditions and custom exceptions invalidate_config.py
, which is not test code but used during the installation.The text was updated successfully, but these errors were encountered: