deb publish: Create unique temporary files each time#1602
Open
andrewshadura wants to merge 1 commit into
Open
Conversation
If two publish jobs run concurrently (which they arguably shouldn’t), they’d step on each other toes and remove Packages.tmp file the other job’s just created. The API has locking for concurrent publish/drop operations on the same prefix, but command-line operations bypass that lock. Also, not having a predictable temporary filename is generally good from a security standpoint, given that cryptographic signing is involved. Work around the issue by creating a per-job temporary file. Signed-off-by: Andrej Shadura <andrew.shadura@collabora.co.uk>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #1602 +/- ##
==========================================
- Coverage 77.37% 77.06% -0.32%
==========================================
Files 165 165
Lines 15747 15747
==========================================
- Hits 12185 12136 -49
- Misses 2356 2409 +53
+ Partials 1206 1202 -4 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
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.
If two publish jobs run concurrently (which they arguably shouldn’t), they’d step on each other toes and remove Packages.tmp file the other job’s just created.
The API has locking for concurrent publish/drop operations on the same prefix, but command-line operations bypass that lock. Also, not having a predictable temporary filename is generally good from a security standpoint, given that cryptographic signing is involved.
Work around the issue by creating a per-job temporary file.