Description
Modules/main.c:pymain_repl
should fire cpython.run_stdin
like Modules/main.c:pymain_run_stdin
to allow administrators to log/block interactive use. Maybe that event firing should be moved all the way to _PyRun_InteractiveLoopObject
, but its only other use is with PyRun_InteractiveLoopFlags
, which is embedded, so not clear we want that. Therefore, pymain_repl
is now the clear choice. Affected versions: Python 3.8+.
Similarly, the asyncio REPL didn't emit any audit events related to interactive use. Affected versions: Python 3.8+.
Note that code.InteractiveConsole
also doesn't fire interactive use audit events, but my thinking here is that this is an end-user API, so the user can choose to fire that event if they want to. Similar case to PyRun_InteractiveLoopFlags
.
This will require a separate fix for 3.8 - 3.12.
Linked PRs
- gh-121957: Emit audit events for
python -i
andpython -m asyncio
#121958 - [3.13] gh-121957: Emit audit events for
python -i
andpython -m asyncio
(GH-121958) #122115 - [3.12] gh-121957: Emit audit events for python -i and python -m asyncio #122117
- [3.11] gh-121957: Emit audit events for python -i and python -m asyncio #122118
- [3.10] gh-121957: Emit audit events for python -i and python -m asyncio #122119
- [3.9] gh-121957: Emit audit events for python -i and python -m asyncio #122120
- [3.8] gh-121957: Emit audit events for python -i and python -m asyncio #122121
Metadata
Metadata
Assignees
Labels
Projects
Status