Skip to content
Back to skills

Report Security

ASecurity

Produce and triage the security review (mxcli report security): who can read what, client-callable flows that trust the caller, unsafe defaults (secret-looking constants, test switches, demo users), and a verdict per lint security rule. Use for a security review of a Mendix model, when the scored report's security score looks alarming, or before going to production.

  • 143 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added November 22, 2026
ai-agentsrustgobashreactgitdatabasesecurity

Works with

  • cli

Security analysis

A100/100

Scanned November 22, 2026

npx -y skills add mendixlabs/mxcli --skill report-security --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Report Security?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Report Security
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/mendixlabs-report-security/badge)](https://www.skillsdirectory.com/skills/mendixlabs-report-security)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: report-security
description: "Produce and triage the security review (mxcli report security): who can read what, client-callable flows that trust the caller, unsafe defaults (secret-looking constants, test switches, demo users), and a verdict per lint security rule. Use for a security review of a Mendix model, when the scored report's security score looks alarming, or before going to production."
---
<!-- skill-index: generated by scripts/skill-index.py; make check-skill-index -->
## Find it fast

`sed -n '<from>,<to>p' SKILL.md` one section rather than reading the file;
`./mxcli syntax <topic>` answers *how do I write this* for a fraction of either.

| lines | section |
|---|---|
| 32-38 | Run it |
| 39-69 | Triage a client-callable flow |
| 70-88 | Unsafe defaults |
| 89-96 | Live probes (only on a local app, only undone through the app) |
| 97-120 | Statuses |
| 121-124 | Related |

<!-- /skill-index -->
# Security Report

`mxcli report security` is a model review that says what protects the data, what
does not, and what to fix — instead of a score. The scored `mxcli report` can rate an
app 0/100 almost entirely from intended row-level rules while the real problems are
elsewhere; this page puts those rules in a table with a verdict each and lists the
real findings first.

It is not a penetration test. Hosting, headers, Marketplace CVEs and rate limiting
are out of scope, and the page says so.

## Run it

```bash
mxcli report security -p app.mpr --format json -o docs/security/sec.json
mxcli report security --from docs/security/sec.json --annotations docs/security/status.yaml -o docs/security/security.html
```

## Triage a client-callable flow

The page lists every microflow a user role may call that takes a persistent object,
one table per entity they take (the riskiest first). The client passes that object
as a **plain id**. Work through each one:

1. **Does it take the acting user (or "me") as a parameter?** Then any user the
   caller may read can be substituted. Measured on a running app: a subscription was
   created for another user this way. Fix: derive the user in the body
   (`$currentUser`), never take it from the page.
2. **Does it check the caller?** (`$currentUser`, `[%CurrentUser%]`) In its own body
   it holds, provided the check is on the object it acts on. In a sub-microflow that
   works with the same entity, the report names the sub and rates it low: confirm
   it, because a sub that fetches the caller's *own* cart does not protect a
   different cart the page passed in. A sub checking the caller on another entity (a
   toast, a log line) does not count.
3. **Entity access off and it writes the object it takes** (in the flow or a
   sub-microflow)? The client can only pass an object its role may read, so the read
   rule bounds the substitution: high when the granted roles read every row of the
   entity, medium when the rule narrows it (own rows). Turn entity access on or add
   the check. Writing a *different* entity (the caller's own cart line) is not this
   case.
4. **Relies on access rules?** Then it is as safe as the parameter entity's read
   rule for the granted roles. `all` means any id works.

**The parameter-versus-association rule** decides which flagged flows are real: an
object *parameter* is a plain id and can be substituted, but a forged *association
value* in a request is rejected by the runtime ("Hash is invalid"), and with strict
mode `mx.data.get` is refused. A flow that only receives objects through
associations of an object it already checks is not exposed the same way.

## Unsafe defaults

The **Settings and defaults** section lists every security setting and every app
constant's committed default, also the ones that are fine — a default that looks
like a secret is masked, never printed. The findings below are the ones it flags.
What a deployment overrides is not in the model; ask whoever runs the environments.

- **A constant whose default looks like key material** (base64 of 16/32 bytes, hex
  keys, PEM) is committed in git with the model. "Override in every environment" in
  a comment is not a control. Empty the default, set it per environment, and
  **rotate the key** — it is in the history.
- **Test switches defaulting to true** (`MockDataOn = true`) switch on mock imports
  or relaxed checks in any environment that forgot the override.
- **Demo users at Production**, including the app template's `demo_administrator`.
  Two runtime facts decide the fix: dropping a demo user from the model does **not**
  delete its account from an existing database, and the runtime does **not**
  reactivate a demo account that was deactivated. Deactivate the accounts in each
  database as well as removing them from the model.

## Live probes (only on a local app, only undone through the app)

To confirm a flagged flow, replay its page action with a substituted object id on a
local app with demo users (`mxcli run --local`), see whether it is accepted, then
**undo the effect through the app** (the same flow, or the UI) — never by editing
the database behind the runtime's back. Never probe a shared or production
environment.

## Statuses

An accepted **lint** finding belongs in the project brain, not here: record it once
as a decision and lint, the scored report and this page all read it.

```bash
mxcli brain capture "Beperking has no access rules on purpose" --accepts "SEC001:logged reads only" -a @Dossier.Beperking -p app.mpr
```

The lint table then shows *accepted (brain <id>)*. Use the annotations file for the
report's own items (findings, flows) and for notes the brain does not hold:

```yaml
items:
  "finding:constant-secret:Crypto.EncryptionKey": {status: fixed, note: "rotated 2026-11; env only"}
  "finding:flow:Swaps.ACT_Subscribe": {status: open, note: "takes $Medewerker from the page"}
  "flow:Admin.ACT_Reset": {status: intended, note: "admin only, checks role in body via SUB"}
  "rule:CONV007": {status: intended, note: "reference data and admin roles"}
  "rule:SEC010": {status: accepted}
```

Statuses: `open`, `fixed`, `accepted`, `intended`, `real`. A finding marked fixed
that the next run still finds stays listed with its status — re-measure after fixing.

## Related

- `manage-security` — writing roles, access rules and grants in MDL.
- `xpath-constraints` — the constraints the grid classifies.

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in ai-agents →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.