Security fixes go into the latest release. Update to the newest version to get them.
Report it privately at https://github.com/rextail-ai/lessloc/security/advisories/new. Do not open a public issue or pull request.
Include the lessloc version, the agent tool and its version, the steps that show the problem, and what an attacker gains. We answer and fix it in the advisory, and credit you in the release notes unless you ask us not to.
lessloc runs as you, with your permissions: in your agent tool's hooks, in the git hooks lessloc init installs, and when you run its command line. It has no dependencies and sends no telemetry. Its only network contact of its own is its daily update check: once a day, at the start of an agent session, one background git process lists lessloc's published releases at get.lessloc.org (github.com when get.lessloc.org cannot be reached) and fast-forwards lessloc's own clone to a newer published release that descends from it, with git's hooks, filters, submodules and credential helpers off. A clone with changes or commits of its own, or one an agent tool installed, is left as it is. git -C ~/.lessloc config lessloc.update false turns the check off. In a partial clone (git clone --filter), git fetches from your own remote the objects lessloc reads that the clone does not have yet; use a full clone where no fetch may happen.
It reads:
- the repository: its working tree, its git history and objects, and
.lessloc.json; - what your agent tool passes its hooks: your prompts, the agent's tool calls and their results, and its last message;
- environment variables that tell which agent tool is running.
It writes:
- its state in
~/.cache/lessloc/(or$XDG_CACHE_HOME/lessloc,%LOCALAPPDATA%\lesslocon Windows, or$LESSLOC_STATE). For each checkout this holds session state and journals, test evidence, handoff records, the definitions index and logs. Session state and handoff records keep a shortened copy of your prompts, and handoff records also keep the agent's last message. Beside the checkout folders sitsoriginals.json, which keeps what each agent tool's hook or settings file held beforeinitchanged it. Only your user can open this folder: lessloc creates it, and each checkout's folder, with mode 700. On Windows, where folders have no mode, keep$LESSLOC_STATEand$XDG_CACHE_HOMEinside your user profile, which keeps%LOCALAPPDATA%private to you. Session files go after a week, handoff records after two weeks, and a checkout's folder when the checkout is gone or a month after lessloc first wrote it. The folder of lessloc's own clone also holdsupdate.json, what the last update check did and the version that last wrote lessloc's entries in the agent tools' files, andupdate.lockwhile a check runs; - snapshots of the working tree, as unreachable objects in
.git/objects, whichgit gcprunes. Untracked environment and key files (.env,.env.<name>except examples and templates,*.pem,*.key,id_rsa,id_ed25519) go in with every line blank but their PEMBEGINandENDlines, so their content never reaches.git/objectswhile a private key in one is still reported. Add every other file that holds a secret to.gitignore: a snapshot includes each untracked file git does not ignore; - folders in the system's temporary folder that only your user can open, each removed when its command ends: clean checkouts (
lessloc-checkout-*) forverify,ci,probeandcheck --ratchet, with git's record of each in.git/worktrees/, one (lessloc-doctor-*) wheredoctorruns each installed hook, and one per process (lessloc-tmp-*) for short-lived input and index files; - only when you run
lessloc init:.git/hooks/pre-commitand.git/hooks/prepare-commit-msgin this clone and, with their flags,AGENTS.md,CLAUDE.md,.lessloc.json,.lessloc-baseline.json,.github/workflows/lessloc.ymland.github/hooks/review.json; - only when you run
lessloc init --<tool>or--agents: that tool's user-level hook, plugin or settings file in your home folder. After lessloc's version changes, the next session start writes lessloc's own entries in those files again, for each tool set up from that clone, and keeps everyone else's.lessloc removetakes lessloc's entries out again, and gives a file back byte for byte when nothing else in it changed since.
Files lessloc writes lists every file.
It runs:
git, plusruffandpython3when they are installed. The daily update check runsgitin lessloc's own clone, in the background. ruff runs with its fixes turned off, whatever the repository's ruff settings say, so it never changes a file. On Windows, the programs lessloc starts itself (git, ruff, python3, cargo, node) never come from the repository's folder. The agent hooks never run your repository's own commands;- your
testandsetupcommands from.lessloc.json, but only fromlessloc test,verifyandci, and theprobecommand only fromlessloc probe.cirunscargo clippyin Rust projects, which builds them.audit --toolsruns the analyzers you have installed, and some of them, the vulnerability scanners, look up advisories online. It runs knip from the repository'snode_modulesonly when git tracks nothing there; a committednode_modulesnever runs, and knip then comes from your PATH.doctorruns each installed hook once to see that it answers and, whenCLAUDE_PIDis set,psto read when that Claude Code process started.
The clone that installs lessloc, its daily update check, and the installs that Claude Code, Codex, Qwen Code, Pi and GitHub Copilot CLI make themselves, download it from get.lessloc.org, which serves this repository unchanged (FAQ has the check).
For enforcement, make lessloc ci a required check (What each layer stops). The agent hooks guide the agent; they do not confine it. They fail open by design, so a lessloc error never blocks your agent. An agent's shell can change files the hooks do not parse, and a git hook can be skipped; the required check reviews every pull request either way.
In scope: lessloc running a command, writing a file or sending data anywhere this page does not list; content in a repository or a prompt (a file, a file name, .lessloc.json, a commit message) that makes it do so; lessloc's state readable by another user.
Out of scope: an agent that ignores a hold, and the bypasses that What each layer stops already lists.