Repository navigation
Conversation
Signed-off-by: August Vi <augustvilakia@gmail.com>
avgvi
requested review from
cosmicbboy,
davidmirror-ops,
kumare3,
machichima,
pingsutw,
samhita-alla and
wild-endeavor
as code owners
November 2, 2026 03:32
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.
Tracking issue
Closes flyteorg/flyte#8289 flyteorg/flyte#8289
Why are the changes needed?
LocalTaskCache.initialize()opens the cache with diskcache's defaultDisk, which reads values back withpickle.load. An entry written into~/.flyte/local-cacheby someone else runs code in the flytekit process on the next cache hit. This is CVE-2025-69872 (GHSA-w8v5-vhqr-4h9v).The main point is that diskcache 5.6.3 is unmaintained (last release August 2023) and flagged by scanners with no fixed version. #3475 made the import lazy, but
diskcacheis still a required dependency, so every install still has the finding.What changes were proposed in this pull request?
diskcache-community>=5.8.1instead ofdiskcache. It is a maintained fork with the same API, the same files on disk as diskcache 5.6.3 and the same license (Apache-2.0). Disclosure: I maintain it.SafeDisk.with_types(...).with_options(on_error="miss"):LiteralMaps, so reads still allowflytekit.models.literals,flytekit.models.types,flytekit.models.core.typesand protobuf'sStruct.test_cache_old_version_of_literal_mappasses unchanged.import flytekitstill doesn't load the cache package.How was this patch tested?
diskcache_community.pytest tests/flytekit/unit/core/test_local_cache.py: 25 passed on Python 3.13, withdiskcachenot installed.pytest tests/flytekit/unit/core -m 767 passed and 17 skipped. The result onmaster` in the same environment is identical.ruff checkpasses on the changed files.On
master(diskcache 5.6.3):With this change:
Steps 1 and 2 are the same before and after this change: a normal entry is still served from the cache. Only step 3 differs. On
master, reading the tampered entry unpickles it, so its code runs in the flytekit process. With this change,SafeDiskrefuses the entry without running itSetup process
none required
Screenshots
non applicable
Check all the applicable boxes
Related PRs
#3475
Docs link
https://diskcache-community.readthedocs.io/en/latest/fix-cve-2025-69872.html