# dask — CWE-407 Scan: CLEAN

Scanned: 2026-03-29

## Scope

- `dask/optimization.py` — fuse_linear, fuse: `seen = set()`
- `dask/_task_spec.py` — graph traversal: `seen = set()`
- `dask/highlevelgraph.py` — dependency walk: `seen = set()`
- `dask/dot.py` — DAG visualization: `seen = set()`
- `dask/order.py` — transitive_deps dedup: `transitive_deps_ids = set()` (list used only for ordered iteration, dedup via set)
- `dask/dataframe/dask_expr/_expr.py` — `ancestors = []` is a pure accumulator list (not used for membership checks; dedup done via `seen = set()` at line 3192)

## Verdict

No CWE-407 (algorithmic complexity / quadratic membership check) defects found.
All visited/seen deduplication uses `set` or `dict` throughout the task graph
traversal and optimization paths.
