-
-
Notifications
You must be signed in to change notification settings - Fork 31.9k
Additional PEP578 hooks #81544
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
Comments
We should also (see whether we should) add audit hooks for the following modules:
All of these seem likely to have interesting events (specifically, they can all be misused in scenarios where the impact would not be obvious without extra information). |
PR 14301 has at least a few hooks for most of the modules above. I think xmlrpc deserves some, but it is not as immediately obvious where to put them as for the other modules. smtpd also still needs looking at. |
I'll add hooks to ssl module for wrap_socket and wrap_bio. |
FWIW, I tried looking into how we can prevent or detect monkeypatching of "sys.audit", and the answer seems to be that we need to define a custom type for the sys module and for sys.__dict__. I'm not prepared to do that yet, and IMHO there are enough way to detect someone patching it to nothing (all your logs disappear) or patching it more cleverly (someone ran some pretty complex code to redefine it) and events from native code can't be suppressed either, so I think it's fine. But I won't refuse a contribution if someone thinks this is a critical scenario (though I will push hard to make sure the implementation is solid, as I think this is pretty hard to get right). |
All that's left here right now is some xmlrpc events, unless we can think of any more stdlib modules that should have them? |
@christian, I have merged your PR for the audit events, but I have not closed this issue, I suppose there will be other PRs for this issue. |
Hi @christian, When you have time for my last question. Thank you, |
the http module is covered by the audit events |
@zooba, can we close this? |
http.client
module #21321Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: