Repository navigation
Hydra 0.3.2: security fixes
Security fixes from an audit of the CLI, MCP server and hooks. Each one has a regression test. Updating is recommended for anyone using the MCP server.
High
hydra_runcould run arbitrary code. The gate checked only the runner name, sonode --test /any/file.mjs,--import,make --eval,cargo --configandgo -vettoolall got through. It now refuses paths that leave the working directory (including through../and symlinks) and each runner's code-loading flags. A project's ownnpm teststill runs.
Medium
hydra_smell,hydra_refactorandhydra_designcould read any file on the machine and echo parts of it. They now accept only source files inside the working directory, and no dotfiles.
Low
- The usage ledger could keep credentials from commands.
NAME=valuesettings, URL passwords and secret-named flags are now masked, and the ledger is written owner-only (0600 in a 0700 folder). - Rewriting an agent's config file could widen it from 0600 to 0644. The original mode is now kept.
- Any local process on 127.0.0.1:11435 was trusted as Hydra's model server. Hydra now trusts it only if its recorded process is alive, belongs to the same user and runs the configured server.
- The maintainer dashboard listened on all interfaces and started evals for any origin. It now binds to 127.0.0.1, checks the Host header and accepts only same-origin JSON POSTs.
Hardening
- The OS head's environment probe now hides values such as
DATABASE_URL,*_DSN,GH_PATandMYSQL_PWD, and any value that contains a URL password or connection-string key. - The managed llama-server starts with
--no-slots --no-webui --cors-origins localhost. Restart it once after updating:hydra stop, and the next call starts it again. - MCP tools carry
readOnlyHintannotations, so clients can gatehydra_run. hydra smell --diffnow runs through the git head's guards, so a repository'sdiff.externaldriver no longer runs.blamealso adds--no-textconv.
Other fixes (most from @sarfaraz1212, #1 to #8)
- The git head keeps the requested count in more phrasings ("the newest 3 commits", "the oldest 5 commits"), and build-failure questions route to the test head.
- The OS head answers about the environment variable the question names (
HOME,TERM, a lowercasevariable pwd) instead of falling back toPATH. The sensitive-name and credential-value guards still apply to every name. - A command killed by a signal reports the usual 128+signal exit code.
- The
hydra improvelatency figures use nearest-rank percentiles. - Smell scanner: indentation depth is measured with the file's own indent width (its most common indent step, #9);
smell --diffreports real line numbers in new files; and siblingif/elsebranches without braces are no longer flagged as dead code. npm testno longer writes its MCP test calls into your usage ledger.