github akitaonrails/ai-jail v3.4.2

one hour ago

v3.4.2

Two fixes: forge setup github-app can mint a token again, and a saved
directory grant survives a reboot on filesystems whose device number changes.

Backward compatible: no CLI flag, config key, or saved-policy shape changes.
An existing profile keeps validating exactly as before.

Fixed

  • forge setup github-app no longer fails with HTTP 422 (#239). The
    installation access-token request sent OWNER/REPO in repositories, which
    GitHub defines as repository names, so setup always failed before saving
    the binding. Setup now sends the name alone — the installation already fixes
    the owner — and a later launch sends repository_ids from the verified
    numeric id, which a rename cannot redirect. A rejected request now prints
    GitHub's own message (control-escaped and capped) instead of leaving the
    cause to guesswork, and a test asserts the exact JSON body for both forms.

  • Saved directory grants stay valid across reboots on anonymous devices
    (#238).
    A grant compared raw st_dev and st_ino. btrfs subvolumes (and
    tmpfs and overlay mounts) get an anonymous major-0 device number at mount
    time, so st_dev changes between boots, and every launch and ai-jail status failed with AJ-PATH-004 even though the directory had not moved.
    Grants now also record statfs(2)'s filesystem id, which is derived from the
    filesystem (on btrfs, its UUID and subvolume id) and survives a remount. A
    grant validates when the inode and the grant's own fields match and either
    the device is unchanged or both devices are anonymous and the filesystem id
    matches; a change on a real block device still refuses, as does a different
    inode. A profile saved before this release has no filesystem id, so it keeps
    the older strict check until it is configured once more — one
    ai-jail configure HARNESS, not one per boot.

Notes

  • New coverage: an anonymous-device change keeping a grant next to the
    existing symlink-swap and disappearance refusals, filesystem-id capture, a
    worst-case id round trip through the project TOML, and the two token request
    bodies.
  • The filesystem id is stored as the kernel's two signed words because TOML
    integers are signed; a high-bit id (common on tmpfs and overlayfs) would
    otherwise make every project save fail.

See the security model for how saved grants record
identity.

Checksums (SHA256)

63f697d30887b73b2278802dcbcb1e0facb7fcaf46b650562a9234da00c17cda  ai-jail-linux-x86_64.tar.gz
9c88ee00938cd59aaa381e78e50996b5ba6bea7957ece59e09c016b5d21b245d  ai-jail-macos-aarch64.tar.gz
b7ec350691d80649656b9dc93dbffd01593fca5de26c3146415ef1d148b2ac1d  ai-jail_3.4.2_amd64.deb

Install

brew tap akitaonrails/tap && brew install ai-jail
yay -S ai-jail-bin
cargo install --locked ai-jail
# Debian/Ubuntu: download the .deb below, then
sudo apt install ./ai-jail_*_amd64.deb

Don't miss a new ai-jail release

NewReleases is sending notifications on new releases.