SmartConfig

Review of M2 chunk C (steps 4-5 and the first scope change)

Date: 2026-09-30. Light review, the same method as chunk A: one reviewer (an AI agent in its own clone) ran the code and tried to break it; Claude then reproduced every finding before any fix. Covered 7ba575b, b5ad961 and 78b8cc7. Nothing touched the repo, /etc or the real store; the real /etc was read through a read-only listing.

Result: no way found for the paths the rules name as secret to be stored with content, no panics, the glob matcher agrees with plan 7.2, and default.scope differs from plan 7.3 only by the approved change C7.

Findings

Id Severity Finding Skeptic Outcome
D1 medium ssh-keygen -A writes each private host key to NAME.XXXXXXXXXX and renames it; that temp name, and the old ssh_host_key, were recorded with content. Reproduced: strings ssh-keygen shows %s%s.XXXXXXXXXX; ssh_host_ed25519_key.AbCdEfGhIj gave recorded, not fingerprint-only. Fixed 80bc523: both names, with and without the suffix, fingerprint-only, tier 2.
D2 medium Directories whose consumer runs names that the noise rules hide were missing from block D: systemd generator directories (systemd 255 runs foo.disabled, .orig, .tmp, sed temp names) and run-parts directories (network/if-*.d, ppp/ip*.d, update-motd.d, dhclient-*-hooks.d, Xsession.d, cron.yearly). Reproduced for each; systemd’s skip list read from libsystemd-shared; the run-parts directories listed from this VM. Fixed 310bc1f: added to block D, each with its consumer’s own skip list in D0. No change in today’s listing.
D3 low Recorded walked up from the leaf, checking every level: 8 s for a depth-1,000 path under ~/.ssh, which any user can create. Reproduced: 6.2 s at depth 2,000 on the old code. Fixed 1e9420b: the walk goes down from the root and stops at the first excluded directory; under 1 ms.
D4 low With ignored an SC_HOME that was not clean (/etc/sc/), so sc’s own data stopped being excluded. Reproduced. Fixed 5d0e00a: SC_HOME and login roots are cleaned.
D5 low FingerprintOnly and Tier took unclean paths as given: /etc/ssh//ssh_host_rsa_key was not fingerprint-only. Reproduced. Fixed 5d0e00a: both clean the path; FingerprintOnly answers true (fail closed) for a relative path.
D6 low \** and [**] were refused although plan 7.2 allows them. Reproduced. Fixed 12e1196: only a bare ** must stand alone.
T1-T6 test gaps CRLF passwd lines, nested roots, an unclean SC_HOME, the .goutputstream rule, a loose digest allowlist, a deep path. Confirmed by mutation. Tests added (5d0e00a, 1e9420b, 59d70f5); each mutation now fails.

Not defects, left for a decision