Block tarball members pointing outside tarball#1831
Merged
jeremybeard merged 3 commits intomainfrom Apr 8, 2025
Merged
Conversation
neel-astro
approved these changes
Apr 8, 2025
cloud/deploy/deploy.go
Outdated
Comment on lines
279
to
280
| // only validate symlinks for Airflow 3.x (i.e. don't break backwards compatibility with Airflow 2.x deployments) | ||
| validateSymlinks := airflowversions.AirflowMajorVersionForRuntimeVersion(deployInfo.currentVersion) == "3" |
Contributor
There was a problem hiding this comment.
nit: maybe we could move this outside the if/else block to save ourself from repeating
Contributor
Author
There was a problem hiding this comment.
Yeah good call. I've centralized it in UploadBundle
neel-astro
pushed a commit
that referenced
this pull request
Apr 9, 2025
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.
Description
This changes DAG deploys so that the bundle tarball members cannot symlink to files outside of the tarball. Such external files are not included in DAG deploys and so are not available on the Airflow containers.
This check is only added for deploys to Airflow 3 deployments because in Airflow 3 DAG deploys do not support external symlinks and we want to block those at the source. It is possible that bad symlinks are being deployed to existing Airflow 2 deployments and we do not want to unnecessarily break those deploys.
🎟 Issue(s)
Resolves #1825
🧪 Functional Testing
📸 Screenshots
📋 Checklist
make testbefore taking out of draftmake lintbefore taking out of draft