Code review 2026-12-02 WP1: Trust boundary and audit durability #152
Reference in New Issue
Block a user
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?
From the 2026-12-02 full code review (commit
28b6651a).docs/plans/2026-12-02-full-code-review.mddocs/plans/2026-12-02-full-code-review-remediation.md→ WP1VisitMemberBindingExpressionoverride toHardeningWalker. It applies theReflectionGatewayMemberscheck to?.. AddCreateDelegateto the gateway members.?.form of every existing.-form rejection test must also be rejected. Include the probe script from the report.System.AppDomainassembly-loading members.ScriptTrustValidatortests.TrustVerdictCacheon (code, extraReferences digest, degraded flag).IAuditService.LogAndSaveAsync. It stays best-effort: it swallows and logs its own failure. Switch every post-save audit call site in the report to it:DeploymentService,ArtifactDeploymentService,InstanceService, and theManagementActorAPI-key, shared-schema, ES-method and move-connection handlers. Then grep for any otherLogAsyncthat follows a final save.AuditLogEntriesrow exists. The current mocks only checkLogAsyncwas called. Live-check on the rig: disable/enable/delete an instance and run Deploy Artifacts, and confirm the rows appear.data-connection move.Fixed on
main(pushed,922021c4). Plan:docs/plans/2026-12-02-full-code-review-remediation.md(see its Outcome section).All 8 tasks done. Highlights:
?.member bindings andDelegate.CreateDelegateare now checked by the trust gate. The relatedusing staticbare-name hole is closed too.IAuditService.LogAndSaveAsync(best-effort); all post-save audit sites switched, plusAreaService/SiteServiceand the DeployReconciled row found by grep. A duplicate Create Instance audit row was removed.data-connection movereplies scrubbed.Rig:
AuditLogEntriesrows appear for disable, enable, artifact deploy and API key create/delete.QA/DEV: both central nodes must be upgraded together; see #160.
Commits:
b065ffa9test(integration): share one key ring across the fetch harness contexts (CDB-1, WP1 task 1.8)d4e13d3afix(config-db): encrypt deployment configuration JSON at rest (CDB-1, WP1 task 1.8)5a052c63fix(ui): apply site scope and the history status filter in the server query, before paging (UI-7, UI-9, UI-10, WP1 task 1.7)2162fad8fix(audit): scope audit reads by site identifier, not numeric site id (MGT-2, UI-5, WP1 task 1.6)8c5d70f6fix(transport): secret-bearing bundle export needs Administrator; scrub data-connection move reply (MGT-3, MGT-4, WP1 task 1.5)5ca998dcfix(audit): persist config audit rows written after the final save (DEP-1, MGT-1, TPL-3, WP1 task 1.4)5469ece0fix(script-analysis): key the trust verdict cache on every verdict input (CMN-5, WP1 task 1.3)a9549fbcfix(script-analysis): forbid System.AppDomain in scripts (CMN-2, WP1 task 1.2)29192eebfix(script-analysis): inspect ?. member bindings and CreateDelegate in the trust gate (CMN-1, WP1 task 1.1)18311eb3test(deployment): race-delete test asserts LogAndSaveAsync (merge fix)Deploying to QA and DEV is tracked in #160. Closing.