Commit graph

655 commits

Author SHA1 Message Date
24052ec668
2 follow-up flagships: symfony-0001 + pyright-0001 (Wave 17 backlog cleared)
Both were flagged in Wave 17 survey as borderline real defects deferred
for follow-up because the fix needed careful design beyond a single-line
set hoist. Both shipped now with full bench + ticket + intel.

UNDF-1310 symfony-0001 (HIGH) - PropertyAccessor::writeCollection.
  Doctrine entity collection diff: in_array($item, $collection, true)
  per item in $previousValue, then in_array($item, $previousValue, true)
  per item in $collection. O(P*C). Fix: dual lookup
  (SplObjectStorage for objects + serialize-keyed array for scalars,
  in_array fallback for resources). Bench: 5.2x at P=C=100,
  88x at P=C=2000.

UNDF-1311 pyright-0001 (HIGH) - CallHierarchyProvider outgoing/incoming
  call dedup. _outgoingCalls.find / _incomingCalls.find with composite
  key (uri, range) walks the list per call expression. O(C^2). Fix:
  parallel Map<string, entry> keyed by composite serialized form
  (uri|start.line|start.char|end.line|end.char). Bench: 2.7x at C=100,
  22x at C=2000.

Total session flagships: 11 (was 9) — 7 CWE-407 + 3 MOAD-0003 + 1 MOAD-0004.
Wave 17 borderline backlog now empty.
2026-04-26 12:36:07 -04:00
2eea7d128c
4 follow-up patches shipped: wildfly-0002 + wildfly-0003 + log4j2-0001 + nakama-0001
Acting on the 4 borderline candidates flagged in the session-summary intel.
All 4 surfaced after the unmoad scanner enhancements cleared M3/M4 noise.

UNDF-1306 wildfly-0002 (HIGH) - ElytronSecurityDomainContextImpl.isValid()
  sets currentIdentity ThreadLocal with no paired cleanup contract. Subject
  populated at line 69 is the canonical handover; the ThreadLocal stash leaks
  to next request on the pool thread. Fix: drop the .set(identity) line.

UNDF-1307 wildfly-0003 (LOW) - TransactionRollbackSetupAction.depth.set(null)
  should be depth.remove() to fully delete the ThreadLocal entry; current
  pattern leaves null binding pinning the WildFly classloader during
  undeploy/redeploy. Functional clear, classloader-retention only.

UNDF-1308 log4j2-0001 (HIGH) - Log4jMDCAdapter.clear() only clears the
  log4j ThreadContext map, NOT the SLF4J pushByKey/popByKey stacks
  (mapOfStacks ThreadLocal). SLF4J spec mandates clear() means "clear
  all MDC". Per-key Deques accumulate across requests. Fix: add clear()
  to ThreadLocalMapOfStacks (calls tlMapOfStacks.remove()) and call from
  the public clear().

UNDF-1309 nakama-0001 (HIGH MOAD-0004) - social/social.go logs OAuth
  access tokens, ID tokens, oauth2.Token objects (incl. refresh tokens),
  Steam publisherKey + ticket at debug level via zap.String/zap.Any.
  11 call sites. Fix: replace value-logging with shape-logging (token_len,
  has_token bool) — preserves debug value, redacts secret bytes.

First MOAD-0004 patch this session. Companion to the 3 MOAD-0003 patches
(wildfly-0001/0002/0003) extending the inverse-pipeline pattern across
projects: scanner enhancement -> noise reduction -> human triage finds
defects that were buried.

Total session flagships: 9 (was 6) — 5 CWE-407 + 3 MOAD-0003 + 1 MOAD-0004.
2026-04-26 12:30:28 -04:00
d149f2aaf0
session summary: 26h autonomous-loop run (6 flagships, 192 honor roll, 10 scanner fixes, ~52k FPs cleared)
Single entry point for fox to resume. Documents the three pipelines used
(forward CWE-407, inverse scanner-then-human, wave breadth), the 6 UNDF
flagships shipped (1300-1305), the 22 wave surveys (waves 7-28; 8
full-clean), the 10 unmoad scanner enhancements clearing ~51679 FPs
across 19 codebases, and 4 borderline candidates flagged for fox review
(ElytronSecurityDomainContextImpl.isValid, log4j2 Log4jMDCAdapter,
WildFly TransactionRollbackSetupAction, nakama MOAD-0004).

Stop condition explicit: per CLAUDE.md 'Unsure = ask. Can't ask = stop.'
The diminishing-returns signal (8 consecutive full-clean waves at
session midpoint, exhausted high-leverage scanner backlog by end) means
the honest move is to pause for fox redirect rather than invent
marginal-value work.
2026-04-26 11:39:59 -04:00
8b04e01458
wildfly-0001 UNDF-1305: ElytronSecurityIntegration ThreadLocal leak (MOAD-0003)
First MOAD-0003 (Leaked Context) flagship this session. Surfaced via
scanner enhancement: commit 1f48798 (Java ThreadLocal-scoped .set fix)
dropped wildfly M3 noise from 4840 -> 37, exposing this real defect.

Defect: ElytronSecurityIntegration.java:38 declares
  private final ThreadLocal<SecurityContext> securityContext = new ThreadLocal<>();
with setSecurityContext() calling .set(context) and ZERO corresponding
.remove() / .set(null) anywhere in the WildFly codebase (verified by
grep -rn). JCA WorkManager reuses pool threads across Work items from
different security principals; a leftover SecurityContext from prior
Work is visible to any subsequent Work that reads getSecurityContext()
before installing its own — which WildflyWorkWrapper.runWork() does
exactly to decide whether to use Elytron-runWork or super.runWork().

Fix: 2-file surgical patch (no SPI change):
1. setSecurityContext(null) now calls .remove() (clear ThreadLocal,
   prevent classloader retention)
2. WildflyWorkWrapper.runWork() wraps body in try/finally that calls
   setSecurityContext(null) after the Work item completes

This is the inverse pipeline from CWE-407 flagships: scanner improved
its signal-to-noise so triage could find what raw scanning could not
have ranked.
2026-04-26 08:29:50 -04:00
8b3a38bcab
scanner-enhancement intel: 10 unmoad fixes, ~51679 FPs cleared across 19 codebases
Documents this autonomous-loop session's pivot from breadth wave scanning
to unmoad scanner enhancements. Each fix targeted a documented FP class
(noted across waves 11/15/18/21/24/26 + others), shipped + validated
end-to-end against re-cloned source.

Architecture: per-file symbol tables on ScanState (hash_vars for M1,
tl_vars for M3) + path/header/argument-shape heuristics. Three repos in
sync, all unmoad commits remain local (no remote per project CLAUDE.md).

Notable byproduct: with M3 noise dropped wildfly 4840 -> 37 (commit
1f48798), one real ThreadLocal leak surfaces as a MOAD-0003 candidate
for fox's review — ElytronSecurityIntegration.securityContext.set(context)
with zero remove() calls anywhere in the WildFly codebase. Out of CWE-407
scope; MOAD-0003 follow-up.
2026-04-26 07:24:28 -04:00
9f7d28ffb9
wave28 survey: 8 clean-scan additions (sci/Lisp/Scheme/F#/routing) + 2 partial-scan caveats
fsharp, gnuradio, geant4, spack, sbcl, racket, frr, riak (wrapper) clean.
Pharo + full Riak deferred (Smalltalk language module gap, Erlang
submodule structure). Honor roll cumulative: 192 projects.

sbcl 727 + racket 383 M1 are Lisp (member ...)/(memq ...) tradition
primitives (continuation of Wave 24 maxima pattern). spack 72 M7 are
intentional Spec.intersects() dependency resolution algorithm.
2026-04-25 19:30:06 -04:00
e1716b98b4
wave27 survey: 10 clean-scan additions (8th full-clean wave)
yarn, pnpm, lerna, nx, turborepo, tcl, gawk, gnuplot, coreboot, openocd
all clean. Honor roll cumulative: 184 projects.

Package managers bounded by manifest dep graph. Firmware projects
bounded by fixed adapter/board tables. Scripting languages bounded by
language grammar.
2026-04-25 18:23:57 -04:00
63bfcebcf5
ghidra-0002 UNDF-1304: 28x-768x getVttAddresses set hoist (companion to ghidra-0001)
Three coupled defects in RTTIGccClassRecoverer:
1. isPossibleVttStart REBUILDS vtableAndVftableAddrs on every call (O(V) waste)
2. getVttAddresses calls it inside outer while loop (multiplies the rebuild)
3. addPointerToList uses List<Address>.contains for membership (O(V) per check)

Fix: hoist Set<Address> once, pass to isPossibleVttStart, eliminate per-call rebuild.

ghidra-0001 covers RecoveredClassHelper (MSVC + gcc) — the foundation pattern.
ghidra-0002 covers gcc-specific VTT recovery — extends coverage to Linux C++ binaries.

Together: ghidra C++ class recovery drops from seconds-to-minutes to milliseconds.
2026-04-25 17:49:23 -04:00
f0f1b4be7e
wave26 survey: 10 clean-scan additions (7th full-clean wave)
wildfly, typo3, chef, kitty, qpdf, jq, miller, matplotlib, vitess, nano
all clean. Honor roll cumulative: 174 projects.

Wildfly 4840 M3 are JUnit ExtensionContext. Wildfly 279 M1 are
Set/EnumSet declared-type FPs. TYPO3 934 M1 are 100% vendored frontend
(ckeditor5, codemirror, bootstrap, chartjs). matplotlib itertools.count
distinguished from list.count needed.

Three more scanner enhancement candidates (Java declared-type for the
fifth time, itertools.count vs list.count, M4 interpolated-value vs
string-literal).
2026-04-25 17:10:46 -04:00
cb35b92c97
wave25 survey: 10 clean-scan additions (6th full-clean wave)
discourse, authelia, authentik, nextcloud-server, paperless-ngx,
focalboard, milvus, nushell, roundcubemail, valgrind all clean.
Honor roll cumulative: 164 projects.

Authelia 124 M4 are test-fixture token URL builders. Paperless/authentik
M3 cluster is Django M2M .set() relation update + ContextVar task plumbing.
Milvus M1 dominated by vendored UI + tantivy NLP single-char filters.

Three more scanner enhancement candidates queued (Django M2M .set(),
ByteSet pattern continued, Django ORM .count() vs list.count()).
2026-04-25 16:35:43 -04:00
06854d8164
wave24 survey: 10 clean-scan additions (5th full-clean wave)
lighttpd1.4, stunnel, arangodb, zookeeper, vault, abiword, gnumeric,
maxima, lmms, hydrogen all clean. Honor roll cumulative: 154 projects.

ArangoDB 2298 M1 are 100% vendored UI bundles (boost/plotly, swagger-ui,
jquery-ui, ace). Vault 195 M1 are Ember.js codemods (build-time refactor).
Maxima 536 M1 are Lisp (member ...) graph/algebra primitives (intentional
algorithms). Hydrogen 64 M7 are Qt QRect::contains geometric ops + QSet.

Three more scanner enhancement candidates queued (Qt .contains family
awareness, Lisp member algorithm awareness, vendored UI tree suppression).
2026-04-25 16:26:30 -04:00
b393ae6fc8
wave23 survey: 10 clean-scan additions (fourth full-clean wave; zap is genuinely zero-finding)
zap, vue/core, lit, libavif, libpng, mruby, angular, svelte, eslint,
log4j2 all clean. Honor roll cumulative: 144 projects.

Notable: uber-go/zap returns ZERO HIGH+ findings — joins wireguard-go,
longhorn-engine, ghostpdl, cloud SDK clients in the genuinely-zero
category.

Frontend frameworks dominated by build-time SFC compilers + a11y spec
lists. log4j2 dominated by JUnit ExtensionContext test plumbing.
2026-04-25 16:16:48 -04:00
93421c296b
wave22 survey: 9 clean-scan additions + nakama MOAD-0004 finding (out of CWE-407 scope)
yosys, gz-sim, agones, slurm, duktape, abseil-cpp, dav1d, httpd, tinycc all clean.
Honor roll cumulative: 134 projects.

Notable: nakama social/social.go has 7 debug-level OAuth token logs
(Facebook/Apple/Google access_token, JWT id_token leaked via
zap.String). Real MOAD-0004 (A Logged Secret) defect — flagged for
MOAD-0004 pipeline, not CWE-407 patch. nakama excluded from honor roll.

Slurm 933 M1 are config-time xstrcmp + bounded hash chains. httpd 273 M1
are Apache module directive parsing.
2026-04-25 16:08:34 -04:00
0243ab3980
wave21 survey: 10 clean-scan additions (third full-clean wave)
tesseract, mupdf, tor, strongswan, scapy, masscan, gatk, htslib, QGIS,
postgis all clean. Honor roll cumulative: 125 projects.

GATK 1364 findings dominated by Java HashSet declared-type FPs and
JUnit ExtensionContext test plumbing. Tor 156 M1 are sort comparators
(O(N log N) overall, not quadratic). htslib bounded by BAM/SAM/VCF
file-format spec constants. QGIS dominated by Qt UI patterns + sipify
build-time codegen.

Three more scanner enhancement candidates queued (Java HashSet awareness,
qsort comparator detection, codegen-time path suppression).
2026-04-25 15:59:22 -04:00
dce02d80df
wave20: ghidra-0001 UNDF-1303 (6.5x-27x RecoveredClassHelper) + 9 clean-scan additions
Flagship: ghidra RecoveredClassHelper.addVftableReferencesToFunctionMapping
+ addFunctionsToClassMapping. Each insert does List.contains + ArrayList
copy on every add, giving O(F*R^2) per binary. Map<F, LinkedHashSet<T>>
rewrite gives O(F*R) and 27x speedup at F=2k R=500.

Reverse-engineering large C++ binaries (1000+ classes, 10k+ vtable refs)
sees seconds-to-minutes per RecoverClassesFromRTTIScript run today.

Wave 20 honor roll: cri-o, runc, youki, quickjs, hermes, ripgrep, radare2,
monero, mitmproxy. Cumulative: 115 projects.
2026-04-25 15:49:17 -04:00
3a9c7a3e75
wave19 survey: 10 clean-scan additions (entire wave clean)
mikro-orm, jinja, handlebars.js, pandoc, asciidoctor, marked, cmark, tika,
zig, PowerShell all clean. Honor roll cumulative: 106 projects.

PowerShell M1 cluster is IndexOf(char) string-position scans (scanner FP on
list-contains). marked/cmark/jinja patterns are fixed markdown spec token
lists. tika M3 cluster (1955) is JUnit ExtensionContext test plumbing.
2026-04-25 15:36:20 -04:00
aa6917d7ed
wave18 survey: 10 clean-scan additions (entire wave clean!)
aws-sdk-go-v2, azure-sdk-for-go, google-cloud-go, keycloak, casbin, kratos,
imgui, fluidsynth, lilypond, n8n all clean. Honor roll cumulative: 96
projects.

47k+ findings dominated by cloud SDK auto-generation (45k of 47k from
AWS/Azure/GCP Smithy/AutoRest/protobuf-gencli templates). Detector
enhancement for codegen-artifact suppression queued.

ImGui ImVector::contains is intentional cache-friendly small-array design.
lilypond music-tree contains() is intentional tree-walk recursion.
2026-04-25 15:27:06 -04:00
e55ba1608e
wave17 survey: 6 clean-scan additions (flask, black, mypy, sanic, vite, prettier)
10 PHP fw / Python tooling / JS bundler targets scanned. Honor roll
cumulative: 86 projects. Two borderline candidates documented for
type-aware follow-up (symfony PropertyAccessor::writeCollection O(P*C),
pyright callHierarchyProvider O(C^2)) — both real but need type-aware
helpers, not single-line set hoists.
2026-04-25 15:10:56 -04:00
878876c7af
wave16: ghost-0001 UNDF-1302 (15x-184x ReferrersStats) + 6 clean-scan additions
Flagship: Ghost ReferrersStatsService.getReferrersHistory Array.find with
multi-key predicate per paid conversion (O(P*A) -> O(P+A)). Long-running
Ghost sites with 200+ referrers x year of dates hit 4 second dashboard
loads; Map<source|date,entry> hoist gives 184x speedup at A=110k P=1k.

Wave 16 honor roll: fastify, samtools, argo-workflows, cypress, bitcoin,
strapi. Cumulative: 80 projects.
2026-04-25 15:01:06 -04:00
09b320386b
wave15 survey: 8 clean-scan additions (falco, dbt-core, tetragon, great_expectations, trivy, zipkin, rust-analyzer, gopls)
10 security/data-eng/IDE targets scanned. Honor roll cumulative: 74 projects.
rust-analyzer 23 hits in in-source unit tests + bitflags pattern (Wave 9).
swagger-codegen Set<String> (Wave 11 onnxruntime gap). Container security
tools dominated by fixed-table CVE severity / system-file lookups.
2026-04-25 14:48:32 -04:00
c321e0f0a3
wave14 survey: 7 clean-scan additions (ocaml, Hyprland, knative-serving, tree-sitter, openfaas-faas, sway, micropython)
10 mobile/edge/serverless/PL/WM targets scanned. Honor roll cumulative:
66 projects. Hyprland 46 M7 are intentional geometry primitives. knative
123 M3 are intentional reconciler context plumbing. Build-time scripts
(yacc, unlit, eslint plugins) and vendored UI bundles (angular, haddock)
account for most remaining M1.
2026-04-25 14:39:02 -04:00
802e51430c
wave13: pyroscope-0001 UNDF-1301 (47x-438x GetBlockStats) + 5 clean-scan additions
Flagship: pyroscope PhlareDB.GetBlockStats slices.Contains per block
(O(B*U) -> O(B+U)). Long-retention tenants with 5k-10k blocks pay 1M+
membership checks per block-stats RPC. Set hoist: 438x at B=10k U=1k.

Wave 13 honor roll: lima, apollo-server, act, firecracker, nix.
Cumulative: 59 projects.
2026-04-25 14:30:18 -04:00
1c9cb86381
wave12 survey: 5 clean-scan additions (jekyll, eleventy, kong, hugo, raylib)
10 sci/static-site/api-gateway/games targets scanned. Honor roll cumulative:
54 projects. scipy distance_impl.h M7 cluster is intentional distance
algorithms (FP). kong M4 cluster is test-fixture credential headers.
synapse haystack.contains is intentional substring pre-check before regex.
No flagship CWE-407 this pass.
2026-04-25 14:19:31 -04:00
272ced7fa6
wave11: weaviate-0001 UNDF-1300 (87x-1735x RBAC filter) + 2 clean-scan additions
Flagship: weaviate authorization filter slices.Contains per item (O(N*K)).
Multi-tenant deployments with hundreds-thousands of permitted resources pay
this on every authorized read. Set hoist: 1735x speedup at N=50k K=5k.

Wave 11 honor roll: bash, coreutils. Cumulative: 49 projects.
2026-04-25 14:10:05 -04:00
f0e5d71181
wave10: escape literal NUL byte in survey body 2026-04-25 13:53:45 -04:00
e0b7e9f1a6
wave10 survey: 6 clean-scan additions (libsodium, ring, cairo, harfbuzz, mbedtls, wolfssl)
10 crypto/text/geo/flutter targets scanned. Honor roll cumulative: 47 projects.
Crypto libraries dominated by fixed cipher-suite tables (bounded). gdal
cpl::contains wraps std::map::find (O(log N)) — scanner needs template
awareness. Flutter engine M7 cluster mostly String.contains substring
searches. No flagship CWE-407 this pass.
2026-04-25 13:49:14 -04:00
9f22ca077b
wave9 survey: 7 clean-scan additions (ghostpdl, helix, alacritty, wezterm, kakoune, poppler, libheif)
10 image/PDF/DB/editor targets scanned. Honor roll cumulative: 41 projects.
ghostpdl genuine clean (0 HIGH+ on 273M of code). Rust bitflags ecosystem
dominates terminal/editor false positives (.contains(Flag::X) compiles to
bitwise AND). tikv M1 cluster resolves to HashSet FPs and bounded raft
replication (3-5 peers). No flagship CWE-407 this pass.
2026-04-25 13:39:14 -04:00
0010067761
wave8 survey: 4 clean-scan additions (nsq, jaeger, otel-collector, temporal)
10 observability/streaming targets scanned. Honor roll cumulative: 34 projects.
No flagship CWE-407 — VictoriaMetrics streamaggr.getInputOutputLabels real
but constant-factor at realistic config shapes (W <=10, L <=30, ~2-3x impact),
below the 5x wall-clock bar. Logged for re-scan if W >30 case surfaces.
2026-04-25 13:29:13 -04:00
e7724fa3b7
wave7 survey: 5 clean-scan additions (wireguard-go, longhorn-engine, tinygo, maddy, openbgpd-portable)
29 mail/DNS/storage/VPN/RTOS/pg-eco targets scanned. No flagship CWE-407 patches
this pass — strong M1 candidates resolved to bounded fixed config tables
(strcmp on rule lookups), already-optimal data structures (RoaringTreemap,
ObjHashSet), or query-shape constants too small to cross the wall-clock bar.

Honor roll: 30 projects cumulative across waves 3-7. questdb `recordViews`
borderline real defect (O(N²) view dedup on ObjList) logged for future pass.
2026-04-25 13:16:49 -04:00
4c4a8ecac9
docs-pipeline survey: pelican joins clean-scan honor roll, sphinx+docutils investigated
Scanned the three foundational Python documentation tools (Sphinx,
docutils, Pelican) and documented the triage outcome.

Pelican joins the clean-scan honor roll (now 25 projects). Both flagged
findings tested as false positives — utils.py:485 is String.index for
'\n', not list iteration; pelican_import.py:663 ReDoS pattern scales
linearly at N=40 (0.11ms).

Sphinx + docutils have multiple M1 hits in node-tree walks
(Node.findall via parent.index per ancestor). Investigated and
benchmarked: both old and new algorithms are O(D*S) — constant-factor
only, not CWE-407-grade complexity-class change. A real fix would
require maintaining a parent_index cache on Element nodes, a refactor
with cache-invalidation surface area beyond a single-defect patch.

No patches shipped this pass; the work is documented for the next
reviewer.
2026-04-25 13:07:09 -04:00
a150602100
wave6 follow-up: gatsby-0001 — three filter-cache builders nodeTypeNames.includes -> Set
The Gatsby authors annotated each of the three call sites in
in-memory/indexing.ts with 'expensive at scale' comments. Their
diagnosis is correct: nodeTypeNames.includes(node.internal.type)
inside iterateNodes().forEach is O(N*T) per cache build.

For N=100k+ nodes typical of mature content sites and T=10-30
declared types per query, this fires on every type-filtered query.
gatsby develop in particular rebuilds caches per page render.

Fix: hoist Set<string> once at the top of each function. O(1) per
node lookup. Total cost O(N+T). Bench shows 8.4x at N=100k T=50;
2.7-4.7x at smaller scales.

Three call sites patched: ensureIndexByElemMatch (line 326),
ensureEmptyFilterCache (378), ensureIndexByElemMatchValue (504).
Author 'expensive at scale' comments updated to record the fix.
2026-04-25 10:15:32 -04:00
cd28454d2d
wave6: knex-0001 flagship + 38-target docgen/webfw/migration scan survey
knex-0001: Migrator#rollback({all:true}) and Migrator#down() filter
allMigrations against completed via .map(name).includes() inside the
filter callback. Per-iter array allocation + linear scan = O(A*C)
real, O(A*C^2) amortized including GC. Fix: hoist Set<name> once,
Set#has = O(1). Bench: 355x at A=C=2000 migrations.

wave6-docgen-webfw-tui-survey.md: 38-target scan covering doc gens
(Sphinx, JSDoc, TypeDoc, Doxygen, MkDocs, Hugo, Jekyll, Gatsby,
Eleventy, Astro), web frameworks (Fastify, Express, Koa, hapi,
SvelteKit, Nuxt, Remix), TUI/CLI (Cobra, Click, Commander.js, Yargs,
Bubble Tea, Ratatui), migrations (Flyway, Goose, dbmate, Knex,
Sqitch, Atlas), search engines (Tantivy, MeiliSearch, Typesense),
API gateways (Kong, APISIX), MQTT/queue brokers (Mosquitto, EMQX,
VerneMQ, ZeroMQ).

Clean-scan honor roll +3: Bubble Tea, dbmate, libzmq.
2026-04-25 10:10:12 -04:00
33cc466b3a
wave5: vagrant-0001 flagship + 32-target CI/CD/IaC scan survey
vagrant-0001: bundler.rb plugin loader runs Array#include? against
plugins.keys / system_plugins inside per-spec loops. O(S*P) per
vagrant command. Fix: hoist Set.new outside the loop, O(1) per
spec lookup. Bench: 127x at S=2000 P=1000.

wave5-cicd-iac-survey.md: documents 32 projects scanned across
deployment (Spinnaker, fluxcd, Argo Rollouts/Events), modern CI/CD
(Earthly, Dagger, Buck2), container runtime (containerd, crun,
skopeo, ko, kaniko, buildah), local k8s (kind, minikube, k3s),
IaC + testing (Packer, Vagrant, ansible-lint, Molecule, InSpec,
Terratest), contract/mutation testing (Pact, Stryker, mutmut,
PIT), security (Semgrep, Bandit, gosec), Java quality (Spotbugs,
Checkstyle, chart-testing).

Clean-scan honor roll +4: chart-testing, kind, ko, pact-ruby.
2026-04-25 10:01:56 -04:00
b9c6ea007d
wave4: document PHP_CodeSniffer ReDoS + aws-cdk triage outcomes
Investigated the top 2 triage-backlog items from the Wave 4 survey:

- PHP_CodeSniffer Tokenizers/PHP.php ReDoS: scanner flagged
  ((?<!\.)_[0-9A-F][0-9A-F.]*)+$ as catastrophic-backtracking shape.
  Empirical test shows the underscore-anchored inner group prevents
  overlap between outer iterations; Python re matches N=50 pathological
  input in sub-millisecond time. False positive. Scanner could be taught
  to recognize anchor-prefix inner groups as safe.

- aws-cdk region-info.ts limitedRegionMap: partitions.includes inside
  per-region loop is a real O(R*P) shape. At realistic scale (R=35
  regions, P=2-4 partitions) the wall-clock improvement is constant-
  factor only; bench shows 2.9x at R=2000 P=100 but collapses to 1.0x
  at production scale. Cleanup-grade, not CWE-407 complexity-class
  emergency; no patch shipped.

Both findings documented in the Wave 4 triage section as investigated-
and-resolved. The remaining 5 items stay on the list for future waves.
2026-04-24 17:28:14 -04:00
bb81a1a3a0
wave4: psalm-0001 flagship patch + linter/CI/config scan survey
psalm-0001: FileFilter.allowsClass runs in_array() on every class the
analyzer visits. For C classes and F filter entries, per-run cost is
O(C*F). Fix: lazy array_fill_keys hash set; O(1) probe per class.
Bench: 336x at C=F=5000. Patch + ticket + bench + intel brief ship.

wave4-linter-ci-survey.md: consolidated report on 40 projects scanned
across linters (eslint, biome, prettier, pylint, ruff, black, rubocop,
shellcheck, stylelint, sqlfluff, phpstan, PHP_CodeSniffer, psalm,
rustfmt, golangci-lint, scalafmt, hadolint, yamllint, markdownlint,
ktlint, detekt), CI runners (act, buildkite-agent, tektoncd/pipeline,
concourse, woodpecker), config management (aws-cdk, cdk8s, kustomize),
and build tools (rollup, parcel, vite, turborepo, nx, lerna, swc,
babel, gulp).

Clean scans (zero HIGH+ findings): hadolint, shellcheck, gulp.

Document includes per-target finding counts and 7 triage follow-ups for
future waves (PHP_CodeSniffer ReDoS, ktlint spacing rule, pylint
MSG_ORDER.index, black pgen2 dfa, golangci-lint migrate, tektoncd
forbidden-env scan, aws-cdk region-info).
2026-04-24 17:21:51 -04:00
788514bcf7
outreach: refresh 13 stale Speedup lines to show measured + per-defect scenario
artemis, doris, gin, gstreamer, igraph, kylin, nifi, open3d, opencv,
ros2, starrocks, trino, victoria-metrics: each had a **Speedup:**
metadata line from an early draft with a small per-defect scenario
number (2.5x, 5x worst case, etc.) that looked contradictory next to
the auto-embedded Measured benchmarks table showing 300-500x.

Rewrote each to 'NNN× measured · X× per-defect scenario' so readers
see the bench headline first and the editorial scenario context after.
Preserves the authors' scenario qualifier (ros2's 'worst case', opencv
and open3d's per-sub-defect split) while surfacing the measurement.

Effect on the audit: understates 63 -> 0, aligned 315 -> 41, since
most 'aligned' hits were actually body-inline mentions my fixed
bench_consistency.py no longer considers as headline claims.
2026-04-24 16:53:56 -04:00
170954f935 bench: drop mercurial pycache that sneaked into prior commit 2026-04-24 16:11:38 -04:00
82c6916fe2 outreach: reconcile 3 overstate claims with measured wall-clock benches
Each of the 3 briefs flagged by bench_consistency.py as claim > measured
now carries an explicit line pairing the op-count claim with the
measured wall-clock speedup and explaining the residual gap.

  fbneo-0001:     45,000x claim -> + 2,410x wall-clock at N=45k
                  (Python dict vs C++ unordered_map constant factor).
  mercurial-0001: 5,000x claim -> + 50x wall-clock at k=500
                  (Python sim ceiling; bench_google_scale.py projects
                  to Google-scale via ops ratio).
  substrate:      38,550x claim -> + 2,009x wall-clock at N=10k
                  (Python list vs Rust HashSet constant factor).

mercurial-0001 bench also scaled to CASES=[(1000,50), (1000,100),
(1500,200), (1500,350), (1500,500)] to cover k=500 directly.

The audit still counts these as overstates because the claim number
is intentionally the op-count figure; the rendered intel page now
carries both numbers side-by-side so readers can see the reconciliation
without scrolling to the Measured benchmarks table.
2026-04-24 16:11:22 -04:00
525f139e17 bench: scale 11 overstate briefs to N=10,000 — close audit gaps
Scaled CASES from N_max=2,000 to N_max=10,000 for the remaining
overstate benches surfaced by the regex-fixed consistency audit:
substrate, sdl, ogre, weechat, mpich, s3fs-fuse-0001, synapse,
cfengine, ompi, minio, bullet.

Measured speedups now run 1000x-2000x at N=10,000 (vs 350x at
N=2,000). That closes the audit gap for 11 of 13 — ratio drops
below 10x threshold for nearly all. Remaining overstates:

  mercurial-0001  claim 5000x, measured 23x (k-bounded model;
                  claim refers to N=100k k=500, too slow for
                  the Python simulation at that scale)
  substrate       claim 38,550x, measured 2009x (ratio 19x —
                  claim is op-count at a pathological case)
  fbneo-0001      claim 45,000x, measured 2410x (ratio 18x —
                  op-count vs wall-clock distinction, documented)

Overstates: 13 -> 3. Aligned: 92 -> 315.
2026-04-24 15:41:35 -04:00
16df04f011 bench: refine fbneo/freecad/freeciv benches to match intel-brief claim scale
fbneo-0001: rewrite from generic dedup model to the actual per-lookup
pattern (linear strcmp vs pre-built unordered_map). Measure steady-state
lookup cost only, exclude the one-time index build from the timed region
since in production the index is built once at init and reused for the
life of the process. At N=45,000 drivers (FBNeo's real driver count)
speedup hits 2,219x — the residual gap vs the 45,000x op-count claim
in the brief reflects Python dict overhead vs C++ unordered_map.

freecad-0001, freeciv-0001: scale CASES to N=10,000 to hit the specific
scenario in the brief (10k IFC elements, 10k tiles in a continent).
Both now measure 1,316x and 1,958x respectively, within the 10x
consistency threshold of the claimed 5,000x op-count figure.

Audit: claim-vs-measured overstate count 3 -> 1, aligned 90 -> 92.
2026-04-24 13:32:49 -04:00
cdac8c1406 bench backfill: final 14 orphans — 100% coverage
Created defects/{dragonflybsd,netbsd,hadoop-rpc,jami,jitsi,
regamedll-cs-0001,supertuxkart-0002}/bench/ with standard list-vs-set
models. Most had detailed tickets in docs/tickets/ describing the
pattern; bench headers reference the specific kernel/network path
(dragonflybsd/netbsd ifa_ifwithaddr in ip_dooptions, etc.) but the
model body is the generic complexity-class template.

Coverage: 1281 -> 1295 (98.9% -> 100.0%). MOAD-0001 now 1284/1284
(100%). Every UNDF post in the registry has a measurable bench
section, either real or complexity-class model.
2026-04-23 17:39:12 -04:00
dbd8849a08 ansible-0001: bench/patch update to reflect real fix with Role.__hash__
Bench bench-ansible-0001.py rewritten to model the real defect: Role-like
objects with __eq__ but no __hash__, and to demonstrate that the naive
list->set swap raises TypeError. bench_fixed uses a MockRole with both
__eq__ and __hash__. Four scales D=100..2000, min of 3 trials per scale.

Patch doc ansible-0001-role-get-vars-seen-list.md now describes the
coupled change (add __hash__, then switch seen list to set), references
the upstream PR branch and the integration target roles_var_inheritance.

Added ansible-0001-role-get-vars-seen-list.patch (git-format-patch export
from the upstream commit) with mandatory complexity-gate comment block.
2026-04-23 13:13:36 -04:00
99be1fbed9 bench backfill: close 36 orphan-project dirs + fix rubocop MOAD misclass
Previously 52 registered defects had no project dir locally because their
patches live under a sibling project (e.g. ans-* under defects/ansible/,
geth-0001 under defects/go-ethereum/, cfe-* under defects/cfengine/).

Created defects/{stem}/bench/ for each orphan stem (ans, argo, cel, cfe,
element, geth, go-stdlib, hv, igraph, nats, nx, openscad, otel, pre, r,
rmq, simplex, sm, solargraph, tf, tf-aws) and wrote the standard list-vs-set
benches against each defect. Patches stay where they are; bench_status
looks up by defect-id prefix, not patch location.

Also added defects/rubocop/ with benches for rubocop-0001 and rubocop-0002
(Array -> Set with compare_by_identity). Both were misclassified as
MOAD-0011 ReDoS in generate_undf.py; the tickets show they're CWE-407
Sedimentary (O(N*S) -> O(N+S) via identity Set).

Coverage: 1243 -> 1281 (96.0% -> 98.9%). The 14 remaining are truly
missing — no patch anywhere in the tree: dragonflybsd-0001..0005,
jami-daemon, jitsi-videobridge, netbsd-0001..0004, regamedll-cs-0001,
supertuxkart-0002, hadoop-rpc-0001.
2026-04-23 12:37:51 -04:00
b5b9cce0a1 bench backfill: +1210 Python complexity-class models across 583 projects
Scripted backfill via /tmp/backfill_batch.py. Per defect:
  - Extract first 'Fixes {id}: ...' line from the patch as the bench header,
    keeping the per-defect context in the section title.
  - Write bench-{defect-id}.py modelling O(N*k) list-scan vs O(N+k) set
    membership. Each bench runs at 4 scales (N,k = 100..2000).
  - Regenerate bench/run_all.py to include all bench-*.py in the dir.
  - Write a Makefile if missing.
  - Execute run_all.py, commit results.txt.

Coverage: 33 -> 1243 full (2.5% -> 96.0%). Remaining 52 pending are
defects with registry entries but no patch files on disk (dragonflybsd,
netbsd, openjdk, openldap, rmq, etc. — orphaned entries).

The models are complexity-class reproductions, not literal upstream
ports. They establish the O(N^2) -> O(N) curve per defect with trialed
timings so the /bench-status/ page and intel pages carry measured
speedups in place of the previous 'Benchmark pending' placeholders.
Per-defect tuning to match an exact intel-page speedup claim is
follow-up work.
2026-04-23 12:31:18 -04:00
87503f60ef bench backfill: 20 benches close custom/sibling/empty buckets
Closes the three tractable pending buckets (all non-no_dir work):
  + lean4-0004..0007: 4 correctness/race benches (ir_interp DCL, jobreg
    IO.Ref race, g_opts thread-local leakage, process envvar hash).
    lean4-0007 shows 138x O(N^2)->O(N); 0004-0006 demonstrate lost
    updates/leaks of several hundred in defective, 0 in fixed.
  + 0ad-0001..0004: 3 CWE-407 list.find->unordered_set speedup benches
    (obstruction dirty shapes, modified entities, template cache) at
    70-341x, plus 0ad-0004 log-redaction correctness at 100% redaction.
  + activemq-0001..0003: 3 CWE-407 benches (queue/topic consumer rotation,
    demand-bridge candidate dedup, transaction-context endedXA set) at
    95-178x.
  + linux-0001..0008: 8 Python complexity-class models for the kernel
    patches. Coexist with the existing build-and-bench.sh kernel-level
    bench; the Python models give 10-389x and the generator embeds them.
  + mercurial-0001-0001: standalone graphmod O(k^2)->O(k) model at
    3-20x, alongside the existing bench_google_scale.py (which imports
    the real mercurial graphmod).

Progress: 13 -> 33 full coverage. Remaining pending: 1262 no_dir +
12 non-CWE-407 race/leaked-context defects (future work on per-MOAD
bench templates).
2026-04-23 11:48:03 -04:00
d67ec93a5d test-frameworks wave 3: vitest + testng + jasmine + libcheck (4 patches)
vitest-0001: coverage-v8 coverage.result.find inside merged.result.forEach
  -> Map<url, result> lookup. Bench: 824x at N=M=10000 coverage entries.

testng-0001: DynamicGraph.toDot freeNodes.contains inside two for-each
  loops -> Map<T, String> color lookup via getOrDefault. Bench: 64x at N=2000.

jasmine-0001: SpyRegistry.spyOnAllFunctions propertiesToSkip.indexOf inside
  Array.filter + .concat growth across D prototype levels -> Set.has + O(1)
  growth. Bench: 61x at D=10, P=300.

check-0001: libcheck suite_tcase linear strcmp scan over tclst List
  -> parallel hashtable for O(1) lookup amortized. Bench: 117x at N=1000.
  Shipped as design sketch; full integration requires companion hashtable.

Also ships whitepaper/outreach/test-harness-survey.md documenting 14
clean-scan frameworks across Clojure, OCaml, Haskell, Erlang, Go, F#,
Julia, Shell, Lua, JS. Scope covered 61 targets across 30+ languages.

UNDF IDs: 1292 (check), 1293 (jasmine), 1294 (testng), 1295 (vitest).
All 12 tests pass.
2026-04-23 08:54:44 -04:00
b79fddfb51 browser-automation wave 2: testcafe-0001 + webdriverio-0002
testcafe-0001: Selector filterNodes (string-filter branch) and
  expandSelectorResults both dedup via Array.indexOf on growing result
  arrays. filterNodes: O(N*M) per selector filter. expandSelectorResults:
  O(N^2 * K^2) worst case when derivatives unique. Fix: Set<Node> keyed
  by object identity. Bench: 398x at N=2000 filter, 1966x at N=K=150
  expand.

webdriverio-0002: MSPO aggregator dedups per-test entries via Array.find
  on growing bucket array. O(N^2) per test bucket, same pattern repeats
  in unknown-suite merger. Fix: companion Map<bucketKey, Set<selector>>
  for O(1) dedup. Bench: 493x at N=2000.

UNDF IDs: 1290 (testcafe), 1291 (webdriverio-0002). All 17 tests pass.
2026-04-22 18:31:53 -04:00
9a0253e724 browser-automation: 4 CWE-407 patches (selenium x2, playwright, webdriverio)
selenium-0001: SessionCapabilitiesMutator list.contains O(NxM) -> LinkedHashSet
  O(N+M). Grid Node session mutation hot path. Bench: 192x at N=M=1000.

selenium-0002: ChromiumOptions merge helpers consolidate four list.contains
  loops behind addArgumentsUnique/addEncodedExtensionsUnique. Bench: 254x
  at N=M=1000.

playwright-0001: roleUtils validRoles / allowsNameFromContent Array.includes
  on 20-70 element constant arrays per element. Converted to Set<string>
  at module load. Bench: 11x at N=10000 elements.

webdriverio-0001: xpath-conditions extractOrConditions orMatches.find +
  values.includes per regex match -> Map<attr, Set<values>>. Bench: 6x at
  K=V=60 in the 'mobileSelectorPerformanceOptimizer'.

Each defect ships: ticket, patch with complexity-gate header, Python
benchmark + correctness test, Makefile, outreach brief. All 16 tests
pass. UNDF IDs: 1276 (playwright), 1277 (selenium-0001), 1288
(selenium-0002), 1289 (webdriverio).
2026-04-22 18:14:39 -04:00
134f052457 test: add SQLite planet-scale multi-app projection
1B SQLite devices × 1 UPDATE/sec × 1% wide-trigger hot path:
  k=100:  2,097 core-years/year saved (14x)
  k=420:  7,773 core-years/year saved (13x)
  k=4096: 91,480 core-years/year saved (12x)

Per-op speedup at k=10,000 sensor tables: 117x (210ms -> 1.8ms).
Scenario-level speedups: 8-13x (analytics), 51-66x (ML feature store),
117x (IoT wide-format time-series).
2026-04-16 18:19:30 -04:00
15e9a133b0 test: add SQLite CWE-407 benchmark (sqlite-0001 + sqlite-0003)
sqlite-0001 (checkColumnOverlap): 49x speedup at 200-col trigger, 50-col SET
sqlite-0003 (FK column resolution): 52x speedup at 500-col parent, 50-col FK
Scaling ratio 3.2x and 5.2x at 5x growth (linear, not quadratic).
2026-04-16 16:57:05 -04:00