← Back to Pull requests

Credentials rail: secret reads run masked, secrets never leave #2437

Closed
unknown closed this pull request without merging on Dec 01, 2026 17:26 UTC
View on GitHub
unknown unknown commented on Dec 01, 2026 17:25 UTC
Author

Rails card (Order 0.11735), slice 3 of 6: the Credentials rail.

Before: a secret store read (secret-tool lookup, security find-generic-password, a keyring file) or a tool named for secrets parked for a person's yes in every mode, and if run, its output reached the model in the clear.

After: those steps run with no card, and their output reaches the model with keys, tokens and passwords masked (redact_for_share). The rail refuses, with a reason the model can act on:

  • a key, token or password written into the step itself;

  • a network program (curl, ssh, gh, git, mail tools, a :// word) in the same command as the secret read;

  • setting or feeding an account password (passwd, chpasswd, sudo -S / --stdin, --password…);

  • a send (connector or shell mail) whose words hold a secret.
  • Typing into a password field and adding a connection that needs a token are the person's own input, so they keep their card (decided with the click sends in slice 6).

    How: rails::check gains a Credentials arm (credentials and secret_command); rails::scrub masks a credentials step's output, called once in run.rs right after dispatch. name_class and is_typing_tool are now pub(crate).

    Tests updated with literal values: the perm parking list moves the two secret reads to Always runs them; the auto_review "dangerous" sample is now a boot change that still parks; two repair cases that feed sudo a password go from Hard(Credentials) to HardFloor (refused, never typed), which is stricter.

    Base SHA: a6feae98 (beta).
    Run path: decide(Step) → rails::check(Credentials, subject); tool output → run.rs after hold_send/dispatch_tool_call → harness::scrub.
    Verified locally (GitHub CI is off): cargo test --lib in grokhub-agent, 3490 passed, 10 failed, the same 10 that fail on plain beta; rails tests 15/15; src-tauri cargo check --lib clean; scripts/ci-guards.sh adds no new entries over beta.
    Skipped / not verified: a real secret read on Beast (waiting on a Beast session); GitHub CI (off).

    ---
    _Generated by Claude Code_

    Diff: 262 lines (+196 / -66) across 3 files Reviewer: cursor[bot] Review duration: 1m
    All Vouch review confidence checks passed
    Residual risk 0.43 = Change Risk (0.62) × (1 − Review Confidence (0.32)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.62 · 262 lines diff across 3 files
    0.62
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.17 · 1 substantive comment(s)
    0.17
    Model 3 · Review Timing & Attention
    Session adequacy: 19% · Reviewer familiarity: 35%
    31%
    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.333
    Shallow Review Depth shallow_review_depth
    0.289
    Sensitive Paths sensitive_paths
    0.062
    Real PR Conversation Timeline
    1 comments
    "Review active on #2437"
    general weight: 0.35
    Reviewers
    Assignees
    Unassigned
    Labels
    risk: medium confidence: 31.5% reviewed sensitive_module
    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: 62.4% (MEDIUM) · Higher = larger blast radius
    62.4%
    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: 31.5% · Lower = rushed or shallow review
    31.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: 42.8% · Moderate risk
    42.8%