classification
Title: Some audit events are undocumented
Type: enhancement Stage: resolved
Components: Documentation Versions: Python 3.10, Python 3.9, Python 3.8
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: docs@python Nosy List: akuchling, christian.heimes, docs@python, gousaiyang, miss-islington, steve.dower
Priority: normal Keywords: patch

Created on 2020-07-02 06:27 by gousaiyang, last changed 2020-10-20 20:10 by akuchling. This issue is now closed.

Pull Requests
URL Status Linked Edit
PR 21308 merged gousaiyang, 2020-07-04 00:47
PR 21310 merged gousaiyang, 2020-07-04 02:04
PR 22767 merged miss-islington, 2020-10-19 14:53
PR 22768 merged akuchling, 2020-10-19 15:43
PR 22770 merged miss-islington, 2020-10-19 18:05
PR 22820 merged miss-islington, 2020-10-20 14:41
PR 22821 merged akuchling, 2020-10-20 14:59
PR 22831 merged miss-islington, 2020-10-20 19:23
PR 22832 merged miss-islington, 2020-10-20 19:23
Messages (15)
msg372806 - (view) Author: Saiyang Gou (gousaiyang) * Date: 2020-07-02 06:27
Currently the following audit events are not documented on docs.python.org:

- _winapi.CreateFile
- _winapi.CreateJunction
- _winapi.CreateNamedPipe
- _winapi.CreatePipe
- _winapi.CreateProcess
- _winapi.OpenProcess
- _winapi.TerminateProcess
- ctypes.PyObj_FromPtr
- object.__getattr__
- object.__setattr__
- object.__delattr__
- function.__new__
- setopencodehook
- builtins.id
- os.walk
- os.fwalk
- pathlib.Path.glob
- pathlib.Path.rglob

I'm going to create a PR to add them to the documentation. However, for `_winapi` events and `ctypes.PyObj_FromPtr`, I cannot find corresponding sections in the documentation to put the `audit-event` rst directive. How should we document them and make them show up in the audit events table?
msg372807 - (view) Author: Saiyang Gou (gousaiyang) * Date: 2020-07-02 06:51
Update: `os.walk`, `os.fwalk`, `pathlib.Path.glob` and `pathlib.Path.rglob` are added and documented in 3.9.
msg372964 - (view) Author: Steve Dower (steve.dower) * (Python committer) Date: 2020-07-03 21:58
Maybe we need to add a page for "undocumented" events? I really don't want to document the _ctypes or _winapi modules - those should remain internal-only.

Maybe we can add a section to the end of the audit_events.rst file for "other events"? The generation of that page happens in two separate passes, so it should be safe enough.

It might even be possible to just provide the events and specify "" instead of the anchor to disable the backlink completely? I don't remember whether I coded that up or not.
msg372972 - (view) Author: Saiyang Gou (gousaiyang) * Date: 2020-07-04 00:51
I've created PR 21308 for this. BTW, is issue 39567 (`os.walk`, `os.fwalk`, `pathlib.Path.glob` and `pathlib.Path.rglob`) intentionally not backported to 3.8?
msg378294 - (view) Author: Saiyang Gou (gousaiyang) * Date: 2020-10-08 23:39
Hi Steve. If you had time could you review PR 21308, PR 21310 and PR 21322? Thanks!
msg378951 - (view) Author: A.M. Kuchling (akuchling) * (Python committer) Date: 2020-10-19 14:53
New changeset ebc8c3828779374b9be4fae5c8ffc0059d36ac8c by Saiyang Gou in branch 'master':
bpo-41192: Fix some broken anchors for audit event entries (#21310)
https://github.com/python/cpython/commit/ebc8c3828779374b9be4fae5c8ffc0059d36ac8c
msg378956 - (view) Author: A.M. Kuchling (akuchling) * (Python committer) Date: 2020-10-19 15:39
New changeset 2ee6ef98b4cf94f4c21cc4301d4e226b70809c7e by Miss Skeleton (bot) in branch '3.9':
bpo-41192: Fix some broken anchors for audit event entries (GH-21310) (GH-22767)
https://github.com/python/cpython/commit/2ee6ef98b4cf94f4c21cc4301d4e226b70809c7e
msg378986 - (view) Author: A.M. Kuchling (akuchling) * (Python committer) Date: 2020-10-19 18:52
New changeset ec18c468b8aed4b4a3d1942ae18b96d8efebe04b by Miss Skeleton (bot) in branch '3.8':
bpo-41192: Fix some broken anchors for audit event entries (GH-21310) (GH-22770)
https://github.com/python/cpython/commit/ec18c468b8aed4b4a3d1942ae18b96d8efebe04b
msg379134 - (view) Author: A.M. Kuchling (akuchling) * (Python committer) Date: 2020-10-20 14:41
New changeset 0c37269be7065b9b15b7b3a4406084f9535a793a by Andrew Kuchling in branch 'master':
bpo-41192: Clarify the sys module's description of the auditing feature (GH-22768)
https://github.com/python/cpython/commit/0c37269be7065b9b15b7b3a4406084f9535a793a
msg379140 - (view) Author: A.M. Kuchling (akuchling) * (Python committer) Date: 2020-10-20 15:15
New changeset a797fd74fe11ef5968b8593b0d39b6aa6ba5aef1 by Miss Skeleton (bot) in branch '3.8':
bpo-41192: Clarify the sys module's description of the auditing feature (GH-22820)
https://github.com/python/cpython/commit/a797fd74fe11ef5968b8593b0d39b6aa6ba5aef1
msg379142 - (view) Author: A.M. Kuchling (akuchling) * (Python committer) Date: 2020-10-20 15:37
New changeset b948d13ec076e757b7f6904aa67df2f36e4671b7 by Andrew Kuchling in branch '3.9':
[3.9] bpo-41192: Clarify the sys module's description of the auditing feature (GH-22821)
https://github.com/python/cpython/commit/b948d13ec076e757b7f6904aa67df2f36e4671b7
msg379156 - (view) Author: A.M. Kuchling (akuchling) * (Python committer) Date: 2020-10-20 19:23
New changeset 3f7e990fd49dbabc1dde41ce58c1bdda9f56ead7 by Saiyang Gou in branch 'master':
bpo-41192: Add documentation of undocumented audit events (GH-21308)
https://github.com/python/cpython/commit/3f7e990fd49dbabc1dde41ce58c1bdda9f56ead7
msg379160 - (view) Author: A.M. Kuchling (akuchling) * (Python committer) Date: 2020-10-20 20:05
New changeset 46130f85381f697dc7f609b2659cc046d2370417 by Miss Skeleton (bot) in branch '3.9':
bpo-41192: Add documentation of undocumented audit events (GH-22831)
https://github.com/python/cpython/commit/46130f85381f697dc7f609b2659cc046d2370417
msg379161 - (view) Author: A.M. Kuchling (akuchling) * (Python committer) Date: 2020-10-20 20:05
New changeset 058affc09f0f105444ec62c880907a512b785b72 by Miss Skeleton (bot) in branch '3.8':
bpo-41192: Add documentation of undocumented audit events (GH-22832)
https://github.com/python/cpython/commit/058affc09f0f105444ec62c880907a512b785b72
msg379162 - (view) Author: A.M. Kuchling (akuchling) * (Python committer) Date: 2020-10-20 20:10
After this flurry of commits, I think everything associated with the issue is now fixed.  

Along the way, I also noticed that the sys.audit() call had disappeared from the glob module (it's now restored) and filed issue #42098 to improve the test suite's checking of audit events.
History
Date User Action Args
2020-10-20 20:10:34akuchlingsetstatus: open -> closed
resolution: fixed
messages: + msg379162

stage: patch review -> resolved
2020-10-20 20:05:59akuchlingsetmessages: + msg379161
2020-10-20 20:05:16akuchlingsetmessages: + msg379160
2020-10-20 19:23:45miss-islingtonsetpull_requests: + pull_request21787
2020-10-20 19:23:36miss-islingtonsetpull_requests: + pull_request21786
2020-10-20 19:23:22akuchlingsetmessages: + msg379156
2020-10-20 15:37:00akuchlingsetmessages: + msg379142
2020-10-20 15:15:15akuchlingsetmessages: + msg379140
2020-10-20 14:59:03akuchlingsetpull_requests: + pull_request21777
2020-10-20 14:41:39miss-islingtonsetpull_requests: + pull_request21776
2020-10-20 14:41:11akuchlingsetmessages: + msg379134
2020-10-19 18:52:34akuchlingsetmessages: + msg378986
2020-10-19 18:05:26miss-islingtonsetpull_requests: + pull_request21732
2020-10-19 15:43:47akuchlingsetpull_requests: + pull_request21731
2020-10-19 15:39:29akuchlingsetmessages: + msg378956
2020-10-19 14:53:04miss-islingtonsetnosy: + miss-islington
pull_requests: + pull_request21730
2020-10-19 14:53:01akuchlingsetnosy: + akuchling
messages: + msg378951
2020-10-08 23:39:16gousaiyangsetmessages: + msg378294
2020-07-04 02:04:55gousaiyangsetpull_requests: + pull_request20462
2020-07-04 00:51:04gousaiyangsetmessages: + msg372972
2020-07-04 00:47:05gousaiyangsetkeywords: + patch
stage: patch review
pull_requests: + pull_request20460
2020-07-03 21:58:08steve.dowersetmessages: + msg372964
2020-07-03 21:15:59christian.heimessetnosy: + christian.heimes
2020-07-02 09:03:49xtreaksetnosy: + steve.dower
2020-07-02 06:51:40gousaiyangsetmessages: + msg372807
2020-07-02 06:27:32gousaiyangcreate