Repository navigation
fix: escape remote text in terminal output and refuse unsafe names on git export - #365
Merged
Merged
Conversation
… snapshots an export writes
…ng mirror-only ones
…emote and Protocol on one line; docs
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars.
|
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
tonibergholm
approved these changes
Nov 20, 2026
tonibergholm
left a comment
Member
There was a problem hiding this comment.
Reviewed: sol-loop (5 rounds; last item fixed by removing export cleanup), independent Opus review of the final change, all checks green, Codex review has no findings.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
An audit found five small ways untrusted repository content or remote text could misbehave once it left sc:
.gitor.gitmodules, or names with/,\or NUL. Export now checks names where it writes a new Git tree, using gix's own validator for the.git/.gitmodulesHFS and NTFS aliases. The ref and the mirror push do not move on refusal.sc log, transcript rows and ref-name diagnostics can carry ANSI or OSC escapes and bidi controls. They are now escaped when displayed. One-line output also escapes\n,\rand\t, so a commit message cannot fake a signature-status line. Stored values and wire payloads stay raw; wire framing and error codes are unchanged.serve-tokens.tomlis now written owner-only (0600) on create, rotate and remove.Debugoutput.IndexEntryandBranchIndexincrates/cryptonow have redactingDebugimpls.Also recorded in the threat model: sealed blobs use constant associated data, so a writer can move a sealed blob to another path or roll it back. Binding the path would force a reseal on every rename, so integrity of placement comes from signed commits.
Proof: tests for each item, several checked to fail without the fix:
export_refuses_hostile_name_before_any_ref_moves: refusal, then a clean retry to a non-default ref with readable HEAD, then a pre-existing repo left untouched.only_snapshots_that_will_be_written_are_name_checked.network_push_checks_names_only_in_commits_the_server_lacks.log_line_escapes_terminal_controls_from_author_and_message.error_text_crosses_the_wire_raw_and_is_escaped_once_on_display.token_file_is_owner_only_after_add_rotate_and_remove.debug_output_never_contains_dek_bytes.cargo test -p scl-gitio -p scl-core -p scl-repo -p scl-cliand workspace clippy pass.Reviewed with sol-loop: 5 rounds with gpt-6.2-sol. Sol verdict: changes requested in round 5 (a failed export's cleanup could delete a concurrent export's branch). Fixed after the budget ended by removing the cleanup entirely, then checked by an independent Opus review, whose suggestions are applied.
Created with Claude Opus 5.5 and Claude Sonnet 5.5 in Claude Code.