Skip to content

Bundle symlink fix - #2083

Merged
reinecke merged 2 commits into
AcademySoftwareFoundation:mainfrom
darbyjohnston:otioz-symlink-fix
Oct 30, 2026
Merged

reinecke merged 2 commits into
AcademySoftwareFoundation:mainfrom
darbyjohnston:otioz-symlink-fix

Conversation

@darbyjohnston

Copy link
Copy Markdown
Contributor

This PR fixes an issue where symbolic links could be extracted from bundles, which could point to files outside of the extraction directory. Symbolic links are not valid entries, so this change adds a check for them and gives an error if one is found.

This also updates minizip-ng to 4.2.2, which has a similar fix.

Assisted-by: Claude Code / Claude Opus 5.5

@codecov-commenter

codecov-commenter commented Oct 30, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 0% with 7 lines in your changes missing coverage. Please review.
✅ Project coverage is 83.59%. Comparing base (0bfd9d6) to head (91bced5).

Files with missing lines Patch % Lines
src/opentimelineio/bundle.cpp 0.00% 7 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #2083      +/-   ##
==========================================
- Coverage   83.62%   83.59%   -0.04%     
==========================================
  Files         184      184              
  Lines       13627    13632       +5     
  Branches     1270     1271       +1     
==========================================
  Hits        11395    11395              
- Misses       2059     2064       +5     
  Partials      173      173              
Flag Coverage Δ
py-unittests 83.59% <0.00%> (-0.04%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
src/opentimelineio/bundle.cpp 49.21% <0.00%> (-0.56%) ⬇️

Continue to review full report in Codecov by Harness.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 0bfd9d6...91bced5. Read the comment docs.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@jhodges10 jhodges10 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me, thanks for getting this fix in @darbyjohnston!

@jhodges10 jhodges10 added the security Security-related improvements label Oct 30, 2026
Extracting an entry saved as a symbolic link created the link, and the
zip slip check only looks at the entry's own path, so a crafted bundle
could extract a link to a file outside of the extract path. Bundles do
not contain links, so extracting one is now an error.

Signed-off-by: Darby Johnston <[email protected]>
4.2.2 rejects symbolic link targets that escape the extraction
directory.

Signed-off-by: Darby Johnston <[email protected]>
@reinecke
reinecke merged commit 80c5ff3 into AcademySoftwareFoundation:main Oct 30, 2026
66 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

security Security-related improvements

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants