GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Strip control characters from auth entry prompt by fnando · Pull Request #2667 · stellar/stellar-cli

Conversation

@fnando

@fnando fnando commented Aug 4, 2026

Copy link
Copy Markdown
Member

What

Sanitize the attacker-influenced strings rendered by format_auth_entry in log/auth.rs. The function name (Fn:), each contract-function argument (Args:), and the CreateContractV2 constructor arguments are now passed through soroban_spec_tools::sanitize before display, so terminal-escape and other control bytes are escaped rather than emitted verbatim.

Why

Auth entries shown in the interactive signing prompt come from the RPC's simulateTransaction response. A top-level ScVal::Symbol argument and the function name were printed raw, so control characters (e.g. ANSI escapes) reached the terminal unescaped and could distort what the user sees before approving a signature. The rest of the codebase already sanitizes attacker-influenced output at the display site — log/event.rs, commands/events.rs, and arg_parsing.rs — so this brings the auth prompt in line with that convention. Because the escaping lives inside format_auth_entry, it covers all of its call sites at once (the prompt, --auto-sign, and both invalid-entry error messages). A regression test mirrors the existing log/event.rs test, asserting no control characters survive.

Known limitations

Sanitization is applied at the display site rather than at the boundary in soroban_spec_tools::to_string. Boundary-level hardening (sanitizing the top-level ScVal::Symbol arm, capping the rendered argument count, and resetting terminal state before the decision line) is left as possible follow-up defence in depth.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@fnando
Strip control characters from auth entry prompt.
3550288
Copilot AI balanced review requested due to automatic review settings August 4, 2026 17:08
@github-project-automation github-project-automation Bot added this to DevX Aug 4, 2026
@github-project-automation github-project-automation Bot moved this to Backlog (Not Ready) in DevX Aug 4, 2026
@fnando
fnando requested review from leighmcculloch, marcelosalloum and mootz12 August 4, 2026 17:08
Copilot started reviewing on behalf of fnando August 4, 2026 17:08
View session
@fnando fnando self-assigned this Aug 4, 2026
@fnando fnando moved this from Backlog (Not Ready) to Needs Review in DevX Aug 4, 2026
Copilot AI reviewed Aug 4, 2026
View reviewed changes

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

Pull request overview

Sanitizes attacker-influenced auth-entry output before terminal display.

Changes:

  • Sanitizes function names, invocation arguments, and constructor arguments.
  • Adds a control-character regression test.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread cmd/soroban-cli/src/log/auth.rs Resolved

Uh oh!

There was an error while loading. Please reload this page.

@fnando
Test constructor args are stripped of control characters.
ddc8843
mootz12
mootz12 approved these changes Aug 4, 2026
View reviewed changes
@fnando
Merge branch 'main' into sanitize-auth-entry-display
3d5aed8
@fnando
fnando enabled auto-merge (squash) August 4, 2026 18:45
@fnando
fnando merged commit ab98bd3 into main Aug 4, 2026
229 checks passed

Uh oh!

There was an error while loading. Please reload this page.

@fnando
fnando deleted the sanitize-auth-entry-display branch August 4, 2026 18:57
@github-project-automation github-project-automation Bot moved this from Needs Review to Done in DevX Aug 4, 2026
@fnando fnando mentioned this pull request Aug 6, 2026
Strip control characters from contract read output #2672
Merged
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

Copilot code review Copilot
Copilot review effort
Applies to this pull request for everyone.Learn more about Copilot code review.
Copilot left review comments
@mootz12 mootz12 mootz12 approved these changes
@leighmcculloch leighmcculloch Awaiting requested review from leighmcculloch
@marcelosalloum marcelosalloum Awaiting requested review from marcelosalloum

Uh oh!

There was an error while loading. Please reload this page.

Assignees

@fnando fnando

Labels

None yet

Projects

DevX
Status: Done

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

3 participants

@fnando @mootz12
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.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.