Skip to content
This repository was archived by the owner on Nov 9, 2026. It is now read-only.

fix(baseline): Publish a fixed message for an error line in a reviewer-log view, not its text - #469

Merged
mpaulosky merged 8 commits into
mainfrom
chore/fixed-error-line-messages
Nov 6, 2026
Merged

mpaulosky merged 8 commits into
mainfrom
chore/fixed-error-line-messages

Conversation

@mpaulosky

Copy link
Copy Markdown
Owner

Summary

Answers Copilot's thread 1 on mpaulosky/TicketManager#258: an error line in a reviewer log could carry a credential split by invisible fillers (U+3164, U+2800) or as spaced-out hex past the secret checks and into the public run-report artifact.

The reviewer-log view (lib/role-logs.mts, Owned) no longer publishes any text of a log:

  • Error lines become the fixed message [error line: <word>] for the error word they matched.
  • Host status lines have every number masked as #.
  • The view is three sorted sets of fixed lines (host kinds, known tools, error words) plus one [... lines left out] line, so order, repeats, counts and gaps carry nothing.
  • Only the logs of builds the run recorded are copied (at most 20); index.txt says once that others were left out.
  • Docs (references/sandcastle.md, .claude/rules/sandcastle.md, both sandcastle.yml comments) state what the view holds and the small residue that remains.

Regression tests cover both reported bypasses, Unicode look-alikes, the secret note, the sets and their counts, and the log limit; the new behaviours were mutation-checked.

Changes .github/workflows/sandcastle.yml (comments only), so Actions can't push it; pushed with the owner's login.

Test plan

  • scripts/gate.sh (Template tests, Sandcastle check)
  • Local /pre-push-review: 3 rounds, none blocking
  • CI

🤖 Generated with Claude Code

mpaulosky and others added 8 commits November 6, 2026 11:47
…r-log view, not its text

An error line carrying a credential split by invisible fillers (U+3164, U+2800) or as
space-separated hex chunks passed the secret checks and reached the public run report.
The view now keeps [error line: <word>] naming the matched error word, so no free text
of a log reaches it.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…secret note, and update the docs that said error lines are free text

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…ler case's exact view

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…show repeats once and cap the logs copied

A steered reviewer could carry a secret out in the digits of forged host-shaped lines, or in
how often and how many lines and logs it printed.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…nes, so order, count and place carry nothing

The earlier view still let a steered reviewer encode about 500 bits per log in which fixed
lines it printed, in what order, how often and with what gaps between. The host lines,
tool names and error words are now sets, the left-out marker is one line, and the logs
of builds this run started are copied first.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…the view's sets and counts

A sandbox that can write the logs folder could add reviewer-log files of its own, each
with a view of a few dozen bits it chooses.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…he host kinds and the default build record

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Copilot AI balanced review requested due to automatic review settings November 6, 2026 20:46

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🔵 Needs a closer look

The public-artifact sanitizer retains a covert channel capable of reconstructing a credential across several recorded builds, requiring repository-owner or security-reviewer confirmation of that residual risk.

No open issues 🎉

What changed in this PR

This PR hardens Sandcastle’s reviewer-log artifacts in the shared CI Baseline and its dotfiles copies, preventing error-line text—including credentials disguised with invisible characters or spaced hex—from reaching the published log views.

Changes:

  • Replaces error text with fixed messages, masks host-line numbers, and emits sorted, deduplicated sets without preserving order or repetition.
  • Copies only logs associated with recorded builds, capped at 20, with fixed omission notices.
  • Adds regression coverage and documents the remaining information that fixed-line selection can convey; workflow changes are comments only.
File Description
Support For New Projects/​.claude/​skills/​repo-ci-baseline/​template/​owned/​.sandcastle/​lib/​role-logs.test.mts Tests fixed messages, secret disguises, sorted sets, and log limits.
Support For New Projects/​.claude/​skills/​repo-ci-baseline/​template/​owned/​.sandcastle/​lib/​role-logs.mts Implements fixed log views and recorded-build filtering with a 20-log cap.
Support For New Projects/​.claude/​skills/​repo-ci-baseline/​template/​owned/​.github/​workflows/​sandcastle.yml Updates comments describing artifact sanitization; no workflow behavior changes.
Support For New Projects/​.claude/​skills/​repo-ci-baseline/​references/​sandcastle.md Documents log-view contents, limits, and accepted residual disclosure.
.sandcastle/​lib/​template.test.mts Updates a comment explaining when the log folder and index are created.
.sandcastle/​lib/​role-logs.test.mts Mirrors the Template’s regression tests.
.sandcastle/​lib/​role-logs.mts Mirrors the Template’s log-view hardening.
.github/​workflows/​sandcastle.yml Mirrors the Template’s comment-only clarification.
.claude/​rules/​sandcastle.md Updates repository guidance for fixed views and the build-log cap.

Review effort: Balanced

@mpaulosky
mpaulosky merged commit df48b10 into main Nov 6, 2026
3 checks passed
@mpaulosky
mpaulosky deleted the chore/fixed-error-line-messages branch November 6, 2026 20:52
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants