Verify yt-dlp temporary downloads before install - #65
Draft
Blackspirits wants to merge 2 commits into
Draft
Blackspirits wants to merge 2 commits into
Blackspirits wants to merge 2 commits into
Conversation
Blackspirits
commented
Sep 12, 2026
Blackspirits
left a comment
Owner
Author
There was a problem hiding this comment.
Independent adversarial re-check on current upstream base: confirmed DownloadYtDlp still verifies the .part path before publishing, while the checksum registry is keyed by the final asset name. Stripping only the terminal .part suffix restores lookup for known assets without broadening policy for unknown versions/assets. The regression proves a tampered yt-dlp.exe.part is rejected and deleted. Full current-base CI run #34721417793 passed restore/build/full tests on the first run with no retry. No blocker identified. Keep draft; no merge/promotion performed.
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
DownloadYtDlpdownloads to the final asset name plus.part, then callsVerifyChecksumAsyncbefore publishing the binary. The checksum lookup uses the file name as the registry key, so the temporary suffix turns a known asset into an unknown one and verification becomes a no-op.This change:
.partsuffix before checksum lookupyt-dlp.exe.partis rejected and deleted instead of bypassing verificationValidation
VerifyChecksumAsync(partFileName, CurrentVersion, ...)beforeFile.MoveBase is upstream
fa6d8623c2adb0c646b6d31a11b221b855339bbe.This PR supersedes internal draft #15.
AI assistance: ChatGPT was used to independently re-audit the current yt-dlp download/verification flow, isolate the temporary-name checksum bypass, port the minimal fix, and add a focused regression.