-
Notifications
You must be signed in to change notification settings - Fork 58
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
Fix typing in more places and configure mypy to follow imports #3932
Conversation
This Pr is going to cause a lot of merge conflicts with Donny's new boefjes / container work I think. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me
I assume you mean #3859 with that, but I just tried merging this branch into that branch and the only conflicts I got were the ones that already are there with current main. |
Checklist for QA:
What works:
What doesn't work:See below, two boefjes throw an error. Bug or feature?:CWE finding types
DNS Software version
|
Both errors seem not be related to this PR.
Seems to be an error related to a CWE ID not being found in our local database. Perhaps the database is out of date and is now fixed by #3943?
This error seems to be a runtime error that's not caught (either a network error while reading the socket, or abrupt closure of the connection by the remote service) |
We should probably also catch the exception of the get() on the none or by doing a proper lookup of the expected key. Not being able to hydrate this CWE should be visible by telling the user we don't have information for the given CWE. |
A raw file could help debugging this |
Quality Gate passedIssues Measures |
* main: (21 commits) Bump django from 5.0.9 to 5.0.10 in /rocky (#3940) Do not let enabling plugins affect the global plugin cache (#3944) Fix typing in more places and configure mypy to follow imports (#3932) Updates CWE archive to 4.16 (#3943) Report flaws (#3880) Translations update from Hosted Weblate (#3939) Fix report recipe API (#3942) Boefje runonce functionality in scheduler (#3906) fix: 🔨 do not store CDN findings (#3931) Dont check for Locations on local Ip's. (#3894) add unpkg.com to disallowed hostnames in CSP (#3927) Update website_discovery.py (#3921) Add export http boefje (#3901) Bump python-multipart from 0.0.9 to 0.0.18 in /bytes (#3925) Fix layout issues on scheduled reports page (#3930) Create scheduled report with zero objects selectable (#3907) Improve the KATalogus `/plugins` endpoint performance (#3892) Add bgp.jsonl and bgp-meta.json to .gitignore (#3928) Update pre-commit and all hooks (#3923) add support for detecting Lame dns delegations on ip ranges (#3899) ...
Changes
This contains a lot of fixes for missing or in some cases wrong typing. There are also a few small bugfixes in cases where there was a missing check for None.
Mypy is configured to follow imports now which means it will be able to catch a lot more issues. Only pydantic imports are not followed because that would generate too many errors.
Checklist for code reviewers:
Copy-paste the checklist from the docs/source/templates folder into your comment.
Checklist for QA:
Copy-paste the checklist from the docs/source/templates folder into your comment.