Add HTTP allowlist, traceback sanitization, and help HTML hardening w…#38
Merged
Conversation
…ith regression tests
3dgiordano
approved these changes
Jul 17, 2026
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.
This pull request introduces significant improvements to the security and robustness of the codebase, especially around sensitive data handling, HTTP endpoint validation, and traceback sanitization. It adds new security utilities, strengthens token validation and error handling, and provides comprehensive tests for these features. The changes also ensure that sensitive information is not leaked in errors, logs, or tracebacks.
The most important changes are:
Security Utilities and HTTP Endpoint Protection
config/security.pymodule providing helpers for detecting sensitive file paths and allowlisting HTTP endpoints, preventing SSRF and accidental exposure of secrets. (config/security.py)help.perfecto.io) are allowed and that blocked requests do not trigger network calls. (tests/test_http_request_security.py)Token Handling and Error Sanitization
PerfectoTokenvalidation to strictly enforce non-empty string types for tokens and cloud names, raising errors that never include sensitive values. (config/token.py)__repr__forPerfectoTokento avoid leaking secrets, and added tests to ensure errors and representations are always sanitized. (config/token.py,tests/test_token_security.py) [1] [2]Traceback and Output Sanitization
tests/test_traceback_sanitization.py)format_sanitized_tracebackfor error reporting, ensuring consistent sanitization. (tools/ai_scriptless_manager.py)Testing and Utility Improvements
tests/test_datetime_utils.py,tests/test_help_utils_href_interpolation.py) [1] [2]These changes collectively enhance the application's security posture and resilience against common data leakage and SSRF risks.