Skip to content

UI5 Framework Modeling Gaps #263

@data-douser

Description

@data-douser

Summary

Analysis of current UI5 CodeQL modeling identified gaps in framework component coverage and query patterns. This issue tracks enhancements to improve detection of insecure UI5 patterns.

Identified Gaps

Navigation & Routing

  • Navigation patterns - Missing remote flow sources from programmatic navigation APIs (NavContainer.to, NavContainer.back)
  • Hash-based routing - No modeling for sap.ui.core.routing.HashChanger parameter extraction
  • Route pattern matching - Incomplete coverage for route parameter sources beyond attachRouteMatched

Messaging & Events

  • MessageBox user input - Actions in MessageBox.show callbacks not modeled as event handlers
  • MessageToast - Toast notification text rendering not modeled as display sink
  • Custom event parameters - Generic fireEvent/attachEvent patterns incomplete

Data Models & Binding

  • Client-side filtering - Filter expressions from sap.ui.model.Filter not tracked as potential injection vectors
  • Computed bindings - Expression binding syntax ({= ... }) parsing incomplete
  • List binding paths - Aggregation binding contexts not fully tracked through data flow
  • XMLModel - Remote XML data sources not modeled

Controls & Components

  • Fragment instantiation - Fragment.load dynamic content not tracked
  • Component container - Cross-component data flow through ComponentContainer incomplete
  • Smart controls - sap.ui.comp library controls (SmartTable, SmartForm, etc.) not modeled
  • Flexible column layout - Navigation between columns not tracked

Security-Specific

  • Content Security Policy - No query for inline event handlers violating CSP
  • Trusted types - No modeling for Trusted Types API usage in UI5 apps

Storage & Persistence

  • Session storage - jQuery.sap.storage.Type.session not distinguished from local storage
  • Storage key validation - Missing sanitizer recognition for storage key restrictions

Exclusions

Work already completed or in progress:

Implementation Notes

Following PR #258 pattern:

  • Add types to ext/ui5.model.yml for new framework APIs
  • Extend lib/.../FlowSteps.qll and lib/.../TypeTrackers.qll as needed
  • Create test cases in test/models/ and test/queries/ with both positive and negative examples
  • Document in change notes following src/change-notes/*.md format

References

  • Agent: .github/agents/javascript-ui5-modeling-agent.md
  • Instructions: .github/instructions/javascript_ui5_ql.instructions.md
  • Prompts: .github/prompts/ui5_framework_development.prompt.md

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions