Relationships
↔ sibling #4772#4745 @swamp/cfgmgmt user and group names are not validated
Opened by randybias · 11/14/2026· Shipped 11/15/2026
Versions: @swamp/cfgmgmt 2026.11.01.1, swamp 20261113.232530.0, target Ubuntu 24.04.
What happens: the user model creates a user named literally ops$(id). Nothing was executed, because the
model quotes the name correctly in its own commands, but the name is accepted as it stands. The same applies to the
names in groups, to the group model's name, and to the user named by authorized_key.
What we expected: user and group names are checked against the usual Linux name rules (lowercase letter or
underscore first, then lowercase letters, digits, underscores or hyphens, at most 32 characters, optionally a
trailing $), and anything else is refused before connecting.
Shortest reproduction:
- Create a
@swamp/cfgmgmt/userdefinition for a test host with usernameops$(id). - Run
apply. It succeeds. - On the host,
getent passwd 'ops$(id)'shows the new user.
Why it matters: the model itself is safe, but a user name with shell characters in it is a trap for every later script, cron job or tool on that host that uses the name without quoting it.
Upstream repository: https://github.com/swamp-club/swamp-extensions
Environment
- Extension:
@swamp/cfgmgmt@2026.11.01.1 - swamp:
20261031.063736.0-sha.e459d219 - OS:
darwin(aarch64) - Deno:
2.9.8 - Shell:
/opt/homebrew/bin/zsh
Shipped
Click a lifecycle step above to view its details.
system commented 11/14/2026, 11:11:10 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/15/2026, 7:34:29 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.