Second audit: smolmachines parity and Git HTTP hardening #134
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?
Summary
Second complexity/security audit after closing #117. The codebase is in a stronger state overall, but the next set of issues clusters around smolmachines backend parity, backend-aware dashboard/remediation flows, and one Git HTTP robustness gap.
Codebase rating
7.4/10
The architecture and test posture are solid: PRD discipline is strong, unit coverage is broad, and the recent hotspot work reduced risk in manifest, sidecar supervision, supervise waits, Codex auth redaction, and pipelock rendering. The main reason this is not an 8+ is backend parity. Docker is mature; smolmachines still has Docker assumptions and env-handling differences in important operator paths.
Unit status at audit time:
python3 -m unittest discover -s tests/unitpassed: 826 tests.Revised hotspot ranking
backend/smolmachines/prepare.py+smolvm.py+bottle.pyenv flowresolve_env(); secret/interpolated env handling diverges from Docker and values are passed on smolvm argv.resumedefaults through backend selection, and dashboard reattach synthesizes Docker bottles for external slugs.git_http_backend.pyrequest handlingsidecar_init.pypipe lifecycleFollow-up rating (2026-06-02)
8.1/10
All six findings are resolved and merged. Test count is up to 855 (from 826). The backend parity gap that held the previous rating below 8 is closed: smolmachines env now goes through
resolve_env(), capability-block remediation is backend-aware, resume and dashboard reattach use persisted backend metadata, and cross-backend parity tests enforce the contract.The remaining known gap — smolmachines env values reaching the guest via
-e K=Vonsmolvmhost argv — is explicitly documented inprepare.pyas a limitation of smolvm 0.8.0 (no env-file or stdin injection path). It is a lower-severity exposure than the previous high-risk findings since values are on the host process table, not inside the agent sandbox, and are short-lived.Unit status:
python3 -m unittest discover -s tests/unitpassed: 855 tests.New hotspot ranking
smolvm machine create -e K=Vexposes resolved env values (including secrets) on the host process table. Documented known gap pending smolvm env-file support.BottlePlan.printrendering divergencegit_http_backend.pyaccess hook argvclient_address[0]is passed as both the remote-addr and peer-addr argument to the access hook — likely a copy-paste, functionally harmless but worth verifying intent.Follow-up rating (2026-06-02)
8.6/10
PRD 0044 (#147) merged:
BottlePlan.printrendering divergence is resolved. Both backends now inherit a single concreteprintimplementation from the base class; git gate lines render asname → upstream_host:upstream_portand egress lines carry[auth:scheme]annotations consistently. Seven new cross-backend unit tests enforce the contract.Test count is up to 862 (from 855).
Of the three items in the new hotspot ranking, two are now closed:
BottlePlan.printrendering divergencegit_http_backend.pyaccess hook argvThe remaining gap is a documented smolvm 0.8.0 limitation — resolved env values briefly appear on the host process table via
-e K=Vargv. The codebase has called this out inprepare.pyand cannot fix it until smolvm gains env-file or stdin injection support. It is an external dependency ceiling, not an open codebase risk. The deduction from a higher score reflects the exposure being real even if unactionable here.