Fixed
-
~works in a trusted project.ai-jail. A project layer listed under
trust_project_configis 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
~/.npmrcinto<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_mapsis where this surfaces, butrw_maps,overlay_maps,mask,
deny_paths, both exception lists andclaude_dirshared 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.
TIOCSCTTYandTIOCSTIarec_ulong
on glibc and macOS butc_inton 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 existingaarch64-apple-darwincross-check. It reproduces the
failure on the previous commit and passes on the fix. -
The
TIOCSTIdeny is covered by a test.docs/SECURITY.mdstates 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