Repository navigation
Conversation
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #41.
What this changes
authenticatedCliscounted a CLI as logged in only when a found credential's path ended with the path its verb table named. The tables and the scan had drifted apart. With the six files below present, onmain:With this change, all six. Credentials are the headline of
npx memnox, so the scan was under-reporting on most machines.Four changes, each small:
~/.config/gcloudis where gcloud keepscredentials.db, and~/.netlifywhere netlify keepsconfig.json; a suffix match saw neither. The directory match requires the/boundary, so~/.netlifydoes not claim~/.netlify-old/— a test pins that.~/.netrc, where the Heroku CLI writes its token.~/.herokuholds no credential..pgpass,.my.cnf,.config/gcloud/application_default_credentials.jsonand.azure/msal_token_cache.json, as the issue lists.~credential in every table and asserts the scan reads that file or a file inside it.Two things the drift test caught, one of them mine
~/.myclircand~/.config/pgcli/configcame in with #127, which I wrote. Neither holds a credential — mycli and pgcli authenticate through.my.cnfand.pgpass, which those tables already name — so I took them out rather than teach the scan to report config files as credentials.And #128, still open, adds a
pulumitable naming~/.pulumi/credentials.json. That is Pulumi's access token, so it belongs in the scan anyway; I added it here so the drift test does not go red the moment #128 lands.How it was verified
In
credentials.test.ts: each of gcloud, netlify, heroku, psql and mysql is reported when its file exists; nothing from those files — the.pgpasspassword, the.my.cnfpassword, the.netrcpassword, the netlify token — appears in whatauthenticatedClisreturns; the sibling-directory negative; and the drift test, one case per table credential.prettier,tscandknipclean. Full suite on Node 24: every failing file also fails onmainhere (the Noise pairing tests, which need the native addon; no Rust on this machine).Checklist
pnpm format && pnpm typecheck && pnpm test && pnpm deadcodeall pass (Noise tests aside)any, no magic values, noconsole.*outsidecli-output.tscredentialfield of heroku, mycli and pgcli changed, as abovescanreports more logged-in CLIs; it reads five more files, structure only, which the changeset names