Repository navigation
docs: clarify registry and auth failure messages - #348
Merged
Merged
Conversation
A value that fails to parse was quoted in full, so userinfo and credential query parameters could land in stderr and CI logs. Strip those before the Invalid ingest URL line. A URL that parses still contributes only its host. Signed-off-by: Cursor Agent <cursoragent@cursor.com> Co-authored-by: vibgrate-team <vibgrate-team@users.noreply.github.com>
Operators had no list of the lines vg scan, push, login, update, and evidence print when a registry, advisory source, or upload fails, or what to do next. Document the messages the CLI prints today, with placeholders, and state that secrets must not appear in output or CI logs. Signed-off-by: Cursor Agent <cursoragent@cursor.com> Co-authored-by: vibgrate-team <vibgrate-team@users.noreply.github.com>
# Conflicts: # DOCS.md # README.md
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.
Summary
Operators running
vg scan(and the other commands that optionally contact a package registry, an advisory source, or a Vibgrate upload endpoint) had no documented list of the lines they would see when the network is down, a registry refuses the request, or a DSN or manifest is missing — and no next step that stays free of secrets.This adds that list to
DOCS.md(linked from the table of contents, thevg scansection, and the README privacy notes). Every quoted line was checked against the command that prints it. Placeholders are<token>,<key_id>,<secret>,<status>, and<path>. The section states that a DSN, anAuthorizationheader, a.npmrcline, and a credential-bearing registry URL must not appear invgoutput or in CI logs.One string did echo a credential-bearing URL.
resolveIngestHost(src/reporting/regions.ts) quoted a rejected--ingestvalue in full, sohttps://<user>:<token>@hostcould land in stderr fromvg login,vg dsn create,vg scan, andvg push. The error now drops userinfo and credential query parameters. A URL that parses still contributes only its host. Covered bysrc/reporting/regions.test.ts.Related issues
Closes #212
Checklist
pnpm testpassespnpm lintis cleanpnpm typecheckis cleangraph.json/ report output (content-hashed IDs, stable sorts; no time, randomness, or filesystem-order dependence)git commit -s, DCO)How to verify
pnpm test pnpm lint pnpm typecheckThe new cases live in
src/reporting/regions.test.ts(does not echo userinfo or credential query parameters from a rejected ingest URL).Verified on this branch:
pnpm test(465 files, 4972 tests),pnpm lint(exit 0; 5 pre-existing warnings in files this PR does not touch), andpnpm typecheck(exit 0).Notes for reviewers
src/core-open/scanners/npm-cache.tsbuilds an internal error,npm view … failed (code=…): <stderr>. npm stderr can contain a registry URL. Both callers catch that error, so it is not what operators see; the scan prints the fixed "cannot connect to the npm registry" text instead. That file's header says not to edit it in this tree (it is replaced by the vendor sync). Left unchanged.Upload failed: HTTP <status>: <body>andPreflight check failed: …print the response body. The CLI does not insert the DSN or theAuthorizationheader. Redacting a server body that happened to echo a credential would be a separate change; it is not in this PR.vg dsn createstill prints the new DSN once, on purpose, so it can be stored asVIBGRATE_DSN. The new section says that line is a credential and must not be copied into a job log.