Relationships
#3818 scanFleet: support a different SSH user per host (user@host entries)
Opened by kagarmoe · 10/23/2026· Shipped 10/24/2026
Problem
The @swamp/cve/* scanners (dirtyfrag, emudhra, php-rce-2026-10) take a single global sshUser (and sshKey). scanFleet takes hosts as a comma-separated list and connects to each one as that same user:
dirtyfrag_detect.ts(v2026.10.22.2):args.hosts.split(",")(around line 818), then each host getssshUser: g.sshUser(around line 835). The target is built as${g.sshUser}@${g.targetHost}.emudhra_detect.ts(v2026.10.22.1) builds${g.sshUser}@${g.targetHost}the same way.
A real fleet often has a different login on each host; ours uses one username on Ubuntu and another on macOS. In that case scanFleet can't be used. The workaround is one behavior per host per scanner, eight in our case, each run as its own workflow step. That's the N-separate-runs pattern fan-out methods exist to avoid.
Proposed solution
Any of these would do:
- Accept
user@hostentries inhosts, using the entry's user when present and the globalsshUserotherwise. - Accept
hostsas an array of{ host, sshUser?, sshKey? }objects. - Read hosts (and their users) from an existing
@swamp/sshinventory behavior.
user@host is the smallest change and fits the existing string input. Since all three scanners share this layer (see #3772's "shared CVE layer"), one fix could cover them all.
Alternatives
Per-host behaviors work, but they multiply definitions and give up the fan-out report across hosts.
Shipped
Click a lifecycle step above to view its details.
system commented 10/23/2026, 8:49:54 AM
Classified automatically when this issue was filed.
- Source: Extensions
If you feel this classification is incorrect, add a ripple to tell us so.
stack72 commented 10/24/2026, 9:21:14 PM
Thanks @kagarmoe for reporting this! We shipped: Accept user@host entries in the hosts input of scanFleet and mitigate in @swamp/cve/dirtyfrag, @swamp/cve/emudhra and @swamp/cve/php-rce-2026-10. An entry's own user is used for that host; plain entries keep using the global sshUser and sshKey exactly as today. Backward compatibility is the primary constraint: no globalArgs or method argument changes, plain entries produce identical ssh argv, dedupe, data names, records and report commands (pinned by characterization tests written first), per-host data stays keyed on the bare host, and the only schema change is one optional per-host sshUser field, set on every record written for an overridden host, so report commands stay correct.. The fix has been merged and a release is on its way. We appreciate your contribution to swamp.
Sign in to post a ripple.