Repository navigation
Conversation
…person's approvals `hermes approvals suggest` filtered with a description denylist that 33 of the 134 dangerous classes slipped past: force pushes, reverse shells, gateway restarts and `hermes update` (they kill running agents), approval-setting changes, uninstalls and daemon redirects were proposed for the permanent allowlist, often as globs (`git push *`, `hermes config *`, `nc *`) that approve far more than their class. It also counted every run that executed as one the user approved, including smart-approved, allowlisted and yolo runs, and any run whose output printed the words. Proposals now come only from an explicit list of classes, each with the exact glob shape it allows; today that is `docker restart|stop|kill *` (bare or absolute docker path). A command with no glob of that shape is not proposed, and neither is any class key: the runtime matches a class key against the command's first finding only, so it would also approve what is chained after it. Only runs whose result's own approval note says a person approved them count, and only through a call id no other call uses (ids repeat across sessions, and a result is not tied to its session). Fixes #158903
Collaborator
Author
|
@greptileai review |
Contributor
૮ >ﻌ< ა ci reviewran on 46da43f — test(approvals): check proposable classes against the detect ℹ️ InfoCI caches · View report · View job25 / 25 cache hits (0 misses) per-job cache resultshits
missesnone Compressed archive bytes. Not-restored bytes use the main-size reference; missing sizes remain unknown. debug infoCI timingsCI timings · View report · View jobWall time 7m24s vs 6m23s (+15.9%). 8 job(s) slower, 4 faster,
|
Contributor
[Medium impact] The PR appears safe to merge; the previous test-contract finding is fixed.
|
…ses, not a snapshot (#158903)
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
hermes approvals suggestproposed permanentcommand_allowlistentries for classes that should never be approved forever. Its description denylist let 33 of the 134 dangerous classes through: force pushes, reverse shells, gateway restarts andhermes update(which kill running agents), approval-setting changes, uninstalls and daemon redirects. These were often proposed as globs (git push *,hermes config *,nc *) that approve far more than the class they came from. It also counted every run that executed as one the user approved: smart-approved, allowlisted and YOLO runs, plus any run whose own output printed the words.docker restart|stop|kill *, withdockerbare or an absolute path. A command with no glob of that shape (timeout 30 docker …,env docker …,docker container stop,docker --debug restart) is not proposed at all.docker stop web && git push --forcewould pass under the docker key, andbash -c "$(curl …)"under the shell-ckey. That runtime behaviour is unchanged on main and affects interactive "always" answers too; it belongs in its own PR.approvalnote says a person approved it at the prompt, or approved it and then interrupted it. The command's output can't forge it.call_0), and a result row isn't tied to its session, so one session's approval could otherwise be credited to another session's command. With those providers this can count too few approvals, never too many.website/docs/user-guide/security.mdis intentionally not edited here. Itsapprovals suggestexample (git push *, a class-key line) and its denylist description no longer match what the command does.Fixes #158903