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.
This commit is contained in:
russell@unturf.com 2026-04-25 15:27:06 -04:00
parent e55ba1608e
commit aa6917d7ed
No known key found for this signature in database

View file

@ -0,0 +1,81 @@
# Wave 18 — Cloud SDKs, Auth, GUI, Audio
**Survey date:** 2026-04-25
**Tool:** unmoad (9 active MOAD detectors, HIGH+ severity filter)
**Scope:** 10 projects across cloud SDK clients (aws-sdk-go-v2, azure-sdk-for-go, google-cloud-go), authn/authz (keycloak, casbin, kratos), immediate-mode GUI (imgui), audio (fluidsynth), workflow (n8n), and music engraving (lilypond).
---
## Summary
Wave 18 totals 47,059 HIGH+ findings across 10 projects — by far our largest wave count, dominated by cloud-SDK auto-generated client code repeating identical patterns across hundreds of services. **Ten new clean-scan honor roll entries** (all 10 targets resolve to bounded, auto-generated, or vendored patterns under inspection). Honor roll cumulative: **96 projects** across waves 3-18.
**No flagship CWE-407 patches ship this pass.** Cloud SDKs follow a strong pattern: code generated from Smithy/AutoRest/protobuf-gencli specifications, with the same `slices.Contains(expect, ...)` template applied per-service-per-operation. Aggregated finding counts are huge but unique source patterns are tiny.
## Clean-scan honor roll — 10 new entries
| Project | Lang | Role | Notes |
|---------|------|------|-------|
| **aws-sdk-go-v2** | Go | AWS SDK for Go (v2) | 19,102 findings, but only **15 non-test M1 hits** (all in Smithy Java codegen with Java HashSet). Remaining 18,567 are `slices.Contains(expect, trimmed)` in auto-generated `internal/protocoltest/*/sra_operation_order_test.go` per service. Codegen template artifact, not source defect. |
| **azure-sdk-for-go** | Go | Azure SDK for Go | 25,898 findings: dominated by `*_client.go` + `*_client_example_test.go` auto-generated AutoRest clients per service, plus `eng/pipelines/templates/jobs/*.yml` cloud-variant `contains` checks (Azure Public/Government/China — bounded). M4 cluster in `cmd/issue/query/login.go` "Loging in with username and password" log message (literal in source string, not credential leak). |
| **google-cloud-go** | Go | Google Cloud SDK | 295 findings: 218 M4 from auto-generated client doc strings naming auth scopes/tokens/keys; 33 M3 ContextWithValue in test files; 32 M9 cron expressions in scheduler client docs. Auto-generated. |
| **keycloak** | Java | Identity and Access Management | 31 findings: `KeycloakSubsystemParser.java` `parsedElements.contains(tagName)` per XML element parse — bounded by SAML/OIDC config block element count (~10-50 tags). |
| **casbin** | Go | Access control library | 2 findings: both M4 in `ai_api.go` `fmt.Sprintf("Subject: %v\n", rvals[0])` — casbin's AI explainer logs the policy decision context, not a credential. **clean** |
| **kratos** | Go | Ory identity server | 152 findings: 78 M4 are `fmt.Sprintf("?page_token=%s&page_size=%d", ...)` test URL builders (M4 FP on `page_token` literal); 51 M3 ContextWithValue in tests. **clean** |
| **imgui** | C++ | Dear ImGui — immediate-mode GUI | 5 findings: 1 is the `ImVector::contains` definition in `imgui.h:2262`; 4 are call sites against bounded GUI element counts (selection, menu IDs submitted this frame, font sources, atlas draw lists). All bounded by visible GUI elements. **clean** |
| **fluidsynth** | C | Software MIDI synthesizer | 5 findings: vendored `contrib/getopt/win/getopt.c` (Windows getopt port) + sample format string check + test. **clean** |
| **lilypond** | C++/Python | Music engraving | 73 findings: `python/musicexp.py` `e.contains(elem)` is intentional music-tree containment algorithm; M11 ReDoS in `book_html.py` / `convertrules.py` are per-line regex compile (build-time). **clean** |
| **n8n** | TypeScript | Workflow automation | 1,371 findings: 718 non-test/vendor M1 — overwhelmingly `priorityList.indexOf(a)`, `SUPPORTED_TYPES.includes(type)`, `regions.find(r => r.name === region)`, `[fixed-list].includes(value)`. All bounded per-node-type lookups. M6 weak-hash cluster (192) in vendored bcryptjs/md5/sha1 within node-base credential helpers (cipher implementations, not weak-credential storage). |
Honor roll now stands at **96 projects** validated zero-real-finding under MOAD scanning.
## Per-target findings
| Project | Lang | Total | M1 | M3 | M4 | M5 | M6 | M7 | M9 | M11 | Triage |
|---------|------|------:|---:|---:|---:|---:|---:|---:|---:|----:|--------|
| **azure-sdk-for-go** | Go | 25898 | - | 11920 | 13934 | - | 1 | 43 | - | - | Auto-generated AutoRest clients + pipeline YAML. **clean** |
| **aws-sdk-go-v2** | Go | 19102 | 18582 | 446 | 59 | - | 1 | 14 | - | - | Auto-generated Smithy protocol-test patterns + 15 codegen Java hits. **clean** |
| **n8n** | TS | 1371 | 1015 | 4 | 142 | 8 | 192 | 8 | 1 | 1 | Per-node bounded enums + vendored crypto. **clean** |
| **google-cloud-go** | Go | 295 | 5 | 33 | 218 | 1 | - | 6 | 32 | - | Auto-generated client doc strings. **clean** |
| **kratos** | Go | 152 | 17 | 51 | 78 | - | 6 | - | - | - | Test URL builders + ContextWithValue. **clean** |
| **lilypond** | C++/Python | 73 | 35 | - | - | - | - | 7 | - | 31 | Music tree containment + per-line regex. **clean** |
| **keycloak** | Java | 31 | 11 | 2 | 5 | 4 | - | 9 | - | - | Bounded XML config tag count. **clean** |
| **imgui** | C++ | 5 | - | - | - | - | - | 5 | - | - | Bounded GUI elements. **clean** |
| **fluidsynth** | C | 5 | 5 | - | - | - | - | - | - | - | Vendored getopt + tests. **clean** |
| **casbin** | Go | 2 | - | - | 2 | - | - | - | - | - | Policy explainer log strings. **clean** |
## Investigations
### Cloud SDK auto-generation pattern (aws-sdk-go-v2 + azure-sdk-for-go + google-cloud-go)
These three SDKs together account for **45,295 of Wave 18's 47,059 findings (96%)**. The patterns are **the same template applied N times** by Smithy (AWS), AutoRest (Azure), and protobuf-gencli (GCP) across hundreds of services and operations. A single template-level fix would clear thousands of findings; conversely, the per-service-per-operation count tells us nothing new about the underlying complexity class.
**Detector enhancement candidate:** suppress findings inside `*_client.go`, `*_client_example_test.go`, `internal/protocoltest/*` paths and YAML CI-include patterns. Or: add a "codegen artifact" classification that aggregates duplicate findings across the same template.
### keycloak `KeycloakSubsystemParser.parsedElements.contains` pattern
Per XML element parse, `parsedElements.contains(tagName)` is called to detect duplicate elements within the SAML/OIDC config block. `parsedElements` is `Set<String>` (Java HashSet) — already O(1) — but scanner does not yet model Java `Set<T>` declared types (Wave 11 onnxruntime + Wave 15 swagger-codegen gap reinforced).
### imgui ImVector::contains
`imgui.h:2262` defines `ImVector::contains(const T& v) const` — an O(N) linear scan, which is correct for the small-array container ImVector. ImGui design philosophy uses ImVector deliberately (cache-friendly contiguous storage). All call sites are against small bounded counts (active menus this frame, font sources, draw lists) — appropriate for ImVector design.
### lilypond music-tree `contains(elem)`
`musicexp.py:1158` defines a recursive `contains(elem)` for Music tree nodes — `return self == elem or self.music.contains(elem)`. This is intentional tree-walk recursion, the algorithm itself, not a lookup that should be replaced with a hash.
## Triage backlog
1. **Scanner enhancement: codegen-artifact suppression** — recognize `*_client.go`, `internal/protocoltest/*`, AutoRest/Smithy/protobuf-gencli outputs. Would clear 45k+ wave-wide FPs from cloud SDK scans.
2. **Scanner enhancement: Java Set<T> declared-type awareness** (continued from Wave 11 + Wave 15) — keycloak reinforces the gap.
3. **Scanner enhancement: M4 string-literal-only suppression in test path components** (continued from Wave 10) — kratos `?page_token=...&page_size=...` URL builders in `*_test.go` are test data, not credential leaks.
## Method
Same as Waves 3-17: shallow clone, `unmoad -s high -f json`, filter test/vendor/codegen/UI noise, manual triage of strongest source-only candidates per project. **Ten projects added to clean-scan honor roll.** No new UNDF IDs assigned (no patches shipped — all patterns under inspection are bounded constants, intentional algorithms, or auto-generated artifacts).
## References
- `unmoad` detection engine: `git.unturf.com/engineering/unmoad.com`
- Earlier surveys: `/test-harness-survey/`, `/wave4-linter-ci-survey/`, `/wave5-cicd-iac-survey/`, `/wave6-docgen-webfw-tui-survey/`, `/docs-pipeline-survey/`, `/wave7-mail-dns-storage-vpn-rtos-survey/`, `/wave8-observability-streaming-survey/`, `/wave9-image-pdf-db-editors-survey/`, `/wave10-crypto-text-geo-flutter-survey/`, `/wave11-unix-search-ml-survey/`, `/wave12-sci-static-site-api-gateway-survey/`, `/wave13-vms-devtools-graphql-survey/`, `/wave14-mobile-edge-pl-wm-survey/`, `/wave15-security-data-eng-ide-survey/`, `/wave16-cms-workflow-bio-node-survey/`, `/wave17-php-python-bundler-survey/`
- Clean-scan honor roll cumulative: 96 projects across waves 3-18