Conversation
…r Python binding security and validate compiler paths before execution.
… command execution and ensure absolute paths for compiler and batch files are validated before running commands.
…Add *.obj to .gitignore and enhance README with clearer installation and usage instructions, including automatic compiler detection and updated command line arguments.
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 includes several changes to enhance security, improve error handling, and add tests for the compiler detection functionality. The most important changes include switching to
html/templatefor security, adding context to command executions, centralizing error messages, and adding comprehensive tests.Security Improvements:
binding/generator.go: Switched fromtext/templatetohtml/templatefor defining the template for Python binding to enhance security. [1] [2]Command Execution Enhancements:
compiler/compile.go: Added validation for absolute paths and usedexec.CommandContextto ensure safe execution of commands. [1] [2] [3]Error Handling Improvements:
compiler/detect.go: Centralized error messages into constants and improved error handling for unsupported operations and invalid paths. [1] [2] [3] [4] [5] [6] [7]Testing Enhancements:
compiler/detect_test.go: Added comprehensive tests for compiler detection, including mock compilers and validation of include paths.Funding Information:
.github/FUNDING.yml: Added funding information foritsfuadon GitHub and Buy Me a Coffee.