Relationships
#4791 @swamp/cfgmgmt: there is no way to require pinned host keys; a model without `nodeHostKeys` trusts the first key it sees
Opened by randybias · 11/16/2026· Shipped 11/16/2026
Versions: @swamp/cfgmgmt 2026.11.15.4, swamp 20261114.210101.0, target Ubuntu 24.04. (This follows our earlier report on 2026.11.01.1, which asked for pinning at all; the nodeHostKeys field is the answer, thank you.)
What happens: with nodeHostKeys set, a model checks the host's key strictly on every connection and leaves the runner's own known_hosts alone. With it unset, a model accepts whatever key the host presents on first contact and writes it into the known_hosts file of the user running swamp. Nothing a definition or a workflow can say makes "no keys given" an error, so one definition that forgets the field silently falls back to trust-on-first-use. An empty list is refused, but an absent field is not.
What we expected: a way to require pinning: either pinned by default with trust-on-first-use as an explicit choice, or a setting (on the definition or the whole repository) that turns "no nodeHostKeys" into a refusal before any connection is made.
Shortest reproduction:
- Pick a host the runner has never connected to (no line for it in
~/.ssh/known_hosts). - Create a
@swamp/cfgmgmt/timezonedefinition for it withoutnodeHostKeysand runapply. - The method connects, and
~/.ssh/known_hostsnow has a line for the host. - Compare: the same definition with
nodeHostKeys: []is refused, and with the host's real keys it connects without touching~/.ssh/known_hosts.
Why it matters: the safe behaviour exists, but it is opt-in per definition. A wrong address, a reinstalled machine or a machine in the middle on the first connection is trusted from then on, and the runner's personal known_hosts file changes as a side effect. For a fleet that wants "never trust on first use", forgetting one definition is enough.
Upstream repository: https://github.com/swamp-club/swamp-extensions
Environment
- Extension:
@swamp/cfgmgmt@2026.11.01.1 - swamp:
20261114.210101.0-sha.537e03d1 - OS:
linux(x86_64) - Deno:
2.9.8 - Shell:
/bin/bash
Shipped
Click a lifecycle step above to view its details.
system commented 11/16/2026, 11:35:35 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 11/16/2026, 6:53:16 PM
Thanks @randybias for reporting this! The fix has been merged and a release is on its way. We appreciate your contribution to swamp.
Sign in to post a ripple.