java-topology/defects/wasmer/patch/CLEAN.md
russell@unturf.com ac82cff865 php-cluster: doctrine-orm-0001 + composer-0003 CWE-407 defects; count 668→670
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)
2026-03-29 19:51:31 -04:00

12 lines
650 B
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# CLEAN — wasmer
Scanned 2026-03-29 for CWE-407 (algorithmic complexity).
## Findings
- `lib/wasix/src/os/task/thread.rs``signals: Vec<Signal>` with `.contains()`: POSIX signal space is 131 values; N is strictly bounded. Not actionable.
- `lib/package/src/package/volume/fs.rs``intermediate_directories` and `metadata_files` are `BTreeSet<PathBuf>`. CLEAN.
- `lib/compiler-llvm/src/object_file.rs``visited: HashSet` with `insert()` return value used as guard before recursion. Correct pattern. CLEAN.
- All other `contains()` calls are on bitflags or string substring checks. CLEAN.
**Result: No actionable CWE-407 defects.**