1.3 KiB
1.3 KiB
Apache Beam — CWE-407 Scan Result: CLEAN
Date: 2026-03-30 Scanner: agent blackops Scope: sdks/java/core/src/main/java/, runners/
Summary
Apache Beam's Java SDK and runners are clean of CWE-407 algorithmic complexity defects. The codebase consistently uses HashSet/LinkedHashSet for membership tests in graph traversal, pipeline fusion, and transform hierarchy operations.
Key observations
GreedyStageFuser: usesLinkedHashSetfor fusedCollections/materializedPCollectionsGreedyPipelineFuser: usesLinkedHashSet/HashSetthroughout; has O(N²) comment at groupSiblings but this is inherent sibling compatibility checking, not a membership defectNetworks: usesvisitedNodesSet for BFS reachabilityTransformHierarchy: all visited tracking usesSet<Node>PipelineTranslation: viewTransforms isHashSet<String>Schema.indexOf(): backed byfieldIndicesHashMapPipelineOptionsFactory: usesHashSetfor usedDescriptors,ImmutableSetfor IGNORED_METHODSExperimentContext: usesEnumSetfor experiment lookupDataflowRunner.stageArtifacts: usesHashSetfor stagedNames dedupCombineFns.checkUniqueness: List.contains() but N is number of composed combiners (2-5)
No data-proportional linear scans inside loops found.