Skip to content

Bug: actionable error when --package-manifest path is missing or unreadable #283

Open

Description

@vibgrate-team

Context

Offline vg scan --vulns --package-manifest <path> (see #239 for docs) should fail closed with an actionable error when the path is missing, unreadable, or not a usable manifest — not a cryptic stack or empty success. CI and assistants need a stable message + non-zero exit.

What to do

  1. Find load paths for --package-manifest that dump stacks or succeed with empty data on bad paths.
  2. Emit a deterministic user-facing error (path + hint); never echo secret material from nearby env/files.
  3. Add a focused test for missing and unreadable cases.

Acceptance

  • Missing/unreadable manifest → actionable error + non-zero exit
  • No secret material in the message
  • Test coverage; DCO

Activity

  1. added
    bug
    on Sep 28, 2026
  2. vibgrate-team commented on Oct 9, 2026

    @vibgrate-team
    ContributorAuthor

    Status on main

    This looks already implemented on current main:

    • Loader: src/reporting/package-version-manifest.ts — PackageManifestError with stable not_found / unreadable / unusable messages that name the resolved path and never echo file/env secrets.
    • CLI fail-closed: src/reporting/commands/scan.ts loads --package-manifest before scan work and throws CliError + non-zero exit (no stack dump).
    • Tests: src/reporting/package-version-manifest.test.ts covers missing, unreadable, directory, invalid JSON, and bad ZIP cases with secret-sentinel assertions.

    Acceptance checklist (for whoever closes)

    • Missing/unreadable → actionable path-named error + non-zero exit
    • No secret material in the message
    • Focused unit coverage

    If anything remains, it would be a thin CLI e2e (vg scan --offline --package-manifest /no/such.json asserts exit + stderr). Otherwise this issue can be closed as done — no new fix PR needed from this pass.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions