From 0223172dc608e73685f83def1a5fdcf54fc7f7f8 Mon Sep 17 00:00:00 2001 From: "russell@unturf.com" Date: Tue, 31 Mar 2026 13:03:21 -0400 Subject: [PATCH] orbiter: CLEAN all 5 MOADs Space flight simulator with clean data structure discipline. No CWE-407 on hot paths. Docking uses one-vessel-per-frame amortized scan. MOAD-0002 present (47+ files coupled through global mutable state) but architectural, not patchable. --- defects/orbiter/CLEAN | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 defects/orbiter/CLEAN diff --git a/defects/orbiter/CLEAN b/defects/orbiter/CLEAN new file mode 100644 index 000000000..9b1b3d0c1 --- /dev/null +++ b/defects/orbiter/CLEAN @@ -0,0 +1,33 @@ +CLEAN — all 5 MOADs scanned 2026-03-31 + +Target: Orbiter Space Flight Simulator (C++) +Source: https://github.com/orbitersim/orbiter (depth=1) +Commit: e76cfed + +MOAD-0001 (CWE-407): CLEAN + No actionable defects. Linear-search patterns exist but on startup-only + paths or inherently small collections: + - Config::m_activeModules std::find (startup module loading) + - PlanetarySystem::GetVessel(name) O(V) lookup (not in per-frame loops) + - Vessel::IsGroupThruster O(T) scan (thrusters per group, small N) + - Docking proximity uses one-vessel-per-frame amortized scan + - Proxy updates every 100s, not per-frame + - Nav receiver scan guarded by commsT timer (2-6s interval) + +MOAD-0002 (Intertangle): PRESENT (architectural, not patchable) + Extensive global mutable state coupling 47+ source files: + g_pOrbiter, g_psys, g_focusobj, g_camera, td, g_pane, + g_bForceUpdate, g_bStateUpdate, DBG_MSG[256] + Classic god object pattern. Camera, Vessel, PlanetarySystem, Pane, + MFD, Dialog subsystems all coupled through shared mutable globals. + +MOAD-0003 (Leaked Context): CLEAN + No thread_local usage. Single-threaded simulation architecture. + +MOAD-0004 (Logged Secret): CLEAN + No credentials or secrets in codebase. Space flight simulator + with no network authentication. + +MOAD-0005 (Thundering Herd): CLEAN + Single-threaded simulation, no concurrent cache access patterns. + Elevation tile cache is fixed-size array (8 tiles), no contention.