Skip to main content

Security

How we secure this site

Last updated

Draft — pending legal review

This document is a good-faith baseline prepared by the team that built this website. It has not been reviewed by legal counsel, and it is not legal advice. Both the legal wording and the statements it makes about how this site works need MassBalance to confirm them before launch.

The strongest thing that can be said about this website’s security is how little it does. It has no accounts, no database and no third-party code. What follows describes the rest, and how to tell us if we have got something wrong.

What this page covers

This page describes massbalance.ca, the public marketing website. The MassBalance platform at app.massbalance.ca is a separate system with its own controls; pilot customers receive that description under their agreement.

Every page is prerendered

The site is a statically prerendered Next.js application. Each page is built to HTML ahead of time and served as a file. Nothing is templated per visitor, and no visitor-supplied text is ever composed into the markup of a page — which removes the ground that cross-site scripting normally stands on.

Two things run on a server rather than being served as a finished file: the endpoint behind the contact form, described below, and the image optimiser that resizes the site’s own images on request. The one place visitor text returns to a page is the contact form repopulating itself after a rejected submission, so a correction does not cost you what you already typed. That text comes back as data and is placed only into a form field’s value, which the framework escapes; it is never composed into markup.

No accounts, no database

There is nothing to log into on this website and no user records behind it. No database, no session store, no shopping cart, no cookie. Nobody has an account here, so there are no visitor passwords to be stolen.

The site does hold one secret: the credential it uses to hand a contact-form message to the mail provider. It is a dedicated, send-only, revocable token — it can post a message and do nothing else, and it can be rotated without touching anything a visitor sees.

What happens to a form submission

A submission is validated on the server against a strict schema and then handed to our email provider for delivery to a MassBalance inbox. It is not written to a database, not queued on disk, and not copied anywhere else. What we do with the message afterwards is described in the Privacy Policy.

Two cheap filters run in front of it: a hidden field that only an automated form-filler would complete, and a rate limit of five submissions per ten minutes, keyed on a one-way hash of the sender’s IP address held in memory for about ten minutes and discarded thereafter. Neither is written to disk, attached to your message, or shared.

That in-process rate limit is a courtesy filter, not the real control — it lives in the memory of whichever server instance answered, so it slows a flood rather than stopping one. The durable limit is a rate-based rule at the network edge, in front of the application.

The form can only post to this origin. That is enforced by the browser through the policy’s form-action directive, not merely intended.

Encryption in transit

Every request is served over HTTPS with TLS. The site sends a Strict-Transport-Security header with a two-year max-age, covering subdomains and marked for preload, so a browser that has seen this site once refuses to talk to it over plain HTTP afterwards — and the preload list extends that to browsers that have never visited.

Content-Security-Policy

Every response carries a Content-Security-Policy that defaults to this origin. Scripts, styles, fonts, images and network connections may come only from massbalance.ca — no other host is reachable from a page on this site. Framing is refused outright, plugin content is blocked, and the base URI is pinned so an injected tag cannot quietly repoint every relative link on the page. The policy deliberately does not carry upgrade-insecure-requests: the site loads nothing from another origin, so there is no insecure subresource for it to rewrite, and the Strict-Transport-Security header above is what actually forces HTTPS.

Two allowances are worth stating plainly rather than hiding. Inline scripts are permitted, because the framework’s hydration payload is inline and the alternative — a per-request nonce — would force every page out of static prerendering. Inline style attributes are permitted for the handful of values the page computes as it renders; inline style elements are not, so an injected block of CSS is refused. Images may also load from data: URLs and fonts from data: URLs; those are inline bytes carried by the page itself, not a request to somebody else’s server. What makes these safe is that nothing a visitor sends is ever composed into the markup of a page.

Other response headers

Every response also carries:

  • X-Content-Type-Options: nosniff — the declared content type must be honoured.
  • X-Frame-Options: DENY — a companion to the framing rule above for older browsers.
  • Referrer-Policy: strict-origin-when-cross-origin — outbound links leak the origin, never the path.
  • Permissions-Policy — camera, microphone, geolocation, Topics and interest cohorts are all switched off.
  • X-DNS-Prefetch-Control: on — the browser may resolve DNS for a link before it is clicked. With no third-party origin anywhere in the page, there is nobody for that to disclose anything to.

Cross-Origin-Opener-Policy and Cross-Origin-Resource-Policy are both set to same-origin, so a page on another site can neither share a browsing context with this one nor read its responses. The framework’s X-Powered-By header is switched off.

No third-party code

The site loads no analytics, no tag manager, no advertising pixel, no A/B testing tool, no chat widget, no social embed and no library from a public CDN. Typefaces are self-hosted and served from this origin. There is no third party inside the page, so there is no third party to be compromised on our behalf.

Dependencies and the build

Every dependency is pinned to an exact version — no ranges — and the lockfile is committed and installed frozen, so a build today resolves to exactly the tree a build resolved to last month. Upgrades are deliberate and reviewed. The build fails on a type error rather than shipping around it.

Hosting and deployment

The site is hosted on Amazon Web Services and deployed from source control, from a reviewed commit on the default branch. Nobody uploads files to production by hand.

Reporting a vulnerability

If you think you have found a security problem in massbalance.ca, please tell us at hello@massbalance.ca. Include enough detail to reproduce it — an address, a request, a screenshot.

We will acknowledge your report within five business days and tell you what we intend to do about it. We will not pursue legal action against anyone who reports a genuine issue in good faith, gives us a reasonable chance to fix it before going public, and does not access, alter or destroy anyone else’s data while investigating.

Please do not run automated scanners or load tests against the site, and please do not test app.massbalance.ca — that is a separate system with real customer data in it.

We do not run a paid bug-bounty programme. We are glad to credit you here if you would like us to.

Contact

MassBalance Ltd., Alberta, Canada.

Security reports and questions: hello@massbalance.ca.