diamond-recursion deeper scan: CLEAN for pytorch/tensorflow/sklearn/ray/prefect/luigi/numpy

This commit is contained in:
russell@unturf.com 2026-03-29 17:53:36 -04:00
parent 60cd7aa41c
commit 36b07aa1f4
7 changed files with 93 additions and 0 deletions

View file

@ -0,0 +1,13 @@
## Diamond Recursion Scan (scikit-learn) — CLEAN
**Scan date:** 2026-03-29
**Pattern:** Recursive cycle/dependency check without visited set (CWE-407 diamond recursion, O(2^D))
### Files examined
- `sklearn/utils/graph.py:single_source_shortest_path_length` — BFS with `seen` dict — CLEAN
- `sklearn/pipeline.py` — linear pipeline (no DAG) — CLEAN
- `sklearn/tree/_reingold_tilford.py` — tree (not DAG, no diamond possible) — CLEAN
- `sklearn/cluster/_agglomerative.py:ward_tree` — uses `not_visited` numpy array — CLEAN
### Verdict: CLEAN — no diamond recursion CWE-407 found beyond existing sklearn-0001