Revert "[AutoPR- Security] Patch keras for CVE-2026-12480 [MEDIUM] (#17925)" — breaks tensorflow golden container - #18286
Merged
Merged
Conversation
…17925)" This reverts commit d00a76d. The CVE-2026-12480 patch adds a module-level rom keras.src.utils.module_utils import h5py at the top of keras/src/saving/saving_lib.py, which forces h5py to be importable the moment anything imports f.keras. The tensorflow golden container's package list (.pipelines/containerSourceData/tensorflow/tensorflow.pkg) does not include python3-h5py, so every tf.keras import in the container now fails with: ImportError: cannot import name 'h5py' from 'keras.src.utils.module_utils' DEV golden container tests (AMD64-GoldenContainerTests-DEV, def 2832) have been failing continuously since 2026-07-14 (first run after the patch landed on 07/13). Reverting to unblock the container pipeline until the fix can be re-landed properly (either as an amended patch that defers the h5py import to function scope, or paired with adding python3-h5py to tensorflow.pkg). Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 26b18818-c4ef-43b9-ad6c-26bbf7c5259e
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.
[Toolio Iglesias🗺️] Reverting the CVE-2026-12480 keras patch (#17925) to unblock the AMD64 DEV golden container pipeline.
Symptom
AMD64-GoldenContainerTests-DEV(def 2832) has been failing continuously since 2026-07-14 on thetensorflowcontainer test with:Timeline: last green run 2026-07-13 13:30 UTC. #17925 landed on 3.0-dev 2026-07-13 05:12 UTC. Next day's test failed. 15 of the 17 runs since have failed; the two intermittent successes look like cache/retry artifacts.
Root cause
The patch (
SPECS/keras/CVE-2026-12480.patch) adds a module-level import at the top ofkeras/src/saving/saving_lib.py:That forces h5py to be resolvable the moment anything imports
tf.keras. The tensorflow container's package list (.pipelines/containerSourceData/tensorflow/tensorflow.pkg) does not includepython3-h5py, so everyimport tensorflownow raises the ImportError above attf.kerasaccess time.Path forward
Re-land the CVE-2026-12480 fix either as:
h5pyscoped to the specific functions that use it (matches upstream keras's usual lazy-load pattern), or.pipelines/containerSourceData/tensorflow/tensorflow.pkgaddingpython3-h5py(and any other dependent containers that importtf.keras).Reverting for now to stop the DEV cascade noise.