Repository navigation
Conversation
cargo-audit fails on every PR: zip 2.4.2 in elastos/Cargo.lock and in capsules/object-provider/Cargo.lock (through its elastos-server path dependency) has three advisories against ZipArchive::extract and the stream extract API. The runtime calls neither; it reads each entry itself. zip 9.0.4 is the patched release. - elastos-server uses zip 9.0.4, still without default features. 9.x has no separate flate2 feature; deflate-flate2 now enables the dependency. - Both lockfiles change only for zip: nix 0.31.3 and typed-path come in, derive_arbitrary goes. `cargo update -p zip` also moved unrelated range dependencies (windows-sys, getrandom); those lines stay as they were, and `cargo metadata --locked` accepts both files. - ZipFile::name now returns a Result. The ZIP readers report an error as "invalid ZIP archive entry". - Whole-archive extract keeps its rule for entry names. zip 9 enclosed_name turns "/a.txt" into "a.txt" and folds "x/../a.txt" into "a.txt", so an entry that extract refuses today would be written. The runtime now checks the name with the rule zip 2.x applied: no NUL byte, no root or drive prefix, no climb above the archive root. test_library_provider_extract_zip_refuses_absolute_dotdot_and_symlink_entries covers absolute, "..", inner "..", backslash and symlink entries. It passes on zip 2.4.2 and with this change, and fails on the Absolute.zip case when extract uses zip 9 enclosed_name. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01W6Qn9RX7LDqrwiAfNC2F2K
… the run The finite-memory observer and the model-repair control thread caught every exception and kept only a fixed code, so a failed job said "installed Runtime exited before health" or "finite installed UI journey failed" and nothing else. The uploaded installed-journeys.json now carries the phase (census, stage request, engine stage, deadline), the exception type, a bounded one-line message, and whether the Runtime process had already exited. The same text follows the CI log line. Only harness-written messages go in; the Runtime log stays private. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01W6Qn9RX7LDqrwiAfNC2F2K
…downloading it Every installed-journey run downloaded LICENSE-2.0.txt from apache.org, and a 503 there failed ARM CI (run 38899867022). The pinned text now lives at scripts/fixtures/licenses/Apache-2.0.txt with the same size and SHA-256 as the fixture pin. pinned-model-consumer-proof.sh and ci-model-package.mjs produce check the vendored bytes against the pin, copy them, and check the copy. A changed vendored file stops the run before the model download, and there is no network fallback. The Qwen fixture keeps its pinned Hugging Face revision. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01W6Qn9RX7LDqrwiAfNC2F2K
zip 9 for RUSTSEC-2026-0367/0368/0369 so cargo-audit passes Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01W6Qn9RX7LDqrwiAfNC2F2K
…fore the receipt is saved observer_failure() copied str(error) into installed-journeys.json and the CI log line. An OSError names the file it failed on, so the runner home, the journey Home and its data folder could reach an uploaded artifact. One redact() now runs on the message before it is bounded. It replaces the journey Home, its data folder (which can hold a space on macOS) and $HOME first, then file: URLs, ~ paths, drive paths and any other absolute path, with <path>. Only a last part that looks like a harness file (request.json, memory.events) stays. It also replaces the value after Bearer/Basic/Token and after secret-named keys (token=, password:), the key part of a DID, and long hex/base64/base58 runs. Phase, type and runtime_exited are unchanged. A new policy test puts a home path, a data path with a space, other absolute paths and tokens in both the finite observer and the repair control failure, and checks the saved receipt, the repair record and the CI log line hold none of them. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01W6Qn9RX7LDqrwiAfNC2F2K
|
Generated by Claude Code |
|
Round 3 review: fixes needed (C+). Policy tests pass. |
…paths and paths with spaces redact() kept the user and password in scheme://user:pass@host, did not know \\server\share, //server/share, \\?\C:\ or \\.\pipe\ paths, and cut an unknown path at its first space, so "/Volumes/Backup Disk/ci-person" left "Disk/ci-person" in the receipt. The user part of any URL is now replaced (http://<redacted>@127.0.0.1:8090/). Network, device and drive paths (either slash) start a path. A path now runs until a mark that ends a path in an error message: a quote, a bracket, a comma, a semicolon, a pipe, a line end, or a colon followed by a space. Spaces inside stay in the path. A path with no such mark after it takes the rest of the text: losing words is better than leaking a folder name. A new policy test checks 13 such causes (all 13 fail on the old rules) and that a plain URL and a cause with no path are kept. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01W6Qn9RX7LDqrwiAfNC2F2K
|
Generated by Claude Code |
|
Round 4 at 269bbe1: fixes needed (C+). URL user info, UNC and space paths now redacted. |
develop's finite observer (#433) keeps its fixed-message list, its validated stage names and its public error type names. This branch keeps runtime_exited, runtime_exited_before_cleanup, the repair control failure and redact() for that repair text. Both observers now name the error type from one shared list (PUBLIC_ERROR_TYPES). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01W6Qn9RX7LDqrwiAfNC2F2K
…escaped keys
redact() kept the value in {"token":"x"}, {'password': 'p'} and
\"token\":\"x\", because the secret-key rule only matched a bare key.
One rule (SECRET_VALUE) now matches a bare, quoted or JSON-escaped
secret-named key before = or :, and redacts a quoted value up to its
own closing quote (or the line end when there is none). The auth-scheme
rule no longer takes "=" as the value in "token = x", which left x.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01W6Qn9RX7LDqrwiAfNC2F2K
|
Generated by Claude Code |
develop's finite observer saves only fixed messages, but its message and phase did not pass redact(). A message or phase added to that list later could carry a path or a secret value into the receipt. Both now pass redact() with the journey Home and data folder; every current fixed message is saved unchanged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01W6Qn9RX7LDqrwiAfNC2F2K
Use the installed System fixture for valid and invalid Home-link requests so the test exercises link authority on every host. Keep all assertions and production launch checks unchanged. Verified the exact Home-link test passes, reverting only the System token to Browser fails the intended 403-versus-200 assertion, and restoring the fixture passes again. Co-authored-by: Codex (cherry picked from commit 619c096)
|
Generated by Claude Code |
|
Generated by Claude Code |
develop now carries its own fix for the #430 Home link test (bfefe92: the test uses Library, which every platform launches). This branch had ported #411's 619c096 for the same test (System instead of Browser), and the two edits conflicted in gateway_tests/home_system.rs. That port was this branch's only change to the file, so the file is taken from develop; 04b621d's change is superseded. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01W6Qn9RX7LDqrwiAfNC2F2K
|
Merged develop ( Generated by Claude Code |
Summary
Head:
9849af79. Three CI changes, plus a merge of the zip 9 branch so CI can run and two merges ofdevelop. Each one makes installed-journey failures easier to diagnose, keeps local data out of uploaded receipts, or removes a failure source outside the repository. There is one commit for each concern.What this branch carries:
2e70c052: the receipt names the observer failure (1 below).1ba344a6: the SmolLM2 proof uses a vendored license (2 below).493f40ed: the observer failure text is redacted before it is saved (3 below).269bbe19: the redaction also covers URL user info, Windows network and drive paths, and paths with spaces (3 below).d241d0f6: the redaction also covers secret values under quoted and JSON-escaped keys, such as{"token":"x"}(3 below).11b579ee: the finite observer'smessageandphasefields from develop also go throughredact()(see "Merge with develop").04b621d0: port (cherry-pick-x, author SashaMIT) of619c0961from Reclaim completed Browser bridge workers and preserve finite shutdown #411, "Use a platform-neutral app in Home link regression". See "Ported test fix" below.69e2bae3: merge offix/zip-9-rustsec(756dad1c, zip 9.x for RUSTSEC-2026-0367/0368/0369, PR deps: move zip to 9.x for RUSTSEC-2026-0367/0368/0369 #417). It must land first. Remove it from this diff when reviewing.e1de6e52: merge oforigin/developat8ea4aac9. It conflicted with develop's finite observer work (cd620ab5, Installed journeys in source-home-linux (ubuntu-24.04) fail intermittently, on develop too #433). See "Merge with develop" below.9849af79: merge oforigin/developatbfefe92f. develop fixed the Chat and app web links require Home confirmation of the exact destination (0.8.0 F1 gate) #430 Home link test itself (it uses Library); that conflicted with the port in04b621d0(System), which was this branch's only change togateway_tests/home_system.rs, so the file is taken from develop and the port is superseded.Ported test fix (
04b621d0)After the develop merge,
test-elastosfailed on11b579ee(run 39084029014, job 117548156624) in develop's own testhome_system::home_external_link_names_the_launched_app_and_the_exact_address(#430):assertion left == right failed: home launch token is not authorized for this provider, left: 403, right: 200athome_system.rs:11964. The test launches Browser, and Browser is not a launchable provider on a host without it (the CI runner, and this Linux machine). develop's owntest-elastosnever ran at8ea4aac9(its run was cancelled). #411's619c0961already fixes the test by using System, which every host can launch; assertions and production checks are unchanged. Reproduced locally before the port (same 403 vs 200 at :11964) and passing after it (2 passed; 0 failed). It no-ops once develop carries the same fix.Superseded by
9849af79: develop's own fix (bfefe92f, Library) is now in the branch. At9849af79:home_external_link2 passed,ci-release-policy-test.py119 OK,git diff --checkclean.Merge with develop (
e1de6e52,11b579ee)develop's
cd620ab5(#433) also records a finite observer failure, with a stricter rule. The merge keeps both sides:FINITE_OBSERVER_MESSAGESandfinite_observer_failure(). The finite observer saves only a fixed harness message; any other text becomesobserver detail redacted, and itsstr()is never called. The phase names only a validated stage action (stage_engine_running, ...), elsestage_request. The new group-exit waits inaction()are unchanged.runtime_exitedin the finite failure,runtime_exited_before_cleanupinfinish(), the repaircontrol_failure(RepairRuntime.observe()), andredact().11b579ee):finite_observer_failure()passes itsmessageandphasethrough the sameredact()with the journey Home and data folder, so a message or phase added to develop's list later cannot carry a path or a secret value out. Every current fixed message is saved unchanged (tested).PUBLIC_ERROR_TYPES(develop's list, moved to module level). A type not on the list is saved asredacted.test_observer_failure_redacts_home_paths_and_tokens_before_the_record_is_savednow expectsobserver detail redactedfor the finite receipt and CI log line (develop's rule), and still checks the redacted forms in the repair record.1. The receipt names the observer failure (
2e70c052)FiniteRuntime.observe()andRepairRuntime.observe()inscripts/ci-installed-journeys.pycaught every exception and kept only a fixed code (finite_resource_observation_failed/installed_model_repair_control_failed). So the job log ended withRuntimeError: finite installed UI journey failed(run 38899842659, job 116995610376) orinstalled Runtime exited before health, and the cause was gone.Now:
phase(census,stage_request,stage_<action>,deadline), the exceptiontype, a fixedmessage(develop's list), andruntime_exited, read from the Runtime pidfd. Acensusfailure that says "Runtime left its unit" withruntime_exited: truemeans Runtime ended. Any other census message names the check that failed while Runtime was still alive.FiniteRuntime.finish()writes this asfinite_memory.observer_failure(andruntime_exited_before_cleanup) intoinstalled-journeys.json. CI already uploads that file. The repair thread writesmodel_repair.control_failurefromobserver_failure(): phase, type and a bounded, redacted one-line message.wait_healthyand the finite UI journeyRuntimeError.journey-runtime.private.log, unchanged). Only messages the harness writes itself go in, and no observer reads that log. A test confirms that a line from the private log does not appear in the receipt.2. The license comes from the repository (
1ba344a6)scripts/pinned-model-consumer-proof.sh --fetchdownloadedhttps://www.apache.org/licenses/LICENSE-2.0.txton every run. In ARM run 38899867022 (job 116983440588), apache.org returned 503 four times and the job failed:Now:
scripts/fixtures/licenses/Apache-2.0.txtcontains the pinned text: 11358 bytes, sha256cfc7749b…3d30. It is byte-identical to the apache.org download and to Debian's/usr/share/common-licenses/Apache-2.0.scripts/pinned-smollm2-fixture.json, the license haspathin place ofurl.copy_vendored) andci-model-package.mjs produce(copyVendored) check the vendored bytes against the pin, copy them, and check the copy again. The license check runs before the model download. There is no network fallback.loadFixtureaccepts exactly one license source: the pinned Hugging Face revisionLICENSE(Qwen, unchanged) or the one vendored Apache path.3. The failure text is redacted before it is saved (
493f40ed,269bbe19,d241d0f6)An
OSErrornames the file it failed on, sostr(error)could put the runner home, the journey Home or its data folder into the uploaded receipt and the CI log line. Oneredact()(scripts/ci-installed-journeys.py, aboveobserver_failure) runs on the repair control message (observer_failure()) and on the finite observer's message and phase (finite_observer_failure()), each with its own Home and data folder.scheme://user:pass@host(orscheme://user@host) become<redacted>; the scheme and host stay (http://<redacted>@127.0.0.1:8090/). This runs first (URL_USERINFO).Library/Application Support) and$HOMEare replaced first, longest first. Thenfile:URLs,~/paths, Windows network and device paths (\\server\share,//server/share,\\?\C:\,\\.\pipe\), drive paths with either slash (C:\Program Files,C:/Users) and any other absolute path (PATH_START). Each becomes<path>. Only a last part that looks like a harness file stays (<path>/request.json,<path>/memory.events), from a fixed list of suffixes. Any other last part can be a user, device or key name, so it is dropped.http://127.0.0.1:8090/...URLs stay.PATH_STOP,PATH_TAIL): at a mark that ends a path in an error message, which is a quote, a backtick, a bracket,,,;,|, a line end, or a colon followed by a space or the end (open /a b/c: denied). Spaces inside stay in the path, so/Volumes/Backup Disk/ci-person (exit 2)becomes<path> (exit 2). A path with no such mark after it takes the rest of the text with it: losing words is better than leaking a folder name.SECRET_VALUE, new ind241d0f6; it replaces the bare-key rule that was inREDACTIONS): one rule fortoken,password,api_key,access_token,client_secret,session, ... whether the key is bare, single- or double-quoted, or JSON-escaped (\"token\":\"x\"), with=or:and any spaces. A quoted value is redacted up to its own closing quote with no backslash before it, so an escaped quote inside it ("a\"b c") does not end it; with no closing quote, the rest of the line goes. A bare value ends at a space, a quote,,,;,}or]. The key and the keys after it stay readable:{"access_token":"<redacted>","phase":"stage_engine_running"}.Bearer/Basic/Tokenbecomes<redacted>. Sinced241d0f6this rule does not take=or:as the value, which leftx9intoken = x9.<redacted>. That includes digests and unit ids; a failure message does not need them.did:key:<redacted>. A DID names a key, so it can name a person or a device.Tests
scripts/ci-release-policy-test.py:FiniteInstalledJourneyTests.test_finite_observer_failure_names_its_phase_type_message_and_runtime_exit: three cases (Runtime left its unit, census check failed while alive, stage deadline).test_finite_observer_failure_reaches_the_uploaded_installed_journey_receipt: realrun(),wait_healthy,poll()andfinish(), with the message checked ininstalled-journeys.json.cd620ab5), kept:test_finite_observer_saves_phase_type_and_only_public_messages,test_finite_observer_stage_phase_uses_only_validated_action_textand the engine group-exit tests.test_finite_observer_fixed_messages_and_phase_still_pass_redaction(negative, new in11b579ee): every message inFINITE_OBSERVER_MESSAGESis saved unchanged; a message and phase added to the list with{"token":"..."}and a$HOMEpath come out as{"token":"<redacted>"}and<path>. With the tworedact(...)calls in thefinite_observer_failure()return reverted to plainphase/message[:480], it fails:AssertionError: 'finite journey control said {"token":"tq-41"} at /home/ci-person/x' != 'finite journey control said {"token":"<redacted>"} at <path>'.test_repair_control_failure_reaches_its_recordandtest_observer_failure_text_is_bounded_and_single_line.test_observer_failure_redacts_home_paths_and_tokens_before_the_record_is_saved(negative): a failure message with$HOME, a data path with a space, other absolute paths, afile:URL, a Bearer token,token=/password:values, a sha256, adid:key, a base64 run and (sinced241d0f6){"token": "q-secret-9"}goes through the real finite observer,run()andfinish(), and through the repair control thread. The savedinstalled-journeys.json, the repair record and the CI log line hold none of them.test_observer_failure_redacts_url_user_info_windows_network_paths_and_paths_with_spaces(negative,269bbe19): 13 causes throughobserver_failure(), none under a known root. Withscripts/ci-installed-journeys.pyput back to493f40ed, all 13 fail.test_observer_failure_redacts_secret_values_under_quoted_and_escaped_keys(negative, new ind241d0f6): 12 causes throughobserver_failure(), each checked against its exact saved text:{"token":"x"},{"api_key": "abc9"},{'password': 'p4ss'},"secret" : "s-9 9",\"token\":\"xq7\",{"access_token":"at1","phase":"stage_engine_running"}, an escaped quote inside a value, a doubly escaped value,"client_secret" = 'c c', a value with no closing quote,token = x9and{token:k5}. With the twoREDACTIONSlines inscripts/ci-installed-journeys.pyreverted (theSECRET_VALUEentry put back to the old bare-key rulere.compile(rf"\b({SECRET_NAME})(\s*[=:]\s*)(?!(?:Bearer|Basic|Token)\s)(['\"]?)[^\s'\",;]+\3", re.I), and(?[=:])taken out of the auth-scheme rule), all 12 cases fail, for exampleAssertionError: '{"token":"x"}' != '{"token":"<redacted>"}'andAssertionError: 'token <redacted> x9 then' != 'token = <redacted> then', and the home-paths test fails with'q-secret-9' unexpectedly found in ....PinnedModelProofLicenseTests: runs the real proof script with acurlthat records any call. The good copy is verified and copied with no curl call. A tampered copy (same size, appended, empty) is refused before copy or download.scripts/ci-model-package.test.mjs:copyVendoredrefuses a tampered vendored file and writes nothing.loadFixturerefuses an apache.org URL, an escaping path, or both sources at once.11b579ee, locally on Linux:ci-release-policy-test.py119 OK.git diff --check,check-product-data(+ its 99 tests) andpublic-copy-entropy-checkare clean. At04b621d0:cargo test -p elastos-server --lib -- home_external_link2 passed (it failed with 403 vs 200 before the port),cargo fmt --checkclean. No Rust is changed by this PR's own commits other than the ported test. CI on9849af79is pending.Gaps
ci person/keys) can still pass. A secret-named word in plain text (session: 3) loses the word after it. An unquoted path with no end mark after it removes the rest of the message. The harness writes these messages itself, so this is a second line of defence, not the only one.ELASTOS_PROOF_LICENSE_PATHstill lets an operator pass their own license file. It is verified against the same pin.elastos/.cargo/audit.tomlignores RUSTSEC-2026-0367/0368/0369 for zip 2.4.2. With the zip 9 merge this branch has zip 9.0.4, so that ignore no longer applies here; removing it belongs to deps: move zip to 9.x for RUSTSEC-2026-0367/0368/0369 #417/Upgrade zip to 9.x in elastos-server and remove the cargo-audit exception (RUSTSEC-2026-0367/0368/0369) #414.fix/zip-9-rustsecmay have moved since the merge here. It is not merged again, to keep this diff small.Generated by Claude Code