java-topology/SCAN-TODO.md
russell@unturf.com 09012e7ec1 openfoam+root-cern: 5-MOAD scan; openfoam-0003 CWE-407 DSMCCloud typeIdList O(C*T*M*K), root-cern-0003 CWE-407 TTree::InitializeBranchLists fSeqBranches O(B^2)
openfoam-0003: DSMCCloud::initialise calls findIndex(typeIdList_, moleculeName)
inside triple-nested forAll(cells) * forAll(tets) * forAll(molecules) loop.
Fix: pre-build HashTable<label, word> before cell loop for O(1) lookups.
3-10x speedup depending on type count. 5/5 PASS.

root-cern-0003: TTree::InitializeBranchLists calls std::find on fSeqBranches
(std::vector<TBranch*>) inside two O(B) loops, yielding O(B^2) total.
Fix: mirror fSeqBranches in std::unordered_set<TBranch*> for O(1) lookup.
~500x speedup at B=500, ~1000x at B=1000 (CMS NanoAOD scale). 6/6 PASS.

MOAD-0002: OpenFOAM objectRegistry god-object structural, ROOT gROOT intertangle
structural (gROOTMutex inconsistently applied). Both documented.
MOAD-0003: ROOT TTHREAD_TLS method-scoped only, CLEAN. OpenFOAM no thread-local, CLEAN.
MOAD-0004: OpenFOAM CLEAN. ROOT TWebFile auth logging pre-existing root-cern-0002.
MOAD-0005: Both CLEAN.
2026-04-03 15:31:30 -04:00

102 lines
11 KiB
Markdown
Raw 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.

# Scan TODO — Unscanned High-Value Targets
Status: 865 UNDF, 420+ defect dirs, 34 waves complete.
Rule: clone, scan, delete clone after. Keep disk under 90%.
## Priority 1 — Major infrastructure not yet scanned
- [x] Squid (C, HTTP proxy, huge install base) — squid-0001 MOAD-0001 CWE-407 NotePairs::appendNewOnly hasPair() O(S*E) 374x; squid-0002 MOAD-0001 CWE-407 removeConnectionHeaderEntries strListIsMember O(H*C) 3x; squid-0003 MOAD-0004 CWE-312 FTP+Basic auth credentials logged verbatim incl DBG_IMPORTANT; squid-0004 MOAD-0001 CWE-407 whichPeer() O(P*A) ICP peer lookup 83x at P=100; MOAD-0002 SquidConfig god-object 571 lines/209 files (structural, not patchable); MOAD-0003/0005 CLEAN
- [x] Sendmail (C, MTA) — sendmail-0001 MOAD-0004 CWE-312 SASL client password logged verbatim at tTd(95,5) debug level in getauth(); MOADs 0001/0002/0003/0005 CLEAN
- [x] PgBouncer (C, PostgreSQL connection pooler) — pgbouncer-0001 MOAD-0004 CWE-312 SCRAM verifier logged at slog_debug; pgbouncer-0002 MOAD-0001 CWE-407 find_database() O(D) linear scan per connection 100x at D=100; MOADs 0002/0003/0005 CLEAN (single-threaded libevent)
- [x] Suricata (C, IDS/IPS) — suricata-0001 (CWE-407 threshold SID lookup O(T×S), CWE-312 auth header logging); suricata-0002 (CWE-407 EveHttpLogJSONHeaders O(H×F=53) per tx, 53x); MOADs 0003/0005 CLEAN
- [x] ClamAV (C, antivirus engine) — clamav-0001 MOAD-0004 CWE-312 proxy password logged verbatim on curl failure; MOAD-0001/0002/0003/0005 CLEAN (AC trie, BM hash, mutex-protected cache)
- [x] Snort (C++, IDS/IPS) — snort3-0001 MOAD-0001 CWE-407 service_candidates std::find dedup O(M*C) per packet in AppID ServiceDiscovery 72x at M=10000; snort3-0002 MOAD-0001 CWE-407 CHP match_tally std::find_if O(M*T) per HTTP packet 48x at T=100; MOADs 0002/0003/0004/0005 CLEAN
- [x] WireGuard (deeper, Go userspace tools) — wireguard-go + wireguard-tools CLEAN all 5 MOADs; go uses hash map peer lookup O(1), radix trie AllowedIPs O(32/128), no key material logged, all maps mutex-protected; tools use O(N log N) sort+merge for peer sync
- [x] Thunderbird (C++, email client) — thunderbird-0001 through thunderbird-0006 MOAD-0001 CWE-407 (account dedup 250x, copy-service 250x, IMAP auto-sync 250x, UID-state 500x, filter headers 125x, spam whitelist 100x); thunderbird-0007 MOAD-0001 folder tree init 250x; thunderbird-0008 MOAD-0004 CWE-312 OAuth2 access_token+refresh_token logged verbatim; MOADs 0002/0003/0005 CLEAN
- [x] Wine (C, Windows compatibility layer) — wine-0002 MOAD-0004 CWE-312 Basic Auth username:password logged verbatim in cache_basic_authorization() TRACE; wine-0003 MOAD-0001 CWE-407 CRYPT_CheckSimpleChainForCycles O(N^2) cert comparison (developer-acknowledged) 47x at N=1000; wine-0004 MOAD-0001 CWE-407 token_find_privilege O(count*P) in AdjustTokenPrivileges/token_check_privileges 143x at N=1000; MOAD-0002/0003/0005 CLEAN
## Priority 2 — ERP/Business not yet scanned
- [x] Dolibarr (PHP, ERP) — scanned (see prior wave)
- [x] Tryton (Python, ERP) — tryton-0001 (_save_values previous list O(T*P)); MOADs 0002/0003/0004/0005 CLEAN
- [x] xTuple PostBooks (C++/Qt ERP, scanned via openrpt public repo) — xtuple-0001 orutils missingParamList QStringList::contains O(P*M) 52x; MOADs 0002/0003/0004/0005 CLEAN
- [x] SuiteCRM (PHP, CRM) — 6 defects: suitecrm-0001..0004 (prior scan), suitecrm-0005 ProjectTask getAllSubProjectTasks O(T²·P) 70x, suitecrm-0006 LuceneSearch parseHits O(H·M) 8x; MOADs 0002/0003/0004/0005 CLEAN
- [x] InvoiceNinja (PHP, invoicing) — 5 defects total: invoiceninja-0001 S3Cleanup O(N²) in_array; invoiceninja-0002 MOAD-0004 CheckoutCom webhook CWE-312; invoiceninja-0003 MOAD-0002 App::setLocale intertangle; invoiceninja-0004 MOAD-0001 SettingsSaver string_casts O(C×S) 4.7x; invoiceninja-0005 MOAD-0004 CBAPowerBoard vault_token CWE-312; MOAD-0003/0005 CLEAN
## Priority 3 — Collaboration/Chat
- [x] Rocket.Chat (deeper, TypeScript) — 0003 MOAD-0001 video-conf endDirectCall O(S*U); 0004 MOAD-0004 CWE-312 OAuth secrets logged; MOAD-0002/0003/0005 CLEAN
- [x] Zulip (deeper, Python) — 3 MOAD-0001 defects: user_groups.py lock_subgroups O(G*F), update_user_group O(D*F), actions/user_groups.py full_member_group_user_ids O(M*F); MOAD-0002/0003/0004/0005 CLEAN
- [x] Jitsi Meet (Java/TypeScript) — jitsi-meet frontend: 4 MOAD-0001 defects (0001-0004); jicofo backend: jicofo-0001 MOAD-0001 reInviteParticipantsById List.contains O(P x R) HIGH 250x; jicofo-0002 MOAD-0004 CWE-312 YouTube stream key logged verbatim; jicofo MOADs 0002/0003/0005 CLEAN
- [ ] Matrix Dendrite (Go, alt homeserver — already in defects/)
- [ ] Mattermost (deeper, Go)
## Priority 4 — Desktop apps
- [x] Pidgin/Finch (C, chat client) — pidgin-0001 CWE-407 499.5x, pidgin-0002 CWE-312
- [ ] HexChat (C, IRC client)
- [x] Evolution (C, email/calendar) — evolution-0002 MOAD-0001 CWE-407 search_hit_cache g_slist_find_custom O(N^2) 433x at N=1000; MOADs 0002/0003/0004/0005 CLEAN
- [x] Thunderbird (C++, email) — see Priority 1 entry above; 8 defects total
- [x] Calibre (deeper, Python ebook manager) — calibre-0003 MOAD-0001 CWE-407 depth_first flat.index() O(L*F) 38x at F=500; calibre-0004 MOAD-0001 CWE-407 HTMLFile.find_links list dedup O(L^2) 124x at L=1000; MOADs 0002/0003/0004/0005 CLEAN
- [x] Okular/Evince/Zathura (PDF viewers) — okular-0001 MOAD-0001 CWE-407 fontReadingGotFont QList::indexOf O(F²) 15.5x at F=1000; MOADs 0002/0003/0004/0005 CLEAN; evince-0001 MOAD-0001 CWE-407 ev-page-accessible children pointer scan O(N^2) 500x at N=1000; zathura-0001 MOAD-0001 CWE-407 flatten_rectangles girara_list_append_unique O(R^2) 120x at R=200; Evince+Zathura MOADs 0002/0003/0004/0005 CLEAN
- [x] OpenSCAD (C++, parametric CAD) — openscad-0001 MOAD-0001 CWE-407 export_amf add_vertex O(V^2) ~85x at V=1000; openscad-0002 MOAD-0001 CWE-407 PolySetBuilder color dedup O(F*C) 69x at F=10000; openscad-0003 MOAD-0004 CWE-312 OctoPrint requestApiKey logs app_token verbatim; MOADs 0002/0003/0005 CLEAN
- [ ] Solvespace (C++, parametric CAD)
- [x] Cura / PrusaSlicer (C++/Python, 3D printing slicers) — cura-0001 MOAD-0001 CompatibleMachineModel list rebuild O(P^2) LOW-MEDIUM; cura-0002 MOAD-0001 SettingInheritanceManager List[str] membership O(S) per property change HIGH 109x; prusaslicer-0001/0002/0003 MOAD-0001 (pre-existing); prusaslicer-0004 MOAD-0001 FillRectilinear queue O(R^2) std::find 64x; MOADs 0002/0003/0004/0005 CLEAN both targets
## Priority 5 — AI/ML new wave
- [x] Ollama (Go, local LLM runtime) — ollama-0001 MOAD-0001 CWE-407 kvcache buildMask slices.Contains O(B*E) Gemma3 multi-image HIGH 250x; MOADs 0002/0003/0004/0005 CLEAN
- [x] LangChain (Python, LLM orchestration) — langchain-0001 MOAD-0001 MultiVectorRetriever id dedup O(D^2) (pre-existing); langchain-0002 MOAD-0001 MultiQueryRetriever _unique_documents slice-in-loop O(D^2) 21x at D=500 MEDIUM; MOADs 0002/0003/0004/0005 CLEAN
- [x] Hugging Face Transformers (Python) — transformers-0001 (pre-existing) all_special_ids in convert_ids_to_tokens; transformers-0002 CWE-312 HF_TOKEN logged; transformers-0003 MOAD-0001 all_special_tokens in convert_tokens_to_string (marian/m2m100/speech_to_text/siglip/gpt_sw3); transformers-0004 MOAD-0001 all_special_ids rebuilt per loop in wav2vec2/wav2vec2_phoneme/esm; MOADs 0002/0003/0005 CLEAN
- [x] vLLM (Python/C++, LLM serving) — vllm-0001 (pre-existing) LoRA lora_index_to_id.index() per token; vllm-0002 Grok2Tokenizer dict.values() scan per output token; MOADs 0002/0003/0004/0005 CLEAN
- [x] llama.cpp (C++) — llamacpp-0001 MOAD-0001 CWE-407 grammar_advance_stack std::find O(S^2) MEDIUM-HIGH; MOADs 0002/0003/0004/0005 CLEAN
## Priority 6 — Scientific/Data
- [x] OpenFOAM (C++, CFD simulation) -- openfoam-0001 moleculeCloud molsToDelete findIndex O(D^2) HIGH 400x (pre-existing); openfoam-0002 CFCFaceToCellStencil allGlobalFaces findIndex O(C*F*G) HIGH (pre-existing); openfoam-0003 DSMCCloud::initialise findIndex(typeIdList_) O(C*T*M*K) MEDIUM 3-10x; MOAD-0002 objectRegistry god-object structural (not patchable); MOAD-0003/0004/0005 CLEAN
- [x] ROOT (C++, CERN data analysis) -- root-cern-0001 TTreeCache potentialVetoes std::find O(B*N^2) MEDIUM (pre-existing); root-cern-0002 TWebFile Authorization header logged at gDebug>0 CWE-312 HIGH (pre-existing); root-cern-0003 TTree::InitializeBranchLists fSeqBranches std::find O(B^2) MEDIUM 500x at B=500; MOAD-0002 gROOT intertangle (gROOTMutex inconsistently applied, structural); MOAD-0003 TTHREAD_TLS method-scoped state CLEAN; MOAD-0005 RWebDisplayHandle::FindCreator static map GUI-only CLEAN
- [ ] Scilab (C/Fortran, numerical computation)
- [ ] Octave (deeper, C++)
- [ ] R (deeper, C)
- [ ] Julia (deeper)
## Priority 7 — Emulators/Retro
- [ ] PCSX2 (C++, PS2 emulator)
- [ ] RPCS3 (C++, PS3 emulator)
- [ ] PPSSPP (C++, PSP emulator)
- [ ] DOSBox-X (C++, DOS emulator)
## Priority 8 — Networking/Infra
- [x] Spamhaus tooling: rbldnsd (C, DNS blocklist server) CLEAN all 5 MOADs; dnsdbq (C, pDNS CLI) dnsdbq-0001 MOAD-0004 CWE-312 API key logged verbatim in debug mode; pdns-logger CLEAN; rdap (Go library) CLEAN
- [ ] Forgejo (Go, Gitea fork)
- [ ] Woodpecker CI (Go)
- [ ] Drone CI (Go)
- [ ] Gitea (deeper)
- [x] Wekan (Meteor/JS, kanban board) — wekan-0003 MOAD-0001 wekanCreator member dedup O(M^2)/O(C*M^2); MOAD-0002/0003/0004/0005 CLEAN
- [ ] Taiga (Python, project management)
- [ ] Redmine (Ruby, project management)
## Priority 9 — IoT/Embedded
- [ ] Zephyr RTOS (C)
- [ ] FreeRTOS (C)
- [ ] Contiki-NG (C)
- [ ] ESP-IDF (C)
- [ ] TinyGo (Go)
## Priority 4b — Creative/Publishing (image editors, office suites)
- [x] darktable (C, photo workflow) — darktable-0001 CWE-407 dt_map_location_update_images g_list_find O(N*M) 375x; darktable-0002 CWE-407 _tag_add_tags_to_list dedup O(T*L) 375x; darktable-0003 CWE-407 map view clustering sel_imgs O(I*J*S) 160x; darktable-0004 CWE-312 pwstorage backends log credentials verbatim; darktable-0005 CWE-407 modulegroups test_visible O(M*G*P) 38x; MOADs 0002/0003/0005 CLEAN
- [x] Scribus (C++/Qt, desktop publishing) — scribus-0001 getSortedStyleList QList<int>::contains O(S²) 167x; scribus-0002 getUsedPatterns results.contains O(I×R) 98x; scribus-0003 Selection::addItems m_SelList.contains O(N×M) 2100x; scribus-0004 file savers names.contains O(S²) per save 375x at N=1000; MOADs 0002/0003/0004/0005 CLEAN
- [x] Kdenlive (C++/Qt, video editor) — kdenlive-0001..0008 CWE-407 (pre-existing), kdenlive-0009 MOAD-0005 lumacache QtConcurrent data race; kdenlive-0010 CWE-407 checkConsistency QList::contains O(P*K^2) 500x at K=1000; MOADs 0002/0003/0004 CLEAN; MOAD-0002 pCore god-object noted
- [x] Audacity (C++, audio editor) — audacity-0001 CWE-407 selectedTracks std::find O(T*S) (pre-existing); audacity-0002 CWE-407 movingClips std::find (pre-existing); MOADs 0002/0003/0004/0005 CLEAN
- [x] Krita (C++/Qt, digital painting) — krita-0001 MOAD-0001 CWE-407 NodeDelegate togglePropertyRecursive QList<QModelIndex>::contains O(N^2) MEDIUM 22.7x at N=500; krita-0002 MOAD-0001 CWE-407 DlgCreateBundle allResourcesIds QStack::contains O(K^2) LOW-MEDIUM 36.7x at K=500; MOADs 0002/0003/0004/0005 CLEAN
## Already scanned CLEAN (no need to rescan)
Odoo, Beam, Hive (pre-existing only), Keycloak, Shiro, Netdata,
etcd, GCC, Rust compiler, ScyllaDB, qBittorrent, Transmission, pygame,
MPD, Rhythmbox, MAME, Dolphin, ScummVM, Nextcloud, Gitea, mpv,
Metabase, Emacs, HandBrake, Kubernetes (MOAD-5)