Skip to content

learn(security): MxAdmin exists only where the runtime host created it (#662) - #771

Open
MendixMau wants to merge 2 commits into
masterfrom
triage/662-mxadmin-run-local
Open

MendixMau wants to merge 2 commits into
masterfrom
triage/662-mxadmin-run-local

Conversation

@MendixMau

Copy link
Copy Markdown
Owner

Fixes #662

Direct lane

What changed and why (one paragraph): three places told agents that MxAdmin always exists with password 1. On the mxcli run --local lane that is false: the local boot sequence never calls create_admin_user, so a fresh database has no MxAdmin (the runtime logs MxAdmin user ... does not exist!). mxcli docker build seeds a different demo user, admin / Admin123!, when a project has none (see the triage-desk research comment on #662). The text now says that MxAdmin exists only where the runtime host created it (Studio Pro's own run, or the buildpack's ADMIN_PASSWORD), that run --local never creates it, and to sign in as a demo user. The "never touch MxAdmin" rule itself stays.

Changed:

  • skills/learned-mdl-preflight.md:66 (always-loaded);
  • skills/brd-to-build-plan.md:696-697 (Step 7, including the "Signing in as MxAdmin ... needs no password" sentence);
  • skills/generated/rules-access.md:64, re-rendered with bin/mdl-rules.sh --render, not hand-edited.

Impact

Row Answer
Process none: no gate, step or artifact added or removed; rule text only
Dependencies none: no shared script or skill-routing.tsv touched. skills/generated/rules-access.md is re-rendered from learned-mdl-preflight.md. Related to #659 (the e2e template's fallback login), which this PR does not touch
Context cost bin/render-routing.sh --check baseline: 66,196 → 66,220 words (+24) of 80,000. The Stage 5 total goes 60,891 → 60,915; per-role counts at stages 4/5/6 are unchanged (mdl 11,085 / 14,705 / 9,581 on both). The added words replace a false fact, read when an agent writes security MDL or plans a sign-in
Behaviour NOT RUN: a factual correction of one clause in agent-read text, with no change in instruction shape. Maintainer to accept, or to request an A/B
Runtime n/a: no check, gate or step added

Time cost: none · 0 s · can force rework: n · offset: n/a

Field evidence: reported from a field run on mxcli nightly-20261105 / Mendix 11.15.0 (run --local, fresh database, runtime log MxAdmin user ... does not exist!). Confirmed against the upstream mxcli source in the triage-desk research comment: no create_admin_user, no ADMIN_PASSWORD handling, and docker build seeds admin / Admin123!.

Proof

  • grep -rn "password \1`" skills/ | wc -l`: 3 on master → 0 on the branch.

  • bash tests/wave2/test-mdl-rules.sh bin/mdl-rules.sh on the branch: 43 passed, 0 failed (the render is in sync).

  • No other fixture greps the changed sentences (grep -rn over tests/ for the old text finds nothing).

  • bin/check-scripts.sh: 137/137 shell, 30/30 Node. The leak guard against origin/master is clean.

  • No client data anywhere in the diff

  • Size cap: 4 files, 5 lines changed

  • Test tier reached: T0 (text change, render-in-sync fixture, grep check)

  • For a new/changed instrument: n/a (no instrument)

  • For a new skill: n/a

  • CHANGELOG.md line appended, crediting the source (field run, 2026-11)

  • New bug entries: n/a

Follow-up (not in scope): project-tests/e2e/project.config.template.js:157-159 still falls back to MxAdmin / Mendix1!, which matches none of the three hosts (run --local: no MxAdmin; Studio Pro: 1; docker build: admin / Admin123!). That belongs to #659's area and is left for it.

Review: pending independent review


Generated by Claude Code

#662)

Replace the false "MxAdmin ships with password `1`" claim in
learned-mdl-preflight.md (baseline), brd-to-build-plan.md Step 7 and the
rendered generated/rules-access.md: `mxcli run --local` never creates
MxAdmin; Studio Pro's own run or the buildpack's ADMIN_PASSWORD does.
Sign in as a demo user. The "never touch MxAdmin" rule stays.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HXpQSjXefSNicGGqP4aiSC
@MendixMau

Copy link
Copy Markdown
Owner Author

Review: MERGE. No findings. The false "MxAdmin ships with password 1" claim is gone from all three places, and the rendered file is in sync.

Value: Fixes #662 as triaged and as researched in the follow-up comment.

Regression risk: Text only. No gate, script or parsed output changes, so sync-project.sh changes nothing beyond the rule text. Layouts and platforms don't apply.

  • After this PR, a grep -rni mxadmin skills/ finds no remaining "password 1" or "sign in as MxAdmin" claim.
  • The journey-proof.md:47 mention is about specs silently running as MxAdmin, which is consistent with the new text.

Correctness:

  • bash tests/wave2/test-mdl-rules.sh bin/mdl-rules.sh in the worktree: 43 passed, 0 failed, so the render matches its source.
  • The removed sentence "Signing in as MxAdmin ... needs no password" is replaced by a pointer to the rule above it, which is consistent.
  • The research marks the claim about Studio Pro and the buildpack's ADMIN_PASSWORD as medium confidence. The new text words it as where MxAdmin can exist, which is the safe direction.
  • No conflict with origin/master.

Context cost: 66196 → 66220 always-loaded words (+24, measured with render-routing.sh --check). The added words replace a false fact in a baseline file that every MDL session reads.

Time cost: none per build row. It avoids a failed MxAdmin sign-in attempt on run --local projects.


Generated by Claude Code

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.

mxcli: run --local never creates the MxAdmin user, runtime logs "MxAdmin user does not exist"

2 participants