Back to the home page

Security in maskera

Security here covers both what must never leave your environment and the boundaries around masking and restoration. This page collects the operational security model for the npm packages and the open browser demo.

Data flow and network

The text and the key containing the original data are not sent to Maskera for masking. The rule layer has no network dependencies. The model variant runs inference locally in the browser or in your own Node process.

The npm package's default configuration downloads the model and runtime on first use and caches them. These are static software and model artefacts, never the text being masked. Environments that prohibit external downloads can serve all model files themselves.

Pinned artefacts

The published npm version points to an immutable revision of the model on Hugging Face. The same package version therefore runs the same weights measured by the benchmark; new weights reach users through a new npm version.

The demo verifies model files with file-specific SHA-256 values during the build. An unexpected or incomplete model package should therefore stop the build rather than silently being used.

Restoration is a security boundary

The key contains the original values and must be treated as personal data. Do not log it or store it beside the masked text.

restore() inserts real values wherever placeholder tokens occur. Do not restore untrusted output that will then be fetched as a URL, rendered as HTML or written to logs. Masking protects what is sent; restoration does not sanitise what comes back.

A placeholder already present in the input is never allocated again. Planting [PERSONNUMMER_1] in the source text therefore cannot capture a real value.

What counts as a vulnerability?

Report privately if you find, for example:

  • original values or the restoration key leaking to the network, storage or logs contrary to the documented local processing
  • unexpected network requests beyond the documented one-time downloads of the model and runtime
  • XSS or injection in the demo at maskera.dev
  • an exploitable supply-chain risk in the npm packages or model artefacts
  • an intentional construction that hides personal data from the detectors while a person or language model can still read it

A model missing an unusual name or a rule lacking an edge case is normally a quality issue, not a vulnerability. Report such examples publicly so they can become regression cases. A reproducible intentional bypass, however, belongs in a private security report.

Report a vulnerability privately

Do not open a public issue for a possible security flaw. Use GitHub's private vulnerability reporting. Only the latest published versions of maskera and @maskera/core receive security fixes, so update before reporting.

Production operation

The production guide covers secure integration, fallback to rules, logging, self-hosting, domain-specific test corpora and the production checklist. Maskera is a data-minimisation layer, not a guarantee of compliance or complete detection.

Read the production guide

This page covers the npm packages and open demo. Gateway also has its own authentication, delivery and operating model, documented in the customer portal. Learn about Maskera Gateway