Skip to content

Update download-artifact plugin in publish-to-test-pypi.yml to fix vulnerability - #1596

Merged
webknjaz merged 1 commit into
pypa:mainfrom
markusgrotz:main
Sep 5, 2024
Merged

Update download-artifact plugin in publish-to-test-pypi.yml to fix vulnerability#1596
webknjaz merged 1 commit into
pypa:mainfrom
markusgrotz:main

Conversation

@markusgrotz

@markusgrotz markusgrotz commented Sep 4, 2024

Copy link
Copy Markdown
Contributor

Versions of actions/download-artifact before 4.1.7 are vulnerable to arbitrary file write when downloading and extracting a specifically crafted artifact that contains path traversal filenames.

Fore more details see: GHSA-6q32-hq47-5qq3


📚 Documentation preview 📚: https://python-packaging-user-guide--1596.org.readthedocs.build/en/1596/guides/publishing-package-distribution-releases-using-github-actions-ci-cd-workflows/

…lnerability

Versions of actions/download-artifact before 4.1.7 are vulnerable to arbitrary file write when downloading and extracting a specifically crafted artifact that contains path traversal filenames.

Fore more details see: GHSA-6q32-hq47-5qq3

@sinoroc sinoroc left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I wonder if it is in the long term manageable to keep those up to date? Are Dependabot and tools like this able to help with that?

@zanieb

zanieb commented Sep 4, 2024

Copy link
Copy Markdown
Contributor

@sinoroc

sinoroc commented Sep 4, 2024

Copy link
Copy Markdown
Contributor

Yes Dependabot supports bumping these versions https://docs.github.com/en/code-security/dependabot/working-with-dependabot/keeping-your-actions-up-to-date-with-dependabot

Even for the files that are in non-regular locations (i.e. not in .github/workflows)?

@webknjaz

webknjaz commented Sep 5, 2024

Copy link
Copy Markdown
Member

Even for the files that are in non-regular locations (i.e. not in .github/workflows)?

Not sure. However, I wouldn't want hashes or patch-level version bumps in the guide, which is why I kept the major-version refs in it.

They also need to be manually validated, since for example the upload+download actions of v4 have breaking changes. They probably don't affect the example workflow but would affect people with more complicated scenarios, having matrices of C-extensions.

@webknjaz webknjaz left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks!

@webknjaz
webknjaz enabled auto-merge September 5, 2024 14:25
@webknjaz
webknjaz added this pull request to the merge queue Sep 5, 2024
Merged via the queue into pypa:main with commit 958adec Sep 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants