Skip to content

Redact credentials in terminal check headings - #1738

Merged
mergify[bot] merged 2 commits into
mainfrom
lean178/1655-check-heading-redaction
Nov 26, 2026
Merged

mergify[bot] merged 2 commits into
mainfrom
lean178/1655-check-heading-redaction

Conversation

@eowca

@eowca eowca commented Nov 26, 2026 •

Copy link
Copy Markdown
Contributor

Redact credentials in terminal check headings

Context and goal

  • Context: Private check configuration can contain an authenticated URL or an Authorization header.
  • Problem: The CLI prints the raw command before execution and again in the failure heading.
  • Goal: Apply the existing PR command redactor to both terminal headings.

Closes #1655

Acceptance

  • The progress and failure headings redact URL userinfo in a synthetic configured command.
  • The failed command still executes as configured, returns the same verdict, and is stored verbatim in the private receipt for check identity.
  • Test source line count does not increase.

Notes

  • Only terminal command rendering changes. Check execution, receipts and the delivery architecture use the same contracts.

Base

main @ a6ad74d
Base: a6ad74d

Validation

Recorded for c31580ba8415

  • uv run --group dev ruff check src tests: exit 0
  • uv run --group dev tach check: exit 0
  • uv run --python 3.14 python scripts/check_architecture_docs.py: exit 0
  • scripts/size_budget.sh: exit 0
  • uv run --group dev pytest -q: exit 0

Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.

Review

  • primary, claude, 5f35986, approve

Architecture-Review: unchanged; terminal rendering uses the existing command redactor without changing execution or receipt identity.
Co-Authored-By: Codex <noreply@openai.com>

@loopzero-feder-positronics loopzero-feder-positronics Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

loopzero primary review by claude on 5f35986e66b569a5dc8aae2bee14d50c53aa419e, 21.3s: approve (0 critical, 0 important, 2 suggestion)

Settings per native call (launch configuration and CLI claims, not backend attestation):

  • Call 1: requested model claude-opus-5-5 (effort medium); CLI-reported model claude-opus-5-5 (effort unknown); configured model claude-opus-5-5 (effort medium)

Findings without a file location:

  • suggestion: The checks.inputs warning still prints the raw command to the terminal — This change redacts the running: line and the failure heading, but there is one more place where the configured command reaches the terminal unredacted. When checks.inputs names the command and matches no files in HEAD, _input_key builds status(f"{workflow}: checks.inputs for {command!r} matches no files..."), and cmd_check prints that message as-is through its status lambda. If such a command contains URL userinfo or an Authorization header, the credential appears in this warning. The task only asks for the two headings, so this does not block the change. The smallest fix is to wrap command with github.redact_credentials here, or redact inside the status lambda in cmd_check so every status line is covered.

Native Claude output is retained in the restricted local review receipt.

Comment thread tests/test_cli.py
assert sum(line.startswith(("stage 1/2: exit ", "exit "))
for line in out.splitlines()) == 1
heading = command.replace("fake-heading-secret", "[REDACTED]")
assert out.count(f"running: {heading}\n") == out.count("stage 1/2: exit ") == 1

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

suggestion: The updated test no longer catches a stray bare exit N line

The old assertion counted output lines starting with either stage 1/2: exit or exit and required exactly one. The new one uses out.count("stage 1/2: exit "), so an extra bare exit N line on stdout would now go unnoticed. This is minor. To keep that coverage without adding lines, chain the old line-prefix count into the same equality.

@eowca
eowca marked this pull request as ready for review November 26, 2026 09:08
@eowca

eowca commented Nov 26, 2026

Copy link
Copy Markdown
Contributor Author

@Mergifyio queue

@mergify

mergify Bot commented Nov 26, 2026 •

Copy link
Copy Markdown

✅ Merged into main as f177d7a at 10:24 UTC

5 min in the queue, 5 min of it CI.

So far

  • ✅ Entered the queue Thu 26 Nov, 10:19 · rule main · triggered by @eowca with the @mergifyio queue command
  • ✅ Passed · draft #1801
  • ✅ Merged 10:24 · f177d7a · squash
3 merge conditions met
  • github-review-approved · required by GitHub repository ruleset rule main: PR only, Mergify queue, existing checks required
  • any of · required by GitHub repository ruleset rule main: PR only, Mergify queue, existing checks required:
    • check-success = checks
    • check-neutral = checks
    • check-skipped = checks
  • any of · required by GitHub repository ruleset rule main: PR only, Mergify queue, existing checks required:
    • check-success = Loop-zero Eligibility
    • check-neutral = Loop-zero Eligibility
    • check-skipped = Loop-zero Eligibility

Times in UTC · dashboard · how the merge queue works

@eowca

eowca commented Nov 26, 2026

Copy link
Copy Markdown
Contributor Author

No description provided.

@mergify
mergify Bot merged commit f177d7a into main Nov 26, 2026
13 checks passed
@eowca
eowca deleted the lean178/1655-check-heading-redaction branch November 26, 2026 10:25
@mergify mergify Bot removed the queued label Nov 26, 2026
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.

Redact credentials in terminal check command headings

1 participant