Repository navigation
Audit winreg key queries before OS calls - #9593
Conversation
Emit CPython query events and preserve UTF-16 input semantics, including lone surrogates and NUL rejection. Assisted-by: dot:frontier-intelligence
|
Caution Review failedThe pull request is closed.
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. |
Merging this PR will not alter performance
Comparing Footnotes
|
| fn QueryValue(key: HKEYArg, sub_key: Option<String>, vm: &VirtualMachine) -> PyResult<String> { | ||
| fn QueryValue( | ||
| key: HKEYArg, | ||
| sub_key: Option<PyRef<PyStr>>, |
There was a problem hiding this comment.
is this better than below?
| sub_key: Option<PyRef<PyStr>>, | |
| sub_key: Option<Wtf8Buf>, |
Apply maintainer review while preserving conversion and audit behavior. Assisted-by: OpenAI Codex:model version unavailable
Keep the reviewed WTF-8 input and audit order while retaining surrogate-safe QueryValue output. Assisted-by: OpenAI Codex:model version not exposed
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
Summary
winreg.QueryInfoKeyandwinreg.QueryValueaudit events after argument conversion and before registry operations.QueryValue, convert the requiredstr | Nonesubkey through UTF-16 before auditing and before the performance-data check, preserving lone surrogates and rejecting trailing or embedded NULs.This does not address all winreg audit events or claim complete parity. Generic invalid-subkey type-error wording remains outside this change. The current-main reconciliation preserves the newer surrogate-safe PyStr return alongside the reviewed Wtf8Buf input and audit order. #9586 separately fixes the HKEY converter; #9589 addresses
QueryValueEx.Validation
PC/winreg.cand its generated Clinic code, including event arguments and conversion order.prekhooks andgit diff --checkpassed.