785 B
785 B
Diamond Recursion Scan (tensorflow) — CLEAN (deeper scan)
Scan date: 2026-03-29 Pattern: Recursive cycle/dependency check without visited set (CWE-407 diamond recursion, O(2^D))
Files examined
tensorflow/python/ops/variables.py:_has_cycle— usesstatedict with _STARTED/_FINISHED markers (three-color DFS) — CLEANtensorflow/python/keras/engine/functional.py:_build_map_helper— usesfinished_nodesset +nodes_in_progressset — CLEANtensorflow/python/checkpoint/restore.py— uses BFS with deferred queue — CLEANtensorflow/python/ops/control_flow_util_v2.py:resource_input_index— linear parent-chain walk, not DAG traversal — CLEAN