> 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/concepts/security-baseline.md). Agents can also search and read this documentation through its [MCP server](https://ispectra.gitbook.io/mutamad/~gitbook/mcp).

# Security baseline

The security controls every Mutamad site gets at installation.

Every control below is applied at installation and checked by [`mutamad-verify`](https://ispectra.gitbook.io/mutamad/getting-started/verify.md) on the running site.

## Accounts and sign-in

| Control                           | Setting                                                                                                            | NCA ECC |
| --------------------------------- | ------------------------------------------------------------------------------------------------------------------ | ------- |
| Password policy, staff            | 12+ characters, changed yearly                                                                                     | 2-2-3   |
| Password policy, privileged roles | 14+ characters, changed every 90 days                                                                              | 2-2-3   |
| Multi-factor authentication       | Authenticator app and recovery codes; required for every staff role, after 3 grace logins                          | 2-2-3-2 |
| MFA secrets                       | Encrypted with AES-256 (Real AES), the key outside the database and the web root                                   | 2-8-3-2 |
| Account lockout                   | Flood control and Login Security                                                                                   | 2-2-3   |
| Idle logout                       | 15 minutes                                                                                                         | 2-2-3   |
| Session                           | Cookie ends when the browser closes; discarded after 12 hours unused; strict session IDs                           | 2-2-3   |
| Username enumeration              | Prevented on login and password reset                                                                              | 2-15    |
| Registration                      | Administrators only                                                                                                | 2-2-3   |
| Anti-automation                   | ALTCHA (runs in the browser, no outside service) on login and password reset; Honeypot and Antibot on public forms | 2-15    |
| Role delegation                   | The App Admin assigns job roles, never administrator                                                               | 2-2-3-3 |

## The site

| Control                  | Setting                                                                                        | NCA ECC  |
| ------------------------ | ---------------------------------------------------------------------------------------------- | -------- |
| Content Security Policy  | Scripts and styles from the site only; no public CDN; documented exceptions only               | 2-15     |
| HSTS                     | On                                                                                             | 2-15-3-3 |
| Framing                  | `X-Frame-Options`, `frame-ancestors`                                                           | 2-15     |
| Referrer and permissions | `Referrer-Policy`, `Permissions-Policy`                                                        | 2-15     |
| Origin check             | On form submissions                                                                            | 2-15     |
| Errors                   | Never shown to visitors                                                                        | 2-15     |
| `X-Powered-By`           | Removed                                                                                        | 2-15     |
| `update.php`             | Cannot run anonymously                                                                         | 2-15     |
| Private files            | Default scheme; stored outside the web root, so no web-server rule is needed                   | 2-7-2    |
| Cheap 404s               | Fast 404 for static files                                                                      | 2-15     |
| Outbound calls           | Drupal news feeds removed; nothing calls drupal.org from the site but updates and translations | 2-5-3-3  |
| Update tools             | Emergency administrator only; unattended updates off                                           | 2-10-3   |
| PHP version              | The site refuses to run on PHP older than 8.3                                                  | 2-10-3   |
| security.txt             | RFC 9116, with the entity's contact                                                            | 2-15     |

## The Content Security Policy, and its exceptions

Mutamad's policy loads scripts and styles from the site itself. Allowing a public CDN would let anything hosted there run on the site. A library a module would take from a CDN is served from `/libraries` instead.

The exceptions are few, each documented in `mutamad_security` and checked:

| Exception                                                           | Why                                                                                                      |
| ------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- |
| Navigation's inline script, by hash                                 | Core's admin navigation needs it                                                                         |
| `blob:` workers                                                     | ALTCHA's proof-of-work                                                                                   |
| Frames from the site, `youtube-nocookie.com` and `player.vimeo.com` | The Remote video media type                                                                              |
| The Canvas editor's import map, by hash                             | The page builder                                                                                         |
| `unsafe-eval` on the **Canvas editor pages only**                   | Canvas needs it to save a change (reported upstream). Every page a visitor sees keeps the strict policy. |

Anything else — maps, analytics, chat — is widened per site by that site's own decision.

## Logging and evidence

| Control           | Setting                                                                      | NCA ECC  |
| ----------------- | ---------------------------------------------------------------------------- | -------- |
| Logs to the SIEM  | Every entry to syslog as one JSON object, facility `LOCAL0`, ident `mutamad` | 2-12-3-3 |
| Database log      | 100,000 entries; read and cleared by the App Admin only                      | 2-12     |
| Admin audit trail | Changes to users, roles, permissions, menus, taxonomy and workflow           | 2-12     |
| Revisions         | Every version kept, with who wrote and who published it                      | 2-12     |
| Scheduled tasks   | Each a job with 30 days of history; a warning after an hour without cron     | 2-12     |

## Cryptography

* No key, salt or credential is shipped: each site generates its own.
* The MFA key is 32 random bytes, generated by the installer into `private-files/mutamad-keys/`, readable by the web server and its group only.
* Only the administrator manages keys and encryption profiles: whoever can change a key can make everything it protects unreadable.

## What the baseline does not cover

* The server: operating-system hardening, the WAF, network segmentation and TLS are the hosting entity's.
* Backups and restore drills: the hosting entity's.
* Field encryption of classified content: after classification, beyond version 1.0.

See [What Mutamad claims](https://ispectra.gitbook.io/mutamad/compliance/overview.md).
