Skip to content

docs: clarify registry and auth failure messages - #348

Merged
vibgrate-team merged 3 commits into
mainfrom
cursor/registry-auth-troubleshooting-1395
Oct 5, 2026
Merged

vibgrate-team merged 3 commits into
mainfrom
cursor/registry-auth-troubleshooting-1395

Conversation

@vibgrate-team

@vibgrate-team vibgrate-team commented Oct 4, 2026 •

Copy link
Copy Markdown
Contributor

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, the vg scan section, 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, an Authorization header, a .npmrc line, and a credential-bearing registry URL must not appear in vg output or in CI logs.

One string did echo a credential-bearing URL. resolveIngestHost (src/reporting/regions.ts) quoted a rejected --ingest value in full, so https://<user>:<token>@host could land in stderr from vg login, vg dsn create, vg scan, and vg push. The error now drops userinfo and credential query parameters. A URL that parses still contributes only its host. Covered by src/reporting/regions.test.ts.

Related issues

Closes #212

Checklist

  • pnpm test passes
  • pnpm lint is clean
  • pnpm typecheck is clean
  • Docs updated (README / DOCS / ARCHITECTURE) where behavior changed
  • Determinism preserved — identical input still produces identical graph.json / report output (content-hashed IDs, stable sorts; no time, randomness, or filesystem-order dependence)
  • No proprietary or internal references — public, Apache-2.0 content only
  • Commits use Conventional Commits and are signed off (git commit -s, DCO)

How to verify

pnpm test
pnpm lint
pnpm typecheck

The 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), and pnpm typecheck (exit 0).

Notes for reviewers

  • src/core-open/scanners/npm-cache.ts builds 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> and Preflight check failed: … print the response body. The CLI does not insert the DSN or the Authorization header. Redacting a server body that happened to echo a credential would be a separate change; it is not in this PR.
  • vg dsn create still prints the new DSN once, on purpose, so it can be stored as VIBGRATE_DSN. The new section says that line is a credential and must not be copied into a job log.
Open in Web Open in Cursor 

cursoragent and others added 3 commits October 4, 2026 21:57
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
@vibgrate-team
vibgrate-team merged commit 7211d61 into main Oct 5, 2026
1 check passed
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.

Docs: clarify registry/auth failure wording for remote lookup paths (no secrets)

2 participants