Skip to content

Docs: document machine-readable scan, report, and SBOM output contracts #163

Open

Description

@vibgrate-team

Context

The README shows vg scan, SARIF upload, SBOM export, and report generation, but there is no focused reference explaining the output contracts. CI users need stable expectations for formats, exit codes, and what may vary.

Related but separate: #151 covers a minimal SBOM/VEX end-to-end example. This issue is the contract reference.

What to do

Add a concise docs/OUTPUTS.md (or equivalent) covering:

  • vg scan --format json|sarif|md (verify shipped flags)
  • vg report (if shipped)
  • vg sbom export formats actually supported
  • schemaVersion / stable fields vs intentionally variable fields (e.g. timestamps)
  • exit codes and --fail-on (if present)
  • that network upload/--push is explicit and opt-in
  • one small sanitized example per important format

Document only currently shipped behaviour.

Acceptance

  • A CI user can pick format + exit behaviour without reading source
  • Examples are valid and copy-pasteable
  • Local-first / opt-in network behaviour stated accurately
  • No undocumented stability guarantees claimed

Mentoring notes

Docs-only. Prefer vg. Conventional Commit docs: + DCO (git commit -s).

Activity

  1. added
    documentation
    good first issue
    on Sep 16, 2026
  2. vibgrate-team commented on Oct 5, 2026

    @vibgrate-team
    ContributorAuthor

    Spec notes for implementers

    Facts from the current CLI to anchor docs/OUTPUTS.md:

    • vg scan --format text|json|sarif|md (default text), --out <file>. JUnit XML is a separate --junit <file> written alongside the main format; --format junit is rejected with a usage error.
    • vg report reads --in (default .vibgrate/scan_result.json) and supports --format md|text|json.
    • vg sbom export --format cyclonedx|spdx; vg sbom delta; vg sbom vex (OpenVEX v0.2.0).
    • The scan artifact carries schemaVersion: '1.0' (src/core-open/types.ts). Document it as the version field, and do not promise more stability than that field implies.
    • Gating flags: --fail-on <gates> (warn/error, architecture-*, iac-finding[=<severity>], security-finding[=<severity>]), --drift-budget, --drift-worsening.
    • Network: --push (with --dsn or VIBGRATE_DSN) is the only upload and is opt-in; --offline makes no network calls. --no-local-artifacts and --max-privacy stop .vibgrate/*.json being written.

    Suggested page shape. One table per command (format, default destination, stable fields, fields that vary such as timestamps and durations), then one exit-code table. Exit codes come from src/util/exit.ts; link #234 for the CI-gating walkthrough instead of repeating it.

    Examples. Keep each sanitized example under about 30 lines. Generate them from a tiny fixture with --offline, and trim rather than hand-write fields.

    Out of scope. The SBOM tutorial (#151), the review JSON contract (#231), and any change to emitters. DCO sign-off, docs: commit.

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

    documentationgood first issue

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions