โ† Back to Pull requests

๐Ÿ“– Improve CLI `--help` output (UX polish) #5430

Closed
unknown closed this pull request without merging on Nov 10, 2026 00:24 UTC
View on GitHub
unknown unknown commented on Nov 06, 2026 19:33 UTC
Author

What kind of change does this PR introduce?

Documentation-type change: a fix-up of the CLI --help output (flag descriptions and the root help text). No behavior changes.

  • PR title follows the guidelines defined in our pull request documentation
  • What is the current behavior?

  • scorecard --help does not mention that a GitHub token is required to run any scan, or which environment variables are accepted

  • --repo/--repos claim GitHub-only inputs ("owner/repo","github.com/owner/repo", "https://github.com/repo"), but gitlab.com/owner/repo is also parsed (and dev.azure.com/... requires the experimental SCORECARD_EXPERIMENTAL mode, so listing it as a normal input overstates support).

  • The --checks possible-values list is built by iterating a map and is never sorted, so the help output shows a different order on every run.

  • Several descriptions are circular or vague: --probes says only "Probes to run.", --output says "output file", --metadata does not say the values end up in JSON output, --local does not say that repository host checks are skipped, --file-mode re-lists its values without explaining them, --verbosity carries a confusing --show-details reference, --show-annotations has a grammar error.
  • What is the new behavior (if this is a feature change)?

    Same code paths, same parsing, only the help strings change:

  • Root help documents the required token environment variables (GITHUB_AUTH_TOKEN, GITHUB_TOKEN, GH_AUTH_TOKEN, GH_TOKEN, GITLAB_AUTH_TOKEN) and shows one example invocation (cobra Example).

  • --repo/--repos list the gitlab.com/owner/repo format; thedev.azure.com format is removed until it works without

  • SCORECARD_EXPERIMENTAL.
  • The --checks possible-values list is sorted alphabetically and comma-spaced (matching --format), so the help output is stable across runs.

  • Descriptions for --local, --probes, --metadata, --verbosity, --output, --commit-depth, --file-mode, --npm/, --pypi/, --rubygems/, --nuget, and --show-annotations are more concrete.

  • No check results, scores, parsing, or defaults change.
  • Tests for the changes have been added (for bug fixes/features) (Not applicable: string-only change. go test -race over ./options/... and ./cmd/... passes with SKIP_GINKGO=1.)
  • Which issue(s) this PR fixes

    NONE

    Special notes for your reviewer

  • make check-linter reports zero findings in the two changed files. The target fails on current main for pre-existing findings in untouched packages (goconst/gocognit), which this PR does not address.

  • Full make unit-test was not completed locally (long runtime); CI covers it. The changed packages pass under the same flags.

  • The Azure DevOps format removal from --repo/--repos is deliberate:makeRepo in cmd/root.go only tries Azure DevOps when SCORECARD_EXPERIMENTAL is set, so the previous help text described an input that does not work by default.
  • Does this PR introduce a user-facing change?

    Yes โ€” the CLI help output text.

    ``release-note
    Improved CLI help: documents the required token environment variables, corrects the --repo/--repos input formats (adds gitlab.com, removes the experimental dev.azure.com format), sorts the --checks possible-values list, and clarifies several flag descriptions. No behavior changes.
    ``

    Diff: 436 lines (+327 / -109) across 5 files Reviewer: justaugustus Review duration: 4611m
    All Vouch review confidence checks passed
    Residual risk 0.18 = Change Risk (0.45) ร— (1 โˆ’ Review Confidence (0.60)). Review depth and reviewer attention state are adequate.
    Model 1 ยท Change Risk (XGBoost)
    Score: 0.45 ยท 436 lines diff across 5 files
    0.45
    Model 2 ยท Review Depth (DistilBERT)
    Depth Score: 0.17 ยท 1 substantive comment(s)
    0.17
    Model 3 ยท Review Timing & Attention
    Session adequacy: 100% ยท Reviewer familiarity: 35%
    60%
    Bedrock Claude 3 ยท Risk Narration
    (disconnected)
    Groq
    Groq Risk Narration
    AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
    Model 1 ยท Change Risk Attribution
    SHAP Weights
    Diff Size diff_size
    0.364
    Shallow Review Depth shallow_review_depth
    0.289
    Real PR Conversation Timeline
    1 comments
    "Review active on #5430"
    general weight: 0.35
    Reviewers
    Assignees
    Unassigned
    Labels
    risk: low confidence: 60.5% reviewed
    Vouch Risk Breakdown
    AI-powered review risk analysis
    Change Risk
    Change Risk ยท Model 1 (XGBoost)
    Predicted defect probability (0.00โ€“1.00) based on diff churn, modified sensitive files, and author risk history.
    Score: 45.2% (MEDIUM) ยท Higher = larger blast radius
    45.2%
    Review Confidence
    Review Confidence ยท Models 2 & 3
    Scrutiny score (0.00โ€“1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
    Score: 60.5% ยท Lower = rushed or shallow review
    60.5%
    Residual Risk
    Residual Risk ยท Core Equation
    Residual = Change ร— (1 โˆ’ Confidence)
    Unmitigated risk surviving review. โ‰ฅ 0.65 triggers an automated re-queue to protect production.
    Score: 17.9% ยท Safe to merge
    17.9%
    Repository