Open
Conversation
There was a problem hiding this comment.
Pull request overview
This PR implements a rewrite of the GCC evaluator using a new architecture with type handlers. It introduces HTML sanitization using the nh3 library and adds filename validation to prevent XSS attacks through malicious filenames.
Changes:
- Adds nh3 library (>=0.3.3) for HTML sanitization to prevent XSS vulnerabilities
- Creates new type handler architecture with
TypeHandlerbase class andGccimplementation for C/C++ compilation - Implements filename filtering to block files with dangerous characters from uploads and source listings
Reviewed changes
Copilot reviewed 6 out of 7 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| uv.lock | Adds nh3 0.3.3 dependency with wheel distributions for multiple platforms |
| pyproject.toml | Adds nh3>=0.3.3 to project dependencies |
| evaluator/type_handlers.py | New file implementing TypeHandler base class and Gcc handler for C/C++ compilation with Docker isolation and HTML sanitization |
| evaluator/pipelines.py | Adds TypePipe base class and GccPipe implementation integrating the new type handler architecture |
| common/utils.py | Adds has_unsafe_filename() function to detect dangerous characters in filenames |
| common/upload.py | Filters uploaded files with unsafe filenames |
| common/models.py | Filters source files with unsafe filenames when listing all sources |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
a4b616b to
2f1e609
Compare
Contributor
Author
Contributor
|
Before anything else, in terms of security, I do not see any issues. The only "issues" that I found would be cosmetic things:
|
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.
docker runarchitecture instead of relying onentry.pyin Docker Image