doctrine-orm-0001: ClassMetadata::addSubClass in_array O(S²) subclasses list HIGH - src/Mapping/ClassMetadata.php addSubClass() scans plain $subClasses list - addSubClasses($parent->subClasses) called in doLoadMetadata: O(S²) per class - Fix: parallel $subClassesSet hash for O(1) membership; 500x at S=1000 composer-0003: InstalledRepository::getDependents in_array O(P²) needles list MEDIUM - needles array grows during foreach($packages) loop, in_array scan 3 sites - $packagesFoundSet already exists for cycle-detection but needles is separate - Fix: add $needlesSet = array_fill_keys($needles, true), mirror growth; 1000x at P=1000 cayley: CLEAN (confirmed -- map-based seen/pathMap throughout) tinkerpop: CLEAN (confirmed -- existing CLEAN.md valid, sort ArrayList is query-plan-time only)
12 lines
733 B
Markdown
12 lines
733 B
Markdown
# CLEAN — actix-web
|
|
|
|
Scanned 2026-03-29 for CWE-407 (algorithmic complexity).
|
|
|
|
## Findings
|
|
|
|
- `actix-web/src/middleware/logger.rs` — `exclude` is `HashSet<String>`: O(1) per-request lookup. CLEAN.
|
|
- `actix-web/src/http/header/accept_encoding.rs` — `supported_set` collected as `HashSet<&Encoding>` before iteration. CLEAN.
|
|
- `actix-web/src/introspection.rs` — `update_unique` uses `Vec::contains()` for HTTP methods/guards/patterns, but these lists are bounded to <10 items each and only called once at app startup (route registration), not per request. Not actionable.
|
|
- All other `contains()` calls use bitflags, ranges, or string substring checks — not collection membership.
|
|
|
|
**Result: No actionable CWE-407 defects.**
|