Skip to content

fix: Windows compatibility for UTF-8 output and Rich console#35

Open
JohnFiedler wants to merge 1 commit intoanshumanbh:mainfrom
JohnFiedler:fix/windows-compat
Open

fix: Windows compatibility for UTF-8 output and Rich console#35
JohnFiedler wants to merge 1 commit intoanshumanbh:mainfrom
JohnFiedler:fix/windows-compat

Conversation

@JohnFiedler
Copy link
Copy Markdown

Summary

  • Add UTF-8 stream wrappers (io.TextIOWrapper) for sys.stdout/sys.stderr on Windows to handle emojis and special characters in scan output
  • Use Console(force_terminal=True) for Rich console instances to ensure correct rendering on Windows terminals
  • Always regenerate scan artifacts (not just when DAST is enabled), fixing securevibes report output on all platforms
  • Add test for list-of-dicts evidence format

Files changed

  • packages/core/securevibes/cli/main.py — UTF-8 wrapper + force_terminal
  • packages/core/securevibes/scanner/scanner.py — UTF-8 wrapper + force_terminal + always regenerate artifacts + conditional debug message
  • packages/core/securevibes/scanner/subagent_manager.py — UTF-8 wrapper + force_terminal
  • packages/core/tests/test_scan_output.py — Test for evidence as list of dicts

Test plan

  • Run securevibes scan on Windows and verify emoji/special characters render correctly
  • Run securevibes report after a scan and verify artifacts are generated
  • Run existing test suite: pytest packages/core/tests/

🤖 Generated with Claude Code

On Windows, emoji and special characters in scan output cause encoding
errors. This adds UTF-8 stream wrappers and force_terminal=True for
Rich Console to ensure correct rendering on Windows terminals.

Also fixes artifact regeneration to always run (not just when DAST is
enabled), which is required for 'securevibes report' to work correctly.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@anshumanbh
Copy link
Copy Markdown
Owner

@JohnFiedler Thank you for the PR. I pushed a bunch of changes introducing a new "pr-review" command. As a result of that, this PR has some conflicts. Do you mind taking a look at them and resolving them before I can review?

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.

2 participants