The first sftp connection now lists ~/.ssh before it fetches authorized_keys, so the tool can tell a directory that is not there from one
it cannot enter — a difference sftp does not make on a fetch alone. The file
reads as empty in two cases only: sftp reports ~/.ssh itself as not there, or
the listing succeeds and the fetch then reports the file as not there. A ~/.ssh that is there but unenterable, an authorized_keys that is there but
unreadable, or a connection that never came up all fail the run and write
nothing. This closes the defect that closed #12: a ~/.ssh whose mode shut the user
out was read as a host with no file and replaced by one holding the new key
alone.
The write connection makes ~/.ssh and sets 0700 only when the read found
none; a directory that was already there keeps its mode.
For review: the sftp wordings the parsing turns on were read off OpenSSH
9.6/10.2 against a local sftp-server, for a missing directory, a directory of
mode 000, a missing file, and a file of mode 000. The test's fake sftp stands
in an unenterable directory by mode 000, read off the mode itself so the result
does not turn on the uid the tests run as. A run that adds a line still connects
twice.
Model: opus-4-8
Second pass on https://git.eeqj.de/sneak/keyfunc/issues/10.
The first sftp connection now lists `~/.ssh` before it fetches
`authorized_keys`, so the tool can tell a directory that is not there from one
it cannot enter — a difference sftp does not make on a fetch alone. The file
reads as empty in two cases only: sftp reports `~/.ssh` itself as not there, or
the listing succeeds and the fetch then reports the file as not there. A
`~/.ssh` that is there but unenterable, an `authorized_keys` that is there but
unreadable, or a connection that never came up all fail the run and write
nothing. This closes the defect that closed
https://git.eeqj.de/sneak/keyfunc/pulls/12: a `~/.ssh` whose mode shut the user
out was read as a host with no file and replaced by one holding the new key
alone.
The write connection makes `~/.ssh` and sets `0700` only when the read found
none; a directory that was already there keeps its mode.
For review: the sftp wordings the parsing turns on were read off OpenSSH
9.6/10.2 against a local sftp-server, for a missing directory, a directory of
mode 000, a missing file, and a file of mode 000. The test's fake sftp stands
in an unenterable directory by mode 000, read off the mode itself so the result
does not turn on the uid the tests run as. A run that adds a line still connects
twice.
Model: opus-4-8
The first sftp connection now lists ~/.ssh before it fetches
authorized_keys. The file reads as empty in just two cases: sftp reports
~/.ssh itself as not there, or the listing succeeds and the fetch then
reports the file as not there. A directory that is there but cannot be
entered, or a file that cannot be read, fails the run and writes nothing,
so a ~/.ssh whose mode shuts the user out is no longer read as a host
with no file and replaced by one holding the new key alone. The write
connection makes ~/.ssh and sets 0700 only when the read found none; an
existing directory keeps its mode.
Model: opus-4-8
Review passed. The sftp wordings the parsing turns on were checked against the real OpenSSH 10.2 client (sftp -D sftp-server, no network) for a missing .ssh, a .ssh of mode 000, a missing file, a file of mode 000, authorized_keys as a directory, and a dangling symlink: only a missing directory and a missing file are read as absent, and every unreadable case fails the run and writes nothing.
Model: opus-4-8
Review passed. The sftp wordings the parsing turns on were checked against the real OpenSSH 10.2 client (`sftp -D` sftp-server, no network) for a missing `.ssh`, a `.ssh` of mode 000, a missing file, a file of mode 000, `authorized_keys` as a directory, and a dangling symlink: only a missing directory and a missing file are read as absent, and every unreadable case fails the run and writes nothing.
Model: opus-4-8
clawbot
merged commit 3d90ac87f1 into next2026-09-21 09:50:01 +02:00
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Second pass on #10.
The first sftp connection now lists
~/.sshbefore it fetchesauthorized_keys, so the tool can tell a directory that is not there from oneit cannot enter — a difference sftp does not make on a fetch alone. The file
reads as empty in two cases only: sftp reports
~/.sshitself as not there, orthe listing succeeds and the fetch then reports the file as not there. A
~/.sshthat is there but unenterable, anauthorized_keysthat is there butunreadable, or a connection that never came up all fail the run and write
nothing. This closes the defect that closed
#12: a
~/.sshwhose mode shut the userout was read as a host with no file and replaced by one holding the new key
alone.
The write connection makes
~/.sshand sets0700only when the read foundnone; a directory that was already there keeps its mode.
For review: the sftp wordings the parsing turns on were read off OpenSSH
9.6/10.2 against a local sftp-server, for a missing directory, a directory of
mode 000, a missing file, and a file of mode 000. The test's fake sftp stands
in an unenterable directory by mode 000, read off the mode itself so the result
does not turn on the uid the tests run as. A run that adds a line still connects
twice.
Model: opus-4-8
Review passed. The sftp wordings the parsing turns on were checked against the real OpenSSH 10.2 client (
sftp -Dsftp-server, no network) for a missing.ssh, a.sshof mode 000, a missing file, a file of mode 000,authorized_keysas a directory, and a dangling symlink: only a missing directory and a missing file are read as absent, and every unreadable case fails the run and writes nothing.Model: opus-4-8