github akitaonrails/ai-jail v1.20.2

2 hours ago

Fixed

  • ~ works in a trusted project .ai-jail. A project layer listed under
    trust_project_config is merged after the tilde pass has already run over
    the global config and the CLI, so its own paths were never expanded. They
    stayed relative, and resolving them against the project directory turned
    ~/.npmrc into <project>/~/.npmrc — a path that cannot exist. The
    untrusted path was never affected, because it expands while deciding whether
    a map points outside the project; only the trusted branch, which skips that
    code entirely, had the gap. Reported by @accictavandongen (#126).

    ro_maps is where this surfaces, but rw_maps, overlay_maps, mask,
    deny_paths, both exception lists and claude_dir shared it. The field list
    now lives in one helper used by both callers, so a field added to one cannot
    go missing from the other. Nothing is newly permitted: a trusted layer could
    always name the same path in absolute form.

  • ai-jail builds on Alpine again. TIOCSCTTY and TIOCSTI are c_ulong
    on glibc and macOS but c_int on musl, so the hard-coded casts failed to
    compile there. Thanks to @brodock (#127).

Continuous integration

  • The musl target is type-checked on every run. Nothing in CI ran against
    musl, so the Alpine build could break without any job noticing and a
    contributor had to report it. cargo check --target x86_64-unknown-linux-musl
    is a type check rather than a link, so it needs no musl toolchain — the same
    shape as the existing aarch64-apple-darwin cross-check. It reproduces the
    failure on the previous commit and passes on the fix.

  • The TIOCSTI deny is covered by a test. docs/SECURITY.md states that
    Linux blocks terminal injection outright through seccomp, and nothing
    verified it — which is why the constant's type could change underneath that
    rule with every test still green. The assertion is made against the compiled
    BPF rather than the constant, so it proves the value the kernel will actually
    compare, on whatever libc and architecture built it.

Checksums (SHA256)

03ab6f0066ba62d1fcf9085b171543cb5a23a349e1d3dd01c0222ab1aaed5b1c  ai-jail-linux-x86_64.tar.gz
e6add6b64b9b3c174f2f2bbe0e10ac91a8b8143293ed38f3a268330d54c25e3e  ai-jail-macos-aarch64.tar.gz

Install

brew tap akitaonrails/tap && brew install ai-jail
yay -S ai-jail-bin
cargo install --locked ai-jail

Don't miss a new ai-jail release

NewReleases is sending notifications on new releases.