[Kernel][G09] Prove workspace isolation and trusted verification preconditions #50
Labels
No labels
bug
duplicate
enhancement
help wanted
invalid
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Blocks
#59 [Kernel][G11] Own concurrent tasks, workspaces and manual-edit reconciliation
Creatidy/creatidy-kernel
Reference
Creatidy/creatidy-kernel#50
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Goal
Owner: Kernel. Establish and implement an evidence-backed execution/security profile for workers, untrusted tests and reviewers using an existing sandbox, with trusted verification preconditions that prevent rejected scope/gate changes from being executed as trusted checks. Source: shared architecture v1.0, sections 1-8, 9.2-9.4, 10-18 via #46 brief.
Why
A closed environment, workspace-write setting and diff allowlist are not sandboxing. Tests/review execute candidate code, and the same host user may reach controller state/credentials. Honest trusted-development limitations must coexist with a proved stronger profile, not be renamed away.
Current Evidence
At
eb4f4a2956, codex_runtime.py accepts TRUSTED_DEVELOPMENT only; task execution uses a disposable clone and closed values, no hostile boundary. core/verification.py verify_candidate:257-260 eagerly runs all producer checks. task_execution.py TaskChecks:917-951 rejects changed paths but still runs candidate verification commands; _install_candidate installs candidate before checks. Source ordering is verified; exploit/live behavior was not run. #6 expressly excluded real hostile-code OS sandbox.Scope
Threat-model actual file/terminal/tool executor, worker/test/reviewer/controller identities, mounts, network/credentials and descendant processes. Evaluate maintained native/container/OS sandboxes before adaptation. Establish trusted gate source and safe ordering/preconditions, avoiding candidate-modified verification tooling as authority. Preserve explicitly selectable trusted-development, with truthful denial/unsupported diagnostics. Contract exact grants to selected harness and verify real refusals.
Acceptance Criteria
Reuse
Compare existing Workspace/Runtime enforcement seams, pinned native harness controls, maintained container/OS sandbox options and HAR/OpenHands workspace candidates. Exact revision/files/license/service terms, dependencies/maintenance and adversarial denial tests are required before selection; no custom sandbox framework or credential store. Adopt proven mechanism, not marketing claims.
Constraints
No fake isolation, weakening functional guards, private source/runtime dependency, broad owner credential in worker or automatic trust upgrade. Architecture security-level choice and unsupported guarantees require owner decision after the bounded evidence result; implementation must stay within an accepted ADR/profile.
Dependencies And Priority
Immediate safety prerequisite before untrusted worker/test/reviewer execution. Can prove verifier-precondition defect independently of gateway/intake. Harness feasibility supplies actual executor/lifetime; concurrency consumes safe cleanup rules. Budget integration later bounds all tools.
Diagnostics And Permissions
Report denied capability and safe remediation, no secrets/untrusted free-text output. Synthetic hostile fixtures only initially. OS/container access, live harness/inference and external effects require separately scoped approval; registering this work authorizes none.
Links
Non-Goals
No own sandbox/harness, security claim from path instructions or green synthetic tests, production execution or rollout.
STOP_AND_ASK: Security Profile Decision After Bounded Evidence
Same sole-primary invocation
kernel-loop-20261005T102040Z. After COMPLETE #48/#49 and fresh ALL-open canonical SELECT (18 issues, page2empty, exactwontfix15/30/37/44 excluded first), #50 selected as earliest remaining safety work. Current accepted Goal/all6AC/body unchanged, comments0/deps[]. No branch, implementation commit, PR or whole-PR review started for #50.Actual Negative Evidence
Research
ses_eecabf874ffeXiY12XwUbxUdBCused only a self-owned synthetic fixture under/tmp/kilo/kernel50-research-20261006, no repository modification/realharness/inference/credentials/OSsandbox/container activation. Parent inspected actual script, marker, source and checksum.Closed environment Python3.12.3 command used PATH=/usr/bin:/bin, syntheticHOME, LANGC.UTF8, PYTHONDONTWRITEBYTECODE1 and publicsrcPYTHONPATH. Script
probe.pySHA256 4233d26393c0d61b86f7a96887db29a02ddb9347cc91ecc77636c5ed7e602c6f invokes actual_install_candidate,TaskChecks,_run_command,verify_candidate; only evidence persistence is an in-memory hash sink. The fixed controller recipe/usr/bin/python3 -I -B tools/verify.pyoriginally passed with marker absent. Candidate changes ONLY forbiddentools/verify.py, outside allowed{tests/approved.py}, to write its fixed harmless marker.Observed:
changed-paths=False→ candidate verification command exit0 / evidenceTrue → structuralTrue → final RejectedResult, BUT marker present, containingcandidate tooling executed. Marker was absent after installation and before verification. This demonstrates actual unauthorized candidate-tooling execution, not just final rejection. Synthetic Git base7587b0a0c99884a1466e26666547e3e7836853ad/head a92c035fb5a07e43c542968f0edca5ce52c6083e; fixture afterward clean. One initial fixture lacked mandatory Program criteria and stopped before exec; corrected contract + fresh fixture produced the result, no blind retry.Current source at
a9a65006cc: core/verification.py259-297 eagerly executes every check before rejecting; task_execution.py930-981 records scope rejection then candidate commands. CodexRuntime150-167 accepts TRUSTED_DEVELOPMENT/workspace-write only and explicitly refuses isolated/network/mount claims. FakeWorkspace/FakeAuthorityBroker are synthetic. ADR5/7, threat-model and SECURITY provide no accepted hostile worker/test/reviewer profile; ADR7:113-122 requires bounded stronger-profile proof and owner decision.Maintained Mechanisms Compared, Not Adopted
-tryfallback must be proved/refused.Public pinned sources/licenses were inspected read-only. No tools installed/images pulled/sandbox launched/source copied/product dependency adopted, and no binary/platform denial receipt claimed.
Exact Owner Decision
Choose the first supported hostile-execution security profile and assurance target: enforcing boundary, supported platform, trusted launcher/runtime components, credential/egress separation and fail-closed limitations. This is the architecture/security/product-dependency/OS-access commitment explicitly reserved to the owner AFTER bounded evidence, not a test-mechanics or infrastructure question.
Smallest distinct researched directions are daemon-free Linux bubblewrap versus managed rootless OCI; native controls may be part of the first, not a proved standalone full path. Neither selected. Each requires accepted profile/ADR and separately scoped OS/container denial proof before implementation can honestly receive AC2–AC5.
Autonomous paths considered: ordering/trusted gate repair can address AC1 but cannot by itself prove controller/artifact/credential/host-parent/symlink/mount/network/socket denial, all-executor mediation, cleanup or supported-platform assurance. Closed env/allowlist/workspace-write remain trusted-development; refusing every untrusted request is honest but not selected-sandbox proof. Earlier development CI containers do not authorize product runtime/profile adoption. No single existing accepted mechanism fulfills all6AC, so choosing one implicitly would change owner commitments or weaken acceptance/security.
Therefore the whole invocation stops at STOP_AND_ASK, preserving #50 open and clean developa9a6500. Goal execution has no question tool; it will report blocked with this exact decision rather than invent an owner tooling question. No skip to another issue, code/branch/PR/review cycle, release/deploy/main/live inference/Router operation/privateaccess or security expansion. #48/#49 COMPLETE and immutable review histories remain intact.
Owner Decision Received: Verification/Test-Only Bubblewrap
The owner explicitly resumed SAME invocation
kernel-loop-20261005T102040Zon 2026-10-07T05:28:42Z:This resolves the security-profile choice recorded in comment15513. Same #50, no new invocation or reset; #48/#49 COMPLETE and review histories preserved. Fresh canonical50 open/unexcluded, normal clean develop/base
a9a65006cc8cc5b5e4468746a18ff51daf742e6b; no #50 branch/PR/review yet.Binding receiver scope: first Linux verification/test executor, including untrusted test execution used by verification/review. It is NOT whole model/harness/worker isolation, a new approval/authentication service, ordinary live execution or full G09 completion. Broader original worker/harness obligations remain explicitly deferred/unproved, not silently relabeled delivered. Existing trusted-development remains selectable and labelled non-isolated; unsupported bubblewrap/platform fails closed rather than fallback. Rootless OCI/product daemon/image lifecycle deferred by owner.
Next scoped work: accepted ADR/role/resource/denial contract; verifier-precondition marker no-effect repair; explicit minimal sandbox mounts/toolchain, closed environment, no networking or host credential/controller/socket exposure; bounded owned-process cleanup and synthetic grant/expiry/revocation negatives; actual native negative tests, exact versions/configuration and unsupported refusals; independent security-critical whole-PR review and required gates. No new sandbox framework or scope beyond owner's mandate. Actual running denial evidence and scoped acceptance will be distinguished from source facts before any completion claim.
Scoped Verification/Test Implementation Published
SAME invocation
kernel-loop-20261005T102040Z, owner's 2026-10-07 bubblewrap choice received. Normal branchissue-50-verification-bwrapfrom exact developa9a65006cc8cc5b5e4468746a18ff51daf742e6b; ordinary owner-authored commita72154e675, tree2b0eabc3505776ae38394962b9a4147aeac9cf64, full20-file delta, clean normal checkout/no rewrite. One PR #74: #74 . Issue remains OPEN, no scoped/broad completion claim.Trust/role scope is verification/test CHILDREN only, including those executed for review. It does NOT isolate model/Codex/wholeworker, hostcontroller or coldreviewer's model/harness context; original broader G09 obligations remain deferred, not silently relabeled delivered. RootlessOCI deferred, trusted-development nonisolated retained/neverautoupgraded. No ordinaryliveexecution or authority from documentation.
Actualmarker defect repaired: sequential trusted-evidence validation stops before later executing producers; directTaskChecks requiresexactsubjects/pinnedHEAD/allowedpaths/currentauthority/structuralproof. Original143/166 policy/digest/recovery encodings untouched; missing/unrun evidence notfabricated. ChangedMakefile/pyproject/tooling/AGENTS anddirectstructuralbypass no-effecttests passed.
New opt-in BubblewrapVerifier invokes maintained0.11.0atpublic9ca3b05...; explicitrequirednamespaceflags (NOT unshare-all/try), caps/NNP/newsession/dieparent/reaper/usernsassert, lazy fixed libseccompnetwork/escape/ABI restrictions. Emptyroot, exactread-onlyPythonclosure, controlledsnapshotbytes(no.git/untracked/privatefiles), synthetictmp/HOME/dev/proc, no wholehost/usr/etc/home/socket/cache mounts. Currentauthorizer outsidecandidate data binds subject/recipe/resource/snapshot/expiry/revocation. ClosedFds/stdinDEVNULL/pipes/consumedanonymousbootstrap execgate; reaper/proc1 FD exposure was actually found thenmasked. Boundedoutput; ownedPID-onlycancel, namespacecontainssetsidchild, settlementrequireslifetimeEOF+PID1pidfdexit, unknownretainscratch. No wholehostcensus/VM/DoS/globalatomicsafetyclaim.
Parent independently inspected executor667lines+ports/build/allnative746tests/precondition/source/operator/licenseclaims and reran
make native-proof check package-check auditin closedenv with explicit managedbin; native48PASS ZEROskips, full 1295tests+57subtests PASS, package/import/installedlegacy+ordinary/audit/diffPASS. Nativecasecomposition:1positive,24actualhostile/lifecycle,22refusal/validation,1SYNTHETICobserverloss distinguished. Actualfilesystem/symlink/proc/FD/network/UNIXlisteners/ABI/cap/NS/read-only/tmp/timeout/flood/revoke/expiry/setsid-lock/bystander/parentcrash effects useonlyself-ownedsyntheticcanaries, no realsecrets/privateprofiles/liveharness.ActualplatformUbuntu24.04.5/WSL2Linux6.18.33.2/x86_64/Python3.12.3, nativebwrap0.11.0SHAa75623409c0755c93ff5bba87ec4c407bf3dcb01d7b0d3c9802ee9a02a272e6f, installedlibseccomp2.5.5. Ownedunprivilegedbuild only(pinnedarchive552cec9c...,matchinglibcapheader/runtime packagesEXTRACTEDnotinstalled, Meson/NinjainintentionaloptionalUVgroup, all-groupsaudit). No code/binary bundled/sourcecopied/newframework/daemon/rootsecuritychange. Repositorysetup separatelybuilds8f928cda...andran48nativepassed, notsource-signatureattestation. Licences/rights/limits inADR0008/reusecatalogue.
Ordinarypytest withoutmanagednativebin is explicitlyskipped/UNPROVED; native-proofmissingbinfails. CanonicalbaselineCI withoutsetup doesnotattestnativepolicy. IndependentsecuritywholePRreview mustverifyexactpins andrunallgates+realnativeproofwithoutskips. Currentreviewcounter0/10; reservebeforeeachdispatch, samefinitebudget/public-source independence/frozenexactHEAD/base. No finalAPPROVE/merge/closure claim, sourceversion/mocks/finalRejectedalone neverdenialproof. Existing48/49histories preserved.
Owner-Scoped Reception Complete: Verification/Test-Child Profile Only
The owner's explicit 2026-10-07 decision in comment15516 scoped this delivery to the first Linux hostile verification/test-child boundary. Reception and issue completion below refer only to that selected profile, not full hostile model/harness/worker isolation or all G09. The original broader role requirements remain unreceived/deferred architecture obligations; future execution must verify actual role-specific receipts, never infer them from this issue's status. Rootless OCI remains deferred. No live inference/rollout or new authentication is authorized.
Same invocation
kernel-loop-20261005T102040Z, PR #74 supported non-force/non-auto stylemerge verified as1deb32900d, parents approved basea9a65006cc+ approved HEAD30c7204144. Tree84ddc4dc91exactly equals reviewed HEAD; ancestry/full difference check and merged metadata passed. Normal checkout clean on matching current develop.Preserved Independent Security Reception
#50 used 3/10 reviews: ordinal1 REQUEST_CHANGES (parent-death readiness + duplicate evidence), ordinal2 infrastructure connection reset/no verdict (consumed, never resumed as reviewer), ordinal3 APPROVE, findings[] fresh native
ses_eea492a73ffegIOmtx07Xwbu2G, exact HEAD/base. Changed bounded sequential-read transport strategy preflighted after reset; complete 20-file accumulated review criteria were not reduced. Public exact archive was independently fetched and entire build-source content compared; licence, native process/filter semantics, binary/library and all six applicable scoped AC verified. Initial/final Git+MCP currentness and clean frozen objects matched. #48/#49 histories intact.Both defects first reproduced: old duplicate ID allowed later marker producer, now original DomainError occurs immediately before later call. Maintained self-owned FIFO lock forced native reaper before parent-death arming while bootstrap ready; old gate actually released marker and held descendant lock. The new gate requires exact owned PID-1 one added installed filter relative to unchanged monitor plus namespace/parent/pidfd/liveness checks; exact pinned source applies that filter after parent-death setup. Missing/malformed observations refuse, no timing/PPid/bootstrap-only inference. Forced pre-arm cancellation/controller-loss and post-arm execution/settlement/lockrelease/bystander tests pass; pre-arm unknown liveness retains scratch honestly.
Integrated Scoped Criteria
Integrated Validation And Setup Recovery
Initial integrated native test setup found the old ephemeral
/tmp/kilobinary had been removed; 2PASS/53setupERROR was not enforcement proof, and later checks did not run. No skip/drop/fallback used. Public exact archive re-fetchedSHA552cec9c79bb85c8ecd25ae3e55efca9af03390c17d829885ee45722dedada4f; matching signed-index libcap2.66 development/runtime packages extracted into OWN scratch only (no host install/settings/daemon), hashes match original and installed library. Current repository locked setup tool reconstructed unmodified upstream with Meson1.12.1/Ninja1.13.2/GCC13.3/ld2.42.Current rebuilt binary
/tmp/kilo/kernel50-integrated-proof-20261007/native/build/bwrapSHA b86be326c70893bce3226de259455da28a7eb3496188205cde7a4048d355f698; different build-path/hash is NOT a reproducible-native-build/signature claim. Same pinned source, libcap/libseccomp and supported Linux6.18.33.2-WSL2 x86_64/Ubuntu24.04.5/Python3.12.3 child closure. Actual integrated proof against this reconstructed instance: 55 native tests PASS, ZERO skips, all 1303 tests + 57 subtests PASS, format/lint/type/import/secret/diff checks, reproducible wheel/sdist/installed legacy/intake/API import and all-groups audit PASS. Observer-fault/SYNTHETIC refusal cases distinguished from actual denial/lifecycle proof.Canonical exact PR CI #2366 SUCCESS, merged develop push #2367 SUCCESS: https://forgejo.creatidy.com/Creatidy/creatidy-kernel/actions/runs/129 . Canonical baseline without native setup is NOT native attestation; independent and integrated zero-skip native proof supplies that scoped evidence. No copied/bundled bwrap source/binary, LGPL external-utility rights documented; no new sandbox framework or credential store.
Closure receives the owner's verification/test-only first profile and precondition repair, not original full-worker G09 obligations. No new review cycle, next issue implementation, full worker/harness isolation, rootless OCI, private/runtime/credential access, live inference/Router operation, main/release/deploy or security expansion is implied.