FIX: Removing output_path paramater from video converter - #2558
Open
Richard Lundeen (rlundeen2) wants to merge 1 commit into
Open
FIX: Removing output_path paramater from video converter#2558Richard Lundeen (rlundeen2) wants to merge 1 commit into
Richard Lundeen (rlundeen2) wants to merge 1 commit into
Conversation
Route generated video data through the configured serializer so callers cannot select arbitrary write destinations. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 09fceba6-1124-4a88-96e8-6611959235e4
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.
Summary
output_pathparameter fromAddImageVideoConverter.video_pathtoPath, consistent with other converter input files.data_serializer_factoryand return its managed path.Pathparameters to the backend UI.Rationale
Allowing callers to select
output_pathlets UI-controlled input choose an arbitrary server-side write destination. A path traversal value could overwrite files outside the results store, and even valid-looking paths can cause unexpected filesystem side effects.Selecting storage destinations is also outside converter scope. The converter should transform input into output. The serializer owns output location, storage backend selection, and persistence. Routing the result through
data_serializer_factoryremoves the arbitrary-write surface and aligns this converter with the other file-producing converters.This parameter is removed directly rather than deprecated because retaining it would preserve the security issue.
Validation
uv run --no-sync pytest tests/unit/converter/test_add_image_video_converter.py tests/unit/backend/test_converter_service.py tests/unit/models/test_parameter.py -quv run --no-sync pre-commit run --all-files