Security overview Draft
DRAFT, needs review — prepared by an AI agent on 2026-09-25; not legal advice; not approved.
How Halpwords protects the data it holds. Written for schools, parents and anyone reviewing us; it is also Annex 2 (technical and organisational measures) of the school DPA.
This describes the design in PLAN.md. [DECIDE: before publishing, each point must be checked against the running service; anything not yet built is marked planned.]
The short version
- The game works without us, so we only hold what a family or school chose to sync.
- We hold very little about children: no email, phone, photo, birth date, address or location.
- Each school's and family's data is kept apart, and tests check it.
- Data is encrypted in transit, sensitive fields are encrypted at rest, and backups are encrypted.
- Staff access is logged, with a reason, and you can see the log.
Hosting
- One server at Hetzner Cloud in the EU (Germany or Finland), behind Hetzner's Cloud Firewall, which allows only web traffic (80, 443) and SSH from our addresses with keys only.
- Ubuntu LTS with unattended security updates.
- Caddy terminates TLS with automatic certificates. DNSSEC is on, and CAA records allow only our certificate authorities.
- A staging server holds fake data only.
Encryption
- In transit: TLS 1.2 or newer everywhere, with HSTS.
- At rest: Hetzner doesn't encrypt cloud disks, so the app encrypts learner names and free text (report bodies, notes) with AES-256-GCM, using versioned keys held outside the database and outside the code repository, and rotatable. [DECIDE: whether to add full-disk encryption, decided in W0.10.]
- Backups: encrypted before they leave the server.
Keeping organisations apart
- Every table holding an organisation's data carries its organisation ID, and every query filters on it.
- Permission checks live in the domain code, not only in the web pages, and deny by default. Every web address has an access rule; a test fails if one is missing.
- An automated test builds two of everything (families, schools, classes, learners) and checks that nothing leaks between them.
- A teacher sees a pupil only while the pupil is in one of their classes.
Accounts and sign-in
- Passwords hashed with Argon2id, at least 10 characters, checked against a local list of common and breached passwords (never sent anywhere).
- Passkeys and two-step sign-in (TOTP) for everyone; required for school admins, group admins, publishers and our staff.
- Single sign-on for schools with Google, Microsoft or Clever (planned, W5).
- Sessions: secure, HttpOnly cookies, random 256-bit tokens stored only as hashes. 12 hours for school staff (the school can change this). A list of active sessions with sign out everywhere. An email on sign-in from a new browser, recognised by a random ID in a first-party cookie kept 90 days after the last sign-in from it (stored only as a hash); the same cookie gives a browser that has signed in before its own allowance of sign-in tries.
- Pupils never have passwords or emails. They sign in with codes, printed cards or picture passwords made by their teacher; too many wrong tries lock the code and tell the teacher. A linked game gets a device token for one pupil only, for the game API only, rotated on use and revocable.
- Rate limits on sign-in, codes, the API and reports.
The website
- A strict Content Security Policy: no inline scripts, no third-party anything.
- No third-party scripts, fonts, analytics, pixels or ads on any page, so no other company sees your pupils' visits.
- CSRF tokens on every form;
X-Frame-Options: DENY;Referrer-Policy: same-origin. - Pupils can't upload pictures; adult uploads are re-encoded, which strips hidden location data.
- Pupils can't send free text to other pupils; there is no chat.
Staff access
- Staff see personal data only in the staff console, with MFA, and must type a reason each time. Every look is written to the audit log.
- Schools and families can see the audit log of access to their own data.
- The most sensitive actions (deleting an organisation, exporting data for a third party) need a second staff member. While there is only one, they wait 24 hours and a named trusted contact is emailed and can stop them.
- Least privilege: staff roles (support, moderator, finance, admin) see only what their role needs.
Audit log
Sign-ins, role changes, exports, deletions, consent changes, staff data views, year rollover and settings changes. Append-only; kept 2 years.
Logs and monitoring
- Server logs contain IDs only: never names, emails, codes, tokens or word list contents. A test fails if one appears. Logs are kept 14 days.
- Alerts (to phone and email) for the site being down, errors, stuck jobs, late backups and full disks. A public status page.
Backups and recovery
- Continuous backup (Litestream) to Hetzner Object Storage in a different location from the server, with 35 days of point-in-time history.
- A nightly encrypted snapshot, kept 35 days.
- A weekly encrypted copy with Backblaze B2 in its EU region, so a problem with one provider can't lose everything.
- A restore drill every month. Target: lose at most a few seconds of data, back within 1 hour.
- Deleted data is gone from backups within 35 days.
Software supply chain
- Written in Go with very few dependencies, each approved.
- Every change runs vetting, static analysis (
staticcheck), the Go vulnerability checker (govulncheck) and the tests before it can merge. - Pinned versions; each release has checksums and a software bill of materials (SBOM).
- [DECIDE: link the GitHub settings in
docs/runbooks/github-settings.mdonce branch protection is enforced.]
AI
- AI features are off for schools unless the school turns them on.
- Prompts never contain names, emails, schools or anything a pupil typed; pupils appear as "Student A". Word lists and numbers only.
- Only AI providers whose terms exclude training on our data, and for pupil data only those with a GDPR processing agreement. Schools can require an EU-hosted model.
- AI never grades; a teacher reviews what it writes.
Testing and disclosure
- An outside penetration test before the school launch, then yearly (planned, C3). [DECIDE: tester, date.]
- An automated web security scan (OWASP ZAP baseline) against staging in CI (planned, W1.15).
security.txtand a disclosure policy; report issues to security@halpwords.com.
Incidents
A written breach runbook: contain, assess, notify the Data Protection Commission within 72 hours where GDPR requires it, notify schools without undue delay (they are the controllers of their data), and families where required.
People and policies
- A named privacy lead or DPO: [DECIDE].
- A security contact: security@halpwords.com, [DECIDE: named person].
- Security practice follows ISO 27001 style; certification is later.