You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
apexe env --enable --also <NAMES> / --exclude <NAMES> name individual shim
commands and outrank the scanned policy in the direction they state, so an
interpreter can be governed without --scanned all: --scanned readonly --also node,python3. The names persist in the manifest,
because the activation script's env --reload runs in every new terminal and
would otherwise drop the route again.
apexe env --check now reports [WARN] INHERIT <command> when a shimmed
command installs only part of its bindings, with the installed and available
route counts. A shim refuses every route it was not given, and an application
started from an activated shell inherits that shim PATH: an editor opened
with code . probes git --version and git rev-parse, is refused both
times, and reports "no repository" instead of the refusal. The warning names
the commands where that can happen and carries the remedies — relaunch from a
deactivated shell, start the app through LaunchServices (open -a), or apexe env --reload --exclude <command>. The behavior is unchanged: no
refusal is relaxed and nothing falls back to an ungoverned binary.
x-apexe-opaque-after lets an overlay declare where a tool stops interpreting
its own argv: everything from that token onwards is forwarded verbatim. An
interpreter's grammar is interpreter <script> <argv for the script>, so
validating the tail against the interpreter refuses node tsc.js --noEmit.
It sits on the last, variadic operand for that form, and on a flag for the
ones whose tail starts at a flag's value: python3 -m <module> <args> and python3 -c <code> <argv>, which the operand form cannot express. Execution,
the ACL and the audit are unchanged; the tail still lands in the declared
operand, so a path-typed operand puts those tokens to the path guard.
x-apexe-digit-value lets an overlay declare that a bare -<digits> token is
one flag's value, so head -20 and tail -20 execute under a reviewed
grammar instead of being refused as a -2/-0 bundle (issue #46). At most
one property per command may carry it; a second declaration is rejected as
ambiguous. Only a probe can establish the spelling — usage: head [-n lines | -c bytes] does not mention -20 — so a corpus overlay declaring it must
record the probe in provenance. apexe ships the support first: an overlay
using the keyword against an older apexe fails to load, because OverlayFlag denies unknown fields.
Changed
apexe-deactivate.sh removes only the shim directory from PATH. It used to
restore the environment saved at the first activation, and on macOS that
snapshot is taken in .zprofile — before .zshrc adds pyenv, pnpm and similar
directories. Leaving the governed shell therefore dropped every later entry: apdev (a pyenv shim), python3 and anything else installed after activation
resolved differently or disappeared. Activation still records the snapshot so APEXE_SHIM_DIR and whether PATH was unset can be restored, but entries
added while the shell is governed now survive deactivation. scripts/deactivate.sh follows the same rule in its after-disable fallback.
A scan now reports the overlays that matched but did not decide it. Selection
keeps the single strongest match, so a local overlay that matches less
strongly than the corpus file it means to amend is silently ignored, and one
that matches equally replaces it wholesale — dropping every flag and operand
it does not restate. An annotations-only rm@bsd did exactly that and took
the path-typed operand with it, so rm /etc/hosts reached the binary. Both
cases are now a scan warning naming the two files, and the second one counts
what was dropped.
deactivate leaves the governed shell instead of uninstalling apexe. The
installed deactivate / apexe-deactivate.sh and scripts/deactivate.sh
used to run apexe env --disable, so sourcing a per-shell helper removed
every shim, the apexe-sh entry point and the managed startup blocks for the
whole machine — and a host configured to use the entry point loses its own
command execution with it. They now restore PATH and APEXE_SHIM_DIR for the
current shell and touch nothing on disk, matching what deactivate means in a
Python virtualenv. Uninstalling is apexe env --disable, which stays the one
command that removes an installation and records a shim_disable audit event.
scripts/deactivate.sh no longer guesses which installation to remove. With
neither _APEXE_ACTIVE_SHIM_DIR nor APEXE_SHIM_DIR set it used to run apexe env --disable against the default directory, so sourcing the helper
from a shell whose HOME held an installation disabled that installation
without being pointed at it — twice, because the second source fell through
again. It is now a no-op that says so. The installed apexe-deactivate.sh is unaffected: it names its own directory.
A binding with no metadata.grammar stamp is no longer promoted to reviewed by the legacy tool-level shim_contract.authoritative (issue #47).
It is reported as legacy: admitted like a scanned route, labelled in env --enable and env --check, and never granted reviewed trust it did not
earn. Reviewed routes are unaffected.
Migration
An installation whose shims were only ever justified by that legacy flag now
runs them as scanned routes: install with apexe env --reload --scanned readonly (or all), or rescan the tool (apexe scan <tool>, then apexe env --reload) to earn the stamp back.