With a CMS, an edit mode on every page and a Claude translation step in the build pipeline, scher.nl is no longer a simple static site. So the whole chain was put to the test: the code, the settings, the live site and the integrations with GitHub and the Claude API. What was weak has been improved, and a set of checks has kept an eye on it automatically ever since.
A text change travels from the editor via GitHub and a GitHub Action to Cloudflare and the visitor. Every link in that chain now has a lock, and three kinds of checks keep watch.
At first scher.nl was a collection of HTML files: little to attack. Then three things were added that made the site more convenient, but also opened new doors.
Anyone who changes a text in the CMS or with ?bewerk writes straight to the repository. The browser keeps a GitHub key for that. The less that key can do, the smaller the damage if it ever leaks.
Claude translates every Dutch text into English, and that translation ends up on the site as HTML. A text with hidden instructions (prompt injection) must never be able to turn that into a script.
A push to main is on scher.nl within a minute. Mistakes and vulnerabilities therefore have to be caught before that push, not after.
The scan ran in four layers, from the inside out: first the code and the build pipeline, then the settings of GitHub, Cloudflare, the domain and the Claude API, then the live site from the outside, and finally targeted attacks on the site's own integrations. Anything that could disrupt the live site was only run against a preview version.
The CMS used to sign in through a general GitHub connection whose key could reach every repository on the account, including the private ones. Sign-in now goes through a dedicated GitHub App that is installed only on the scher.nl repository, with reading and writing files as its only permission. The key expires after eight hours. The old connection has been revoked.
The build puts a policy in every page that tells the browser which scripts may run: only those from scher.nl itself and the inline scripts the build has fingerprinted (hashed). A script that gets in any other way is not executed by the browser. That makes the policy the second line of defence behind the text filter.
Two parts loaded code from a public CDN without any check. One library is now hosted on scher.nl itself; for the CMS the browser verifies a fixed fingerprint (Subresource Integrity), so a modified file on the CDN is rejected. New project pages no longer load scripts from a CDN.
Texts may contain a little formatting, such as bold, code or a link. The build and the translation Action now work from a fixed list of allowed tags and attributes and reject everything else. That also applies to what Claude returns as a translation. A text with a script, an embedded page or a suspicious link never even makes it into the build.
Every response from scher.nl carries headers that make the browser stricter: always https (HSTS), not shown inside a frame on another site, no guessed file types and a sparing Referrer and Permissions Policy. A visit over http is redirected to https.
The GitHub Actions now use external components at a fixed version (commit hash) instead of a movable label, get only the permissions they need and keep no credentials after checkout. The API key for Claude is only available in the step that translates. Dependabot keeps npm packages and Actions up to date.
scher.nl sends no e-mail. Two DNS records (SPF and DMARC with reject) tell mail servers that any mail claiming to come from @scher.nl is fake. DNSSEC has been requested at the registrar, so DNS answers cannot be forged. In addition, two-factor sign-in is on for GitHub and Cloudflare, there is a spending limit on the Claude API, and a security.txt gives an address for reporting vulnerabilities.
Every push and every pull request starts the Beveiliging (security) workflow on GitHub. It does not touch the live site. If a check finds something, it fails and shows red on the pull request, before anything goes live.
| Check | What it finds |
|---|---|
| zizmor | Unsafe settings in the GitHub Actions, such as overly broad permissions, versions that are not pinned or input that ends up unfiltered in a command. |
| Semgrep | Known unsafe patterns in the code: openings for cross-site scripting, keys in the source code and risky workflow constructs. |
| gitleaks | Leaked keys and passwords, not just in the new commit but across the entire history of the repository. |
| npm audit | npm packages with a known vulnerability rated high or critical. The very first run found nine, pulled in by a tool; they have been updated. |
npm run check | Rebuilds the whole site and checks that every text passes the HTML filter and that every page has a correct Content Security Policy. |
npm test | Fixed attack tests: 45 known tricks for sneaking a script past a filter, and tests that try to fool the CMS sign-in. Every trick must be rejected. |
Some things change without any change to the code: a certificate, a DNS record, a setting at Cloudflare or a new vulnerability in a package. That is what these checks are for.
| When | What |
|---|---|
| Every Monday | Live check of scher.nl, from the outside like a visitor: the security headers and Content Security Policy of a set of pages, the redirect to https and the TLS version, whether the CMS sign-in only accepts known addresses, that files which should not be public are indeed unreachable, and the DNS records for e-mail and DNSSEC. The result appears as a table in the run summary. |
| Every week | Dependabot looks for new versions of npm packages and GitHub Actions and prepares an update as a pull request. That then goes through the same checks as any other change. |
| By hand, on a preview | Active scan with OWASP ZAP: an attack scanner that crawls and probes the site the way an attacker would. It only runs against a preview version, never against scher.nl itself, for example after a major change. |
| By hand, live | The same live check can also be started at any time, including against a preview address. |
After the changes everything was tested again. The active tests found no high risk at all. The one gap they did find, in the text filter, was already blocked in the browser by the Content Security Policy; it is now closed in the build too and is part of npm test as a permanent test.
| Component | Result | Notes |
|---|---|---|
| Live check scher.nl | 47 of 49 | The two open items are DNSSEC, which is waiting on the registrar. |
| Active scan (ZAP) on preview | 0 failures | 137 rules passed, a few low-risk warnings, consciously weighed. |
| HTML filter | 1 gap, closed | Was already blocked by the CSP; now the build rejects it too. |
| CMS sign-in | No leak | Unknown addresses and forged callbacks get no key. |
| Prompt injection via translation | No effect | Hidden instructions in a Dutch text; Claude simply translated and ignored them. |
| Project apps | No leak | The apps put text into the page safely, without raw HTML. |
| Leaked keys | None | Searched across the entire git history. |
main are done by the owner.