Skip to content

Audit: SRI, Open Graph extras, structured data, 404 page - #9

Merged
romanzdk merged 1 commit into
mainfrom
audit/2026-11
Nov 27, 2026
Merged

romanzdk merged 1 commit into
mainfrom
audit/2026-11

Conversation

@romanzdk

Copy link
Copy Markdown
Owner

Security and SEO fixes from the site audit, ahead of the Reddit posts.

  • SRI: the 4 cdnjs scripts and the CodeMirror stylesheet now have integrity + crossorigin, so a changed CDN file is refused instead of run.
  • Open Graph: added og:site_name, og:locale, og:image:alt.
  • Structured data: home page gets a Course JSON-LD with all lessons as hasPart.
  • 404 page: 404.html (noindex, absolute <base>) shows the course start instead of the GitHub 404.

Before: <script src="https://cdnjs.cloudflare.com/.../codemirror.min.js"></script>
After: <script src="https://cdnjs.cloudflare.com/.../codemirror.min.js" integrity="sha384-ZYmw…" crossorigin="anonymous" referrerpolicy="no-referrer"></script>

Check Result
gitleaks + trufflehog, full git history no leaks
GitHub Actions permissions contents: read at top, pages/id-token only in deploy job, no pull_request_target
Lighthouse (mobile, live site before change) A11y 100, Best practices 96 (only adblocker blocking GoatCounter), SEO 100
node scripts/build-pages.mjs 31 pages built; JSON-LD parses, 28 lessons in hasPart; 404.html has noindex, no canonical
Local browser test of /ownership/ with SRI hljs, CodeMirror and Rust mode load, 2 editors render, no console errors besides blocked GoatCounter
CI check job see checks below

@romanzdk
romanzdk merged commit 444275e into main Nov 27, 2026
4 checks passed
@romanzdk
romanzdk deleted the audit/2026-11 branch November 27, 2026 13:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant