Repository navigation
Verfy CLI 0.26.0
·
16 commits
to main
since this release
- A script is read before it runs. Until now the guard judged the command an agent ran, so
python fix.pywas checked as a command andfix.pyitself was not; an agent could write the dangerous part into a file and run the file. Now, before such a command runs, Verfy reads the code it starts and checks it with the same rules:- scripts named on the command line, run by an interpreter (Python, Node.js, Deno, Bun, tsx, Ruby, Perl, PHP, bash, sh, zsh, PowerShell), run directly (
./x.sh), sourced, a module of the project (python -m pkg), given inline (python -c,node -e) or in a here-document (python - <<EOF); - package scripts:
npm test,npm run build,npm install(the project's install scripts), the same for yarn, pnpm and bun, and a Makefile's recipes formake; - code the agent wrote or changed in this session, when a command runs project code without naming it (a test runner such as pytest loading
conftest.py, a build tool, an interpreter importing a module).
- scripts named on the command line, run by an interpreter (Python, Node.js, Deno, Bun, tsx, Ruby, Perl, PHP, bash, sh, zsh, PowerShell), run directly (
- How a script is checked. A shell script line by line, as commands. Other languages by what they hand to the shell (
os.system,subprocess,child_process,system, backticks), what they delete (shutil.rmtree,fs.rmSync), the paths and URLs written in them (Verfy's own key named in pieces, a credential file in code that also uses the network, a denied host such as the cloud metadata address), and a script started from a script, three levels deep. A finding names the file and the line:In fix.py, line 3: [VFY-SH-001] ...(VFY-SCRIPT-001). - Who wrote it matters. Code the agent wrote or changed in this session (a file tool, a shell redirect,
curl -o, or any file changed since the session started) gets every finding. Code that was already in the project gets only what is blocked outright, so a project's own scripts do not ask each time they run; a cloned repository'srm -rf ~is still stopped. Code a runner only loads counts for what is blocked outright, so a script you approved once does not ask again on every later command. - What no one can read first is said so. A script written by the same command that runs it, a download run right away (
curl -o x.sh ... && bash x.sh) or a script too large to read asks first (VFY-SCRIPT-002). Code that decodes or downloads more code and runs it (exec(base64.b64decode(...)),eval(atob(...))) asks first (VFY-SCRIPT-003) and counts toward a session's escalation. - Policy:
"scripts": {"read": "on" | "off"}, on by default; a repository's policy can turn it on, not off. The files each session wrote are kept in~/.verfy/scripts.jsonfor a day. The hook and the gateway both read scripts; a typical check takes a few milliseconds. - Limits. Code that builds a command while it runs, reads it from elsewhere or loads modules the agent did not write is followed only as far as its text shows, and compiled programs are not read. A sandbox holds the rest (
verfy run --sandbox; on Windows through WSL2).
pip install -U verfy or verfy update. Check a file: sha256sum -c SHA256SUMS --ignore-missing, then python -m sigstore verify github FILE --bundle FILE.sigstore.json --repository verfy-dev/verfy.