Instructions to use JohnYossarian1961/keras-nested-lambda-poc with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Keras
How to use JohnYossarian1961/keras-nested-lambda-poc with Keras:
# !pip install -U keras tensorflow huggingface_hub # Keras needs TensorFlow installed to read "hf://" paths, so the tensorflow backend is selected here; # "jax" and "torch" also work for computation once TensorFlow is installed. import os os.environ["KERAS_BACKEND"] = "tensorflow" import keras model = keras.saving.load_model("hf://JohnYossarian1961/keras-nested-lambda-poc") - Notebooks
- Google Colab
- Kaggle
|
Download README.md from JohnYossarian1961/keras-nested-lambda-poc: direct link, hf CLI and curl.
- Browser
- Download file 702 Bytes
-
https://huggingface.co/JohnYossarian1961/keras-nested-lambda-poc/resolve/main/README.md
- Command line
-
hf download hf://JohnYossarian1961/keras-nested-lambda-poc/README.md
-
curl -L -o README.md https://huggingface.co/JohnYossarian1961/keras-nested-lambda-poc/resolve/main/README.md
702 Bytes
| tags: | |
| - security | |
| - proof-of-concept | |
| license: mit | |
| # Keras Nested Lambda PoC — ModelScan Scanner Bypass | |
| This repository contains a proof-of-concept demonstrating that ModelScan's fails to detect Lambda layers nested inside sub-models in Keras files. | |
| ## Vulnerability | |
| **Target:** ModelScan (protectai/modelscan) | |
| **Scanner:** | |
| **Severity:** Medium | |
| The scanner only inspects the top-level array in . If a Lambda layer is nested inside a sub-model (a model-as-a-layer pattern), the scanner never recurses and the Lambda goes undetected. | |
| ## PoC Structure | |
| ## Reproduction | |
| ## Root Cause | |
| only iterates one level: | |
| A recursive scan of nested model configs would close this gap. | |