Skip to content

⁹## Pull request overview #597

@maniakogrupo-ctrl

Description

@maniakogrupo-ctrl

Pull request overview

This PR adds support for the ListElement token in Models as Data (MaD) for Python, enabling users to specify list element access in data flow models. The implementation maps ListElement to the existing subscript functionality, reusing infrastructure already in place for list element content.

Key changes:

  • Enabled ListElement token in MaD access paths by treating it the same as DictionaryElementAny
  • Updated test case to verify list element source detection works correctly
  • Added ListElement to the list of valid tokens for identifying access paths

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
python/ql/test/library-tests/frameworks/data/test.ext.yml Uncommented test case for ListElement to validate the new functionality
python/ql/test/library-tests/frameworks/data/test.expected Added expected test output showing that list element sources are now detected
python/ql/lib/semmle/python/frameworks/data/internal/ApiGraphModelsSpecific.qll Added ListElement support to token handling predicates, mapping it to subscript access

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Originally posted by @Copilot in github/codeql#21134 (review)

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