fix(jail-bootstrap): pin pkgs to host versions + validate inputs #97
Loading…
Add table
Reference in a new issue
No description provided.
Delete branch "fix/agent-jail-bootstrap-harden"
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?
What
Hardens
packaging/freebsd/agent-jail-bootstrap.sh(added in #96) per review.Changes
pkg install python312 node24 …(which pins only the major), query the host's installed version (pkg query '%v' <name>) and install that exactname-versioninto the jail from the host's mounted cache. The comment "versions pinned to match host" is now true. If the host lacks a package, fail loudly rather than pulling a different version into the jail.set -eu; reject empty/oddjail_name(allow[A-Za-z0-9_-]only) so it can't escape/usr/local/bastille/jails/<name>/root; assert the jail root exists before touching it. (Sibling to the canonicalization concern in #92.)Relies on
The existing host pkg-cache reachability from the jail (offline
pkg -cinstall) — unchanged.Notes for follow-up (not in this PR)
npm-node24vsnpm: the canonicalclawdie-iso/packages/pkg-list-jails.txtusesnpm(+node24); this script keepsnpm-node24. The version-pin + loud-fail surfaces a wrong name immediately, but the two lists should be reconciled.pkg-list-jails.txt(nopython312there). Worth adding anagent-jailsection to that canonical list so the set has one source of truth.Tests
sh -nclean (FreeBSDpkgpaths can't be exercised off-host).🤖 Generated with Claude Code