> For the complete documentation index, see [llms.txt](https://ispectra.gitbook.io/mutamad/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://ispectra.gitbook.io/mutamad/getting-started/verify.md). Agents can also search and read this documentation through its [MCP server](https://ispectra.gitbook.io/mutamad/~gitbook/mcp).

# Checking the controls

mutamad-verify checks every control on the running site.

```bash
ddev mutamad-verify
```

Without DDEV:

```bash
MUTAMAD_URL=https://www.example.gov.sa bash .ddev/commands/web/mutamad-verify
```

<figure><img src="https://171036656-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FQSekKpxOCXC1q6G2NRy9%2Fuploads%2Fgit-blob-aae8a94288ffa3c7c5a2f918b5bb660228ce3065%2Fverify-en.jpg?alt=media" alt="mutamad-verify on a running site, every check holding"><figcaption><p><code>mutamad-verify</code> on a running site.</p></figcaption></figure>

## What it does

It checks every setting a Mutamad control rests on, on the running site, and exits with an error if any has drifted. It reads **behaviour**, not only settings: the cookie a real login receives, the headers a real response carries, whether a private file can be downloaded anonymously. A setting can be present and overridden, which is exactly how a control fails silently.

It holds **342 checks** (1.0.0-alpha1), each tagged with what it proves:

| Tag                             | Checks   |
| ------------------------------- | -------- |
| NCA ECC-2:2024                  | 125      |
| NCA DCC-1:2022                  | 4        |
| DGA design system               | 104      |
| Base (the site template itself) | the rest |

## Sections

| Section                      | Examples of what is checked                                                                                                                                              |
| ---------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| Settings                     | Private files outside the web root, session cookie lifetime, `update.php` closed, PHP version                                                                            |
| Site template                | Front page resolves, 403 and 404 pages, recipes recorded with their versions                                                                                             |
| Cryptography and MFA         | MFA on and required for every staff role; the key present, 256 bits, outside the web root, actually encrypting and decrypting; nobody but the administrator manages keys |
| Security: accounts and login | Password policies, lockout, idle logout, role delegation                                                                                                                 |
| Editor                       | Rich editor filtering, Full HTML for the administrator only, external links                                                                                              |
| Forms                        | Contact form, anti-automation on every webform, submission log                                                                                                           |
| Media                        | Media permissions, standalone media URLs off                                                                                                                             |
| Administration               | Update tools for the emergency administrator only, account protection, developer pages                                                                                   |
| Languages and translation    | Both languages with prefixes, configuration language lock, untranslated-page redirect                                                                                    |
| AI                           | No job role holds Canvas AI or AI Figma; no other provider; suggestions never save (when applied)                                                                        |
| Logging and cron             | Syslog JSON, log size, every cron task has an active job                                                                                                                 |
| Workflow                     | States and transitions, no two transitions sharing a pair of states, rules in every language                                                                             |
| Content and content types    | Workflow on each type, sitemap, list pages, address patterns                                                                                                             |
| Privacy                      | Klaro configuration, privacy link, managed services                                                                                                                      |
| Canvas and front end         | Approval rule, templates, patterns, the Digital Stamp                                                                                                                    |
| SEO and search               | Sitemap, redirects permission, Arabic normalisation                                                                                                                      |
| Security: the site           | CSP, HSTS, framing, referrer, permissions policy                                                                                                                         |
| Over HTTP                    | Real responses, anonymous and logged in: headers, cookies, private file downloads                                                                                        |
| Log                          | No dropped permissions in the log                                                                                                                                        |

## When to run it

* After installation (`install-mutamad` runs it for you)
* After every update and every deployment
* After changing any setting a control rests on
* In CI, on every change: the Mutamad CI installs a fresh site in Arabic and in English and runs it

## Results

* `✓` — the control holds
* `✗` — it does not; the line shows what was expected and what was found
* `-` — skipped, with the reason (for example, a feature that is not applied)

A failing check means the site is not in the state the control needs. Fix the cause; do not change the check.
