Commit graph

273 commits

Author SHA1 Message Date
c9f4953656 am-monitor: CWE-407 scan CLEAN — sets/dicts throughout, no algorithmic complexity defects 2026-03-30 16:51:45 -04:00
1f9babda46 happymon: CWE-407 scan CLEAN — no algorithmic complexity defects
Fox's own Python monitoring tool. All registries use dicts,
dedup uses sets, list membership checks are config-bounded (1-3 items).
2026-03-30 16:50:02 -04:00
494d1c82a3 undf: assign UNDF numbers, stamp patches; 878 total 2026-03-30 16:46:38 -04:00
8b5e3c35b1 undf: assign UNDF numbers, stamp patches; 875 total 2026-03-30 16:45:00 -04:00
0dbb699821 openai SDK dependency chain CWE-407 scan: all 5 targets CLEAN
openai-python, httpx, pydantic, tiktoken, openai-node — no CWE-407 defects.
All targets use proper dict/set/frozenset for membership tests in hot paths.
2026-03-30 16:44:33 -04:00
95008feda5 llm-infra scan: litellm-0001 _delete_deployment combined_id_list O(R*C); haystack CLEAN
litellm-0001: ProxyConfig._delete_deployment() checks model_id not in
combined_id_list (a plain Python list) for each router model ID during
config refresh. O(R*C) where R=router models, C=combined list. Fix:
convert to set before loop. MEDIUM severity, 6.5x at N=500. 1/1 PASS.

Haystack: no CWE-407 defects found. Uses dicts and sets throughout
for membership checks (scheduled_components set, storage dict, etc.).
2026-03-30 16:44:06 -04:00
7e717432dd undf: assign UNDF-2026-000000874; stamp vllm-0001 patch 2026-03-30 16:42:12 -04:00
80b26e82b6 ml-inference scan: vllm-0001 LoRA convert_mapping list.index O(B*L); ollama+langchain CLEAN
vllm-0001: punica_wrapper/utils.py convert_mapping() calls
lora_index_to_id.index(x) per token in batch — O(B*L) where
B=batch_size, L=loaded_loras. Code has "TODO index can be slow"
comment. Fix: pre-build dict for O(1) lookup. 7x at B=2000/L=64.

Ollama: all slices.Contains on bounded slices (1-8 items).
LangChain: orchestration code, all membership bounded by k param.
2026-03-30 16:41:47 -04:00
896a29f83b erp scan: erpnext-0001/0002, ofbiz-0001/0002; odoo CLEAN; 4/4 PASS
erpnext-0001: BOM.get_children list dedup O(B^2) MEDIUM 4x
erpnext-0002: serial_batch_bundle serial/batch dedup O(N^2) HIGH 45x
ofbiz-0001: PaymentGatewayServices processList LinkedList O(N^2) HIGH 45x
ofbiz-0002: OrderReturnServices/OrderReadHelper payment dedup O(N^2) MEDIUM 36x
odoo: CLEAN (consistent set/frozenset/OrderedSet usage throughout)
2026-03-30 15:24:39 -04:00
15db2a0269 synapse-0001: sync handler newly_joined_rooms List membership O(J*N); matrix-js-sdk CLEAN
synapse/handlers/sync.py _get_rooms_changed: newly_joined_rooms is List[str]
checked with `in` inside for-loop over all joined rooms (line 2252).
O(J*N) where J=joined rooms, N=newly joined. Fix: use Set. 99x at J=5000.
2026-03-30 15:23:53 -04:00
7d89e30de9 emulator scan: MAME/Dolphin/ScummVM all CLEAN — no CWE-407 defects
Scanned three major emulator codebases for algorithmic complexity defects:
- MAME: proper maps/enumerators, std::find only on constant-bounded arrays
- Dolphin: exceptionally clean, HashMap/unordered_map throughout hot paths
- ScummVM: Common::find on tiny collections only, HashMap for config lookups
2026-03-30 15:23:14 -04:00
dd20794faa undf: assign 859-861; stamp patches; element-web-0003/element-web-0004/conduit-0001 2026-03-30 15:17:08 -04:00
ec186e286c element-web-0003/0004 + conduit-0001: CWE-407 deep scan — 3 new defects, 6/6 PASS
element-web-0003: TextForEvent.tsx textForCanonicalAliasEvent alt_aliases
  .filter(x => !arr.includes(x)) O(A*B) MEDIUM 19.5x — fix: Set.has()

element-web-0004: utils/arrays.ts arrayDiff + arrayIntersection
  .filter(i => !arr.includes(i)) O(A*B) MEDIUM 18x — fix: Set.has()
  Used by 15+ callsites: room-list, notifications, spaces, beacons, maps

conduit-0001: server_server.rs get_missing_events_route
  earliest_events.contains() (Vec) in growing BFS loop O(Q*E) MEDIUM-HIGH 7.4x
  Federation endpoint — remote server controls input size

matrix-rust-sdk: could not clone (GitHub HTTPS unreachable)
2026-03-30 15:16:54 -04:00
2372d29c88 undf: assign UNDF-2026-000000858 for proxysql-0001; stamp patch 2026-03-30 14:59:38 -04:00
daaa6b8231 proxysql: rename patch to avoid false CLEAN match in generator 2026-03-30 14:59:22 -04:00
0fb51c7234 syncthing/nextcloud-server/gitea: CWE-407 scan — syncthing-0001 blockIndexes O(D*B^2) MEDIUM; nextcloud-server CLEAN; gitea CLEAN
syncthing-0001: deviceDownloadState.blockIndexes []int with slices.Contains O(B)
  called per device per block in file sync hot path. Fix: map[int]struct{}.
  UNDF-2026-000000850. 2.9x measured at B=1000.
nextcloud-server: 386 in_array() calls, all on constant-size or config-level arrays.
gitea: 91 slices.Contains, all on small lists; container.Set used for hot paths.
2026-03-30 14:57:08 -04:00
59e2f4e94d calibre/digikam/proxysql: 5 CWE-407 defects — calibre-0001 series_indices list O(10000*S), calibre-0002 Google tag dedup O(T^2), digikam-0001 Haar targetAlbums QList O(N*A) HIGH, digikam-0002 GPS tiler dedup O(I^2), proxysql-0001 metrics cleanup O(M*S); 6/6 PASS 2026-03-30 14:56:51 -04:00
c31c569e45 undf: stamp gitlab-foss patches with UNDF numbers 2026-03-30 14:56:23 -04:00
99e627481e gitlab-foss: 5 CWE-407 defects — Network::Graph find_free_space/overlap O(R*S), NotificationService mentioned_users O(R*M), RefreshService commit_ids O(MR*C), Project#members_among O(U*A); 4/4 PASS 2026-03-30 14:55:33 -04:00
4cc47349a5 undf: assign 847-849; stamp freecad/retroarch patches 2026-03-30 14:53:28 -04:00
e06902c99a freecad/retroarch/mpv: CWE-407 scan — 3 defects, mpv CLEAN
freecad-0001: ifc_generator.py done-list O(N^2) dedup MEDIUM-HIGH 499x
freecad-0002: importDXF.py processededges list O(E^2) MEDIUM 469x
retroarch-0001: playlist_entry_exists O(R*P) linear scan in content scanner HIGH 749x
mpv: CLEAN (all data structures naturally bounded)

3/3 unit tests PASS.
2026-03-30 14:53:03 -04:00
0d852be0a3 undf: assign 845-846; stamp firefox patches 2026-03-30 14:51:42 -04:00
026859bc00 firefox: 2 CWE-407 defects — Sanitizer ListSet O(N×E) HIGH, DOMTokenList O(T²) MEDIUM; chromium SKIPPED (clone unavailable) 2026-03-30 14:51:20 -04:00
558f0d30c2 undf: stamp clementine patches (UNDF-2026-000000841..842) 2026-03-30 14:43:28 -04:00
669ed13408 clementine: 2 CWE-407 defects; mpd + rhythmbox CLEAN
clementine-0001: LibraryWatcher ScanSubdirectory FindSongByPath O(F*S) +
files_on_disk.contains O(S*F) — linear scan with TODO comment, fix with
HashMap + HashSet. HIGH severity, 250x at N=1000.

clementine-0002: SongSender indexOf(s) O(N^2) in SendAlbum/SendPlaylist/
SendUrls loops — fix with integer counter + QSet for requested_ids.
MEDIUM severity, 500x at N=1000.

MPD: CLEAN — uses std::set, bitmask arrays, std::map throughout.
Rhythmbox: CLEAN — uses g_hash_table for all membership checks.

4/4 unit tests PASS.
2026-03-30 14:42:15 -04:00
a9cd5686fb undf: stamp amarok + strawberry patches (UNDF-2026-000000833..840) 2026-03-30 14:41:25 -04:00
fb2c48dc37 undf: stamp kdenlive-0005..0008 (UNDF-2026-000000835..838) 2026-03-30 14:40:29 -04:00
0f9e84d300 amarok + strawberry: 4 CWE-407 defects — playlist queue O(N×Q), grouping proxy O(G×S), collection watcher O(S×F), scrobbler cache O(F×C)
amarok-0001: TrackNavigator::queueIds QQueue.contains in loop MEDIUM 1000x
amarok-0002: QtGroupingProxy::mapFromSource QList.contains/indexOf in nested iteration MEDIUM 2426x
strawberry-0001: CollectionWatcher::ScanSubdirectory QStringList files_on_disk contains+removeAll HIGH 2525x
strawberry-0002: ScrobblerCache::Flush QList.contains/removeAll in loop MEDIUM 334x
2026-03-30 14:40:10 -04:00
70741a6157 kdenlive: 4 new CWE-407 defects (0005-0008); deeper scan beyond thumbnail/timeline
kdenlive-0005 PreviewManager m_renderedChunks/m_dirtyChunks QVariantList .contains() O(N^2) MEDIUM 219x
kdenlive-0006 TimelineController canceled guides std::find O(G*C) MEDIUM 160x
kdenlive-0007 AssetParameterModel m_rows.indexOf in param loops O(P*R) MEDIUM 25x
kdenlive-0008 UrlListParamWidget addItemsInSameFolder std::find on QMap values O(E*M) MEDIUM 200x

8/8 unit tests PASS
2026-03-30 14:39:58 -04:00
9bdea940fc undf: assign 828-832; stamp patches; tomcat-0001/hibernate-orm-0001/netty-0001/netty-0002 2026-03-30 13:55:42 -04:00
32cbeb5dcb tomcat-0001/hibernate-orm-0001/netty-0001/netty-0002: 4 new CWE-407 defects
tomcat-0001: WebSocket getNegotiatedSubprotocol List.contains O(R×S) MEDIUM 52x
hibernate-orm-0001: FK ordering buildRecursiveOrderedFkSecondPasses List.contains O(N²) HIGH 2.8x
netty-0001: ALPN select/selected List.contains O(S×P) MEDIUM 26x
netty-0002: DnsResolveContext dedup ArrayList.contains O(R²) MEDIUM 30x

All 4/4 unit tests PASS.
2026-03-30 13:55:21 -04:00
7f2c2a1a36 undf: assign UNDF-2026-000000823; stamp terraform-0001/ansible-0002/ansible-0003 2026-03-30 13:29:54 -04:00
e0aba0e21e terraform-0001/ansible-0002/ansible-0003: CWE-407 deeper scan — 3 defects, 6/6 PASS
terraform-0001: Tarjan SCC inStack linear scan O(E*V) — HIGH, 994x at V=2000
ansible-0002: Host.add_group() list membership O(A*G) — MEDIUM, 499x at G=1000
ansible-0003: Handler.notify_host() list membership O(H^2) — MEDIUM, 499x at H=1000
2026-03-30 13:29:25 -04:00
3d2957276d undf: assign UNDF-2026-000000822; stamp telegraf-0001 patch 2026-03-30 13:28:35 -04:00
27382ae791 netdata CLEAN; telegraf-0001 dedup GetField O(F²) — 1 defect, 1/1 PASS
Netdata: well-engineered with Judy arrays, dictionaries, hash tables
throughout. No CWE-407 defects found.

Telegraf: dedup processor Apply() calls m.GetField(f.Key) O(F) inside
field comparison loop → O(F²). Fix: build field map for O(1) lookup.
125x overhead at F=500.
2026-03-30 13:27:58 -04:00
38634f0b25 keycloak+shiro: CWE-407 scan CLEAN — both use HashSet throughout for membership testing 2026-03-30 13:25:06 -04:00
2ccaf9e7fa undf: assign UNDF-2026-000000821; stamp loki-0001 patch 2026-03-30 13:18:59 -04:00
689ec25d05 grafana: 3 CWE-407 defects; loki: 1 CWE-407 defect; 4/4 PASS
grafana-0001: getDashboardsSharedWithUser dashboard UID dedup O(P^2) MEDIUM 2.5x
grafana-0002: folder UID dedup slices.Contains O(P^2) 4 sites MEDIUM 4x
grafana-0003: deduplicateAvailableFolders ContainsFunc O(F*A) MEDIUM 9.3x
loki-0001: DAG AddEdge/Eliminate slices.Contains O(E^2) LOW 2.1x
2026-03-30 13:17:58 -04:00
cf2c734de1 undf: assign UNDF-2026-000000819 through 000000820; rename hive-0004/hive-0005; stamp patches 2026-03-30 13:17:14 -04:00
1a1abc2154 beam+hive: CWE-407 scan — Beam CLEAN, Hive 2 defects (mergeSchema + averageColumnSizes)
Beam: exhaustive scan of sdks/java/core + runners — all membership tests already
use proper Set types (HashSet, LinkedHashSet, ImmutableSet, TreeSet). CLEAN.

Hive hive-0001: SharedWorkOptimizer.mergeSchema() uses List.contains() in loops
for neededColumnIDs/neededColumns/virtualCols dedup. O(D*R) per list. MEDIUM, 3-4x.

Hive hive-0002: HiveRelMdSize.averageColumnSizes() uses ImmutableList.contains(i)
in column loop during Calcite metadata queries. O(C*L). MEDIUM, 3-5x.

Both patched with HashSet wrappers. 2/2 unit tests PASS.
2026-03-30 13:05:40 -04:00
4f51d81913 undf: assign UNDF-2026-000000815 through 000000817; stamp superset patches 2026-03-30 13:04:50 -04:00
5c94ac750a superset+metabase: CWE-407 scan — 3 defects in Superset, Metabase CLEAN
Superset:
- superset-0001: SecurityManager._get_pvms_from_builtin_role pvm list dedup O(Regex*PVMs*R) HIGH 8x
- superset-0002: DashboardDAO.update_native_filters_config filter dedup O(M*U) MEDIUM 40x
- superset-0003: import_datasource metric/column dedup O(N^2) list rebuild MEDIUM 68x

Metabase: CLEAN — Clojure backend uses sets/maps throughout for membership tests
2026-03-30 13:04:14 -04:00
9b3008a2b1 undf: assign UNDF-2026-000000813; stamp neovim-0001 patch 2026-03-30 11:46:05 -04:00
178d9c03db scan: HandBrake + Emacs CWE-407 — both CLEAN
HandBrake: libhb uses array-backed lists bounded by media metadata
sizes (tracks, subtitles, chapters, presets). No user-controlled
quadratic growth path found.

Emacs: C core uses Fmemq/Fmember on small bounded lists (property
lists, error conditions, flags). Larger lists (features ~1000,
charsets ~200) only scanned in non-hot-path code. Elisp delete-dups
already has hash optimization for >100 elements.
2026-03-30 11:45:36 -04:00
ae2eaf3be9 undf: assign UNDF-2026-000000807 through 000000812; stamp vscode+zed patches 2026-03-30 11:43:50 -04:00
05e4902a9e vscode+zed: CWE-407 scan — 6 defects across 2 code editors
VS Code (4 defects):
- vscode-0001: extensionGalleryService uuid dedup O(N×M) MEDIUM 100x
- vscode-0002: abstractExtensionManagementService deps O(D²) MEDIUM 49x
- vscode-0003: userDataSync merge compare() O(N×M) across 8 files MEDIUM 250x
- vscode-0004: configurationModels override identifiers O(N×M) LOW-MEDIUM 18x

Zed (2 defects):
- zed-0001: lsp_store LSP edit dedup Vec::contains O(E²) MEDIUM 49x
- zed-0002: extension_builder manifest dedup Vec::contains O(N²) LOW 24x

6/6 unit tests PASS
2026-03-30 11:43:31 -04:00
f8eb370fe4 undf: assign 806; stamp vlc+obs-studio patches 2026-03-30 11:33:21 -04:00
15a65b2227 vlc+obs-studio: CWE-407 scan — 2 defects (vlc-0001 randomizer_Remove O(N×C), obs-studio-0001 push_audio_tree da_find O(N²)/frame) 2026-03-30 11:33:01 -04:00
20f60ee078 undf: assign 798-805; stamp kdenlive+shotcut patches 2026-03-30 11:28:35 -04:00
13db08af50 darktable+scribus: CWE-407 scan — 6 defects (3 darktable, 3 scribus)
darktable-0001: map_locations image diff g_list_find O(N*M) MEDIUM 375x
darktable-0002: tags _tag_add_tags_to_list g_list_find O(T*L) MEDIUM 375x
darktable-0003: map view clustering g_list_find(sel_imgs) O(I²×S) HIGH 160x
scribus-0001: getSortedStyleList retList.contains O(N²) MEDIUM 167x (×4 copies)
scribus-0002: getUsedPatterns results.contains O(I×R) MEDIUM 98x
scribus-0003: Selection::addItems m_SelList.contains O(N×M) MEDIUM 2100x
2026-03-30 11:28:25 -04:00