-
Notifications
You must be signed in to change notification settings - Fork 3
fix: open STIG files with explicit UTF-8 encoding #184
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Ensure all files are opened with UTF-8 instead of relying on OS defaults. This prevents UnicodeDecodeError on Windows and ensures consistent behavior across environments when parsing STIG data containing special characters.
for more information, see https://pre-commit.ci
Mab879
left a comment
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.
Thanks for the PR.
All Python code needs to follow the black style guide and all commits need to signed with GPG. I will have contributing guide up soon to help explain this.
Ensure all files are opened with UTF-8 instead of relying on OS defaults. This prevents UnicodeDecodeError on Windows and ensures consistent behavior across environments when parsing STIG data containing special characters.
WalkthroughUpdated XML parsing in stigaview_static/import_stig.py to open files with UTF-8 encoding in _get_root_from_xml_path. No other logic or control flow changes. Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes Poem
Pre-merge checks and finishing touches❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✨ Finishing touches
🧪 Generate unit tests
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Pro Disabled knowledge base sources:
📒 Files selected for processing (1)
🔇 Additional comments (1)
Warning Review ran into problems🔥 ProblemsErrors were encountered while retrieving linked issues. Errors (1)
Tip 👮 Agentic pre-merge checks are now available in preview!Pro plan users can now enable pre-merge checks in their settings to enforce checklists before merging PRs.
Please see the documentation for more information. Example: reviews:
pre_merge_checks:
custom_checks:
- name: "Undocumented Breaking Changes"
mode: "warning"
instructions: |
Pass/fail criteria: All breaking changes to public APIs, CLI flags, environment variables, configuration keys, database schemas, or HTTP/GraphQL endpoints must be documented in the "Breaking Change" section of the PR description and in CHANGELOG.md. Exclude purely internal or private changes (e.g., code not exported from package entry points or explicitly marked as internal).Please share your feedback with us on this Discord post. Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
4b5397a to
674927c
Compare
674927c to
4d87943
Compare
|
Thanks for the updates. The old commits still are on this branch. My suggestion would be start with a fresh branch based on latest master (commit 8a7a579 as of writing this comment) then cherry-pick 9e24083 to that branch. For the sake of causing you less headache I have created #188 those the above steps already done. I will go ahead close this PR, but feel free to open another PR other changes. I will be happy to review them. Again, thanks for the work. |
Ensure all files are opened with UTF-8 instead of relying on OS defaults. This prevents UnicodeDecodeError on Windows and ensures consistent behavior across environments when parsing STIG data containing special characters.
Summary by CodeRabbit