Skip to main content
← Back to list
01Issue
BugShippedSwamp CLIPublic
Assigneesstack72

Relationships

#1789 Only documented non-interactive auth puts the password in argv; the safe SWAMP_API_KEY path is undocumented

Opened by randybias · 8/22/2026· Shipped 8/23/2026

The only documented way to authenticate non-interactively puts the credential on the command line; the way that avoids it is undocumented.

Measured on swamp --version 20260822.011157.0-sha.06b61472.

swamp auth login --help offers exactly one non-interactive route, and gives it as the worked example:

Non-interactive login   swamp auth login --username alice --password secret --no-browser

A password in argv is readable by any process on the host via /proc/<pid>/cmdline, lands in shell history, and appears in process listings. For an agent-driven or CI-driven setup — which is where non-interactive login is needed — that is the default path.

There is a safe alternative, but it is not documented anywhere I could find:

  • SWAMP_API_KEY works. I found it in the binary's strings, not in swamp auth --help, swamp auth login --help, or swamp help auth (which lists only SWAMP_CLUB_URL).
  • swamp auth server-login --token exists and takes a token, but targets a swamp serve instance (SWAMP_SERVE_URL), not swamp-club, so it does not substitute.

With SWAMP_API_KEY set from a secret store, swamp auth whoami authenticates correctly and swamp issue works. It is a good mechanism — it is simply invisible unless you go looking in the binary.

Requests, either or both:

  1. Document SWAMP_API_KEY in swamp auth --help / swamp auth login --help, the same way --server documents env: SWAMP_CLUB_URL. This alone fixes it.
  2. Add a stdin path--password-stdin or --token-stdin — so the documented non-interactive example does not require argv. docker login --password-stdin is the familiar precedent.

Also worth considering: change the --help example for non-interactive login to the env-var form, so the first thing an integrator copies is the safe one. The current example is the one people will paste into CI.

Context for why this bit us: our house rule forbids credentials in argv, so the documented path was unusable and the usable path was undiscoverable without reading the binary. We came close to concluding there was no supported non-interactive auth at all.

02Bog Flow
OPENTRIAGEDIN PROGRESSSHIPPED+ 1 MOREASSIGNED+ 2 MOREREVIEW+ 9 MOREPR_MERGED+ 2 MORESESSION_SUMMARIZED

Shipped

8/23/2026, 12:02:13 AM

Click a lifecycle step above to view its details.

03Sludge Pulse
stack72 assigned stack728/22/2026, 11:10:46 PM
Editable. Press Enter to edit.

stack72 commented 8/23/2026, 12:02:50 AM

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.