Skip to content

fix(secret-guard): hide *_AUTH/*_PASS values and connection URL passwords - #17

Merged
arasovic merged 1 commit into
mainfrom
fix/secret-guard-auth-and-url-creds
Oct 12, 2026
Merged

arasovic merged 1 commit into
mainfrom
fix/secret-guard-auth-and-url-creds

Conversation

@arasovic

Copy link
Copy Markdown
Owner

Problem

  • An env line such as export REDISCLI_AUTH=... passed through. The name rule knew only SECRET, TOKEN, PASSWORD and similar words.
  • No rule hid the password in a connection URL, such as redis://:pass@host or postgres://user:pass@host.

Change

  • AUTH and PASS now count when they are the last whole word of an env name. REDISCLI_AUTH, DB_PASS and BASIC_AUTH are hidden. BYPASS, COMPASS and GOOGLE_OAUTH stay.
  • A new rule hides only the password in a connection URL. The scheme, user and host stay. The value runs to the last @, so a raw @ in the password leaves no visible tail.
  • README: the formats line and a new Limits item. A URL password under 8 characters, or one with a raw /, is not hidden. A dev URL such as postgres:postgres@ is hidden, so a shell command that holds one is refused.
  • Version 0.1.8 → 0.1.9.

Verification

  • claude plugin test .: 15 pass, 0 fail. The two new tests fail with the old regexes.
  • claude plugin validate --strict .: passed.
  • ./typecheck.sh secret-guard: exit 0.

…ords

An env line such as export REDISCLI_AUTH=... passed through, because the
name rule knew only SECRET, TOKEN, PASSWORD and the like. AUTH and PASS
now count when they are the last whole word of the name, so DB_PASS and
REDISCLI_AUTH are hidden while BYPASS, COMPASS and GOOGLE_OAUTH stay.

A password in a connection URL, as in redis://:pass@host or
postgres://user:pass@host, is now hidden too. Scheme, user and host stay.
The value runs to the last @, so a raw @ in the password does not leave
a tail visible. The README lists the limits: passwords under 8
characters or with a raw / are not hidden.
@arasovic
arasovic merged commit 8ce2dad into main Oct 12, 2026
1 check passed
@arasovic
arasovic deleted the fix/secret-guard-auth-and-url-creds branch October 12, 2026 17:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant