-
-
Notifications
You must be signed in to change notification settings - Fork 31.9k
bpo-37363: Add audit events on startup for the run commands #14524
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
Fantastic! This simplifies one of my PoCs for EP a lot. Are these all entry points or is there another entry point for embedded Python interpreters? |
There are definitely more entry points, but if someone else is embedding it then they have full control and audit hooks won't help :) |
@@ -905,6 +905,12 @@ always available. | |||
read, so that you can set this hook there. The :mod:`site` module | |||
:ref:`sets this <rlcompleter-config>`. | |||
|
|||
.. audit-event:: cpython.run_interactivehook hook sys.__interactivehook__ |
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.
I don't understand the audit-event syntax. The event takes one argument (hook), but the audit-event has two arguments. What's going on here?
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.
I need to document the syntax somewhere...
Basically, it's:
.. audit-event:: event-name list,of,comma,separated,args anchor
Where the anchor is used for the backlink from the generated table (which appears to not be generating right now...).
I can't repro the Azure Pipelines failures locally (on Windows or Ubuntu), so I'm guessing it's environment related. Making one more guess before I start adding lots of diagnostic info :) |
Thanks @zooba for the PR 🌮🎉.. I'm working now to backport this PR to: 3.8. |
GH-14536 is a backport of this pull request to the 3.8 branch. |
https://bugs.python.org/issue37363