Repository navigation
Conversation
SonarCloud's only vulnerability on main, the blocker failing its quality gate, was a path read from the directory materialize_sync_profile returns. The example now reads it only when it resolves inside the cache it made.
Justified broad excepts and post-await identity re-checks are annotated where the reason already lives; duplicated labels became constants; the smaller findings (redundant except classes, loop lambdas, a nested conditional, an unused parameter, union syntax, one complex function) are fixed without changing behaviour.
Composite assertions are split one condition per assert, pytest.raises blocks keep only the call expected to raise, and three smaller test style findings are fixed; every changed test still passes.
SonarCloud kept the path-traversal finding on read_bytes() into write_bytes() despite the containment check; a file copy keeps the generation's content out of the example entirely.
SonarCloud still read the list-then-all() form as a comprehension passed to all(); an explicit loop keeps every UTF-16 unit posted after a failure.
With accept_viewer_audio_opus on, the host played an incoming viewer audio track as soon as it arrived. A peer still waiting on the Accept/Reject prompt could be heard on the host's speakers for as long as the prompt stayed open, and audio played even with allow_audio off. The receiver now asks an admission gate before every frame; the host gates on the same authenticated-and-allow_audio rule the PCM mic channel uses.
absolute_path accepted anything is_absolute() did, including \host\share and \.\pipe\ names. A profile pointing its config or image at a remote share made the helper send the runtime account's NTLM credentials there, and a pipe name connected to whoever created it first. Pinned paths now have to be local drive paths without parent segments, the rule the browser helper interpreter path already follows; the UI fixture image uses it too.
The image lease kept the file's bytes fixed, but CreateProcess resolves the path again by name and the loader searches the image's directory for DLLs. Another local account that could change an ancestor directory could swap in a junction after the lease or plant a DLL beside the image, and the code ran before the post-launch check noticed. The lease now refuses a path unless every directory from the drive root down is a real directory no other account may rename, delete, re-link, re-ACL or add files to, and the leased handle's final path is the requested one. Fixture children also start in the image's directory with an allow-listed environment and a system-only PATH, so the host's API keys, tokens and user PATH entries no longer reach them.
…r imports ReadOnlyWorker._guard still took three arguments after NativeWorker started passing the request and semantic flag, so a read-only helper raised TypeError instead of refusing, and mypy rejected the override. Scoped UIA checked the runtime before and after every COM call. The check after one call and the one before the next had nothing between them, and each is a durable write, so the managed UIA test ran past the 120 s timeout on Windows. A check now follows every call, with one before the first, which still separates any two native calls. The Docker job installed je_auto_control_dev from PyPI over the image's package, and helpers started with python -I ran that older copy. The job now installs the mounted checkout in its place.
…full package On Windows before Python 3.13, time.monotonic ticks every 15.6 ms, so a stale capture, its acceptance and a new capture could share one timestamp and the ordering and containment checks could not tell them apart. Every producer and checker of capture timestamps now uses time.perf_counter, which is the same clock on Linux and macOS. je_auto_control_dev on PyPI is a snapshot without utils/agent_runtime. Installing it in the Docker job overwrote the image's package, and helpers started with python -I then failed to import their own module. The job now installs the dev requirements without it.
The runtime checkpoints every read step with a durable write, and the probe's 1 s default ran out on an ubuntu runner under load. This test covers the read-apply-verify flow; reader deadlines have their own tests.
Captures are now ordered on time.perf_counter. The helper fixture still stamped them with time.monotonic, which on Windows before Python 3.13 is a different clock, so every capture looked outside the read request.
A UIA capture makes thousands of read-only COM calls, and each full runtime checkpoint is a durable budget write plus authority queries, so a managed observation still ran past the 120 s test timeout on a Windows runner after the duplicate checks were removed. Every call now re-checks the pinned task and owner, and the full checkpoint runs at most every 50 ms. The unthrottled checkpoint after the capture runs before anything is published, so a revocation is still seen first.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Clears the SonarCloud findings on
mainafter 1.2.2: the quality gate failure and the 271 new-code code smells.Quality gate
The gate on
mainwasERRORon one condition,new_security_rating= 5, caused by one blocker vulnerability:pythonsecurity:S2083(path traversal) inexamples/sync_workspace.py. The example now resolves the cache rootand reads the generated
workspace.inionly when it is inside that cache (is_relative_to), otherwise it raisesConfigSyncError. Output is unchanged.Product code (69 findings)
all are re-raised later. Narrowing them would lose control signals such as asyncio's
CancelledError, so eachis annotated
# NOSONARbeside its existing# reason:.awaitorclose()that can replace the field.These are kept and annotated.
Union[...]hints: these becameA | B. Built-in MCP tool schemas are explicit, so no schemachanged; there are still 820 tools.
functools.partial;stop_resourcenow notes itslabelon the error it re-raises;post_keystill posts every UTF-16 unit;Tests (202 findings)
pytest.raisesblocks now contain only the call expected to raise.Verification
without
--extras, ruff and bandit are clean, and the complexity, broad-except and file-length gates pass.Records:
docs/updates/2026-11-b.md, U-20261117-04 to -07.Merging releases the next patch to PyPI through
stable.yml.