Skip to content

Disable goldmark unsafe HTML renderer#6

Closed
HeyItsGilbert wants to merge 1 commit into
mainfrom
security/disable-unsafe-renderer
Closed

Disable goldmark unsafe HTML renderer#6
HeyItsGilbert wants to merge 1 commit into
mainfrom
security/disable-unsafe-renderer

Conversation

@HeyItsGilbert
Copy link
Copy Markdown
Member

Summary

  • Sets markup.goldmark.renderer.unsafe: false in hugo.yaml
  • Converts the one content file that used raw HTML (content/podcast/2008-03-16-one-liner-countdown-timer-in-powershell.md) to plain markdown — a <p> wrapper and four <br /> line breaks, replaced with normal paragraph text

Why

With unsafe: true, raw <script>, <iframe>, and other HTML tags in any .md file render verbatim in the browser. This amplifies the impact of any content injection vulnerability (e.g., the YAML frontmatter injection fixed in #5 — even after stripping HTML from the description field in the workflow, the setting remained a latent risk for any future external-input path that writes markdown).

A full audit of all content files found no legitimate use of raw HTML requiring this setting. The <> patterns in content are almost entirely Markdown autolinks (<https://...>) and plaintext angle brackets, which are unaffected by this change.

Test plan

  • Build the site locally and verify no content renders broken
  • Spot-check the 2008 podcast post renders correctly without <p>/<br />
  • Confirm syntax highlighting still works (unrelated to this setting)

🤖 Generated with Claude Code

No content files use raw HTML that requires the unsafe renderer —
the one exception (a 2008 podcast post with <p> and <br />) is
converted to plain markdown. Disabling unsafe prevents raw HTML/JS
in any markdown file from rendering, which limits the blast radius
of future content injection vulnerabilities.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@HeyItsGilbert
Copy link
Copy Markdown
Member Author

This was merged in a previous PR

@HeyItsGilbert HeyItsGilbert deleted the security/disable-unsafe-renderer branch May 26, 2026 14:44
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