Skip to content

fix: SEC012 tells a microflow from a snippet of the same name - #2750

Merged
ako merged 1 commit into
mainfrom
claude/issue-triage-prioritization-24rqgv
Dec 2, 2026
Merged

ako merged 1 commit into
mainfrom
claude/issue-triage-prioritization-24rqgv

Conversation

@ako

@ako ako commented Dec 2, 2026

Copy link
Copy Markdown
Owner

Fixes #2730 (upstream mendixlabs#2004).

Problem

A Marketplace module holds a microflow and a snippet both named Lib.Overview. Execute access on the microflow is granted only to Lib.Runner, and a menu item calls it. SEC012 then reported CE2729 on every attribute that the snippet's nested snippet shows, for every role without Lib.Runner, which are exactly the roles that cannot reach it. mx check reported 0 errors. show references to Lib.Overview listed the menu item beside the page using the snippet, with nothing to tell them apart.

Cause: the SEC012 reach model keyed every document by its bare qualified name.

  • The navigation entry Lib.Overview (the microflow) was taken for the snippet. Its module was set, so the entry's execute check was skipped.
  • The microflow's and the snippet's references were merged under one key.

Fix

  • Nodes of the walk are kind + name (PAGE, SNIPPET, MICROFLOW, NANOFLOW):
    • References: by refs.SourceType.
    • Navigation: menu items and role homes by their page or microflow column, and a profile home by HomePageType.
    • Access: view and execute grants by permission element type.
  • A source whose type is none of the four is still placed by the documents of its name.
  • show references adds a TargetType column when the name belongs to more than one kind of document. A name of one kind lists as before.

Evidence

  • Tests first:
    • mdl/linter/rules/reachable_page_same_name_2730_test.go reported the false CE2729 before the fix. Its control, a viewable page holding the snippet, is still reported.
    • mdl/executor/show_references_same_name_2730_test.go failed both rows before the fix. Its control, one kind of document, gains no column.
    • The existing SEC012 reachability tests pass unchanged.
  • Live, Mendix 11.12.6: Studio Pro's format accepts a microflow and a snippet of one name. show references now prints menu_item … MICROFLOW and snippet_call … SNIPPET.
  • make ci-local passed. The rule and reference tests were re-run on the new main.

Generated by Claude Code

A Marketplace module held a microflow and a snippet both named
Lib.Overview. The SEC012 reach model keyed documents by qualified name
alone, so a menu item calling the microflow reached the snippet without
the execute check, and lint reported CE2729 on what the snippet shows for
roles that cannot reach it. The walk's nodes are now kind and name, from
refs.SourceType, the navigation columns and the permission element type.
show references adds the target type when a name has more than one kind.

Fixes #2730

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011oK82qrr1WnXxq1eRn7qRJ
@ako
ako merged commit 9f95149 into main Dec 2, 2026
19 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[up#2004] SEC012 conflates a microflow with a snippet of the same name

2 participants