Skip to content

web/elements: compile ak-mdx API content as CommonMark (cherry-pick #24524 to version-2026.5) - #27121

Merged
GirlBossRush merged 2 commits into
version-2026.5from
cherry-pick/24524-to-version-2026.5
Oct 22, 2026
Merged

GirlBossRush merged 2 commits into
version-2026.5from
cherry-pick/24524-to-version-2026.5

Conversation

@authentik-cherry-pick

@authentik-cherry-pick authentik-cherry-pick Bot commented Oct 22, 2026 •

Copy link
Copy Markdown
Contributor

Cherry-pick of #24524 to version-2026.5 branch.

Original PR: #24524
Original Author: @kah-ja
Cherry-picked commit: aeb0989

Details

This PR also carries the fix from #24524's original commit, which could not land on main because #21949 removed ak-mdx.tsx there.

kah-ja and others added 2 commits October 22, 2026 22:02
`<ak-mdx>` renders two kinds of source: documentation that is authored
in-tree and bundled with the web interface (`url`), and content that
comes back from the API (`content`) - user and group notes, and
blueprint descriptions.

Both were compiled as MDX. MDX evaluates expressions (`{...}`) and ESM
imports/exports of a source when the compiled module runs, so API
content was evaluated as code. The DOMPurify pass in front of the
compiler works at the HTML level and does not see either construct.

Compile `content` as CommonMark instead, so no part of it is evaluated,
and keep MDX for the bundled documentation. Reported privately as
GHSA-5vfm-49hj-h95w.
…#24524)

Render <ak-mdx> with content that calls a probe from an expression and
from an ESM export, and assert the probe never runs, while Markdown
still renders.

Co-authored-by: Teffen Ellis <[email protected]>
@netlify

netlify Bot commented Oct 22, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for authentik-storybook ready!

Name Link
🔨 Latest commit 9224f8c
🔍 Latest deploy log https://app.netlify.com/projects/authentik-storybook/deploys/6ada7b195314df8e6c18cb65
😎 Deploy Preview https://deploy-preview-27121--authentik-storybook.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@netlify

netlify Bot commented Oct 22, 2026

Copy link
Copy Markdown

✅ Deploy Preview for authentik-docs ready!

Name Link
🔨 Latest commit 2a214d5
🔍 Latest deploy log https://app.netlify.com/projects/authentik-docs/deploys/6ada79a60099d25e2d4d2cde
😎 Deploy Preview https://deploy-preview-27121--authentik-docs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@netlify

netlify Bot commented Oct 22, 2026

Copy link
Copy Markdown

✅ Deploy Preview for authentik-integrations ready!

Name Link
🔨 Latest commit 2a214d5
🔍 Latest deploy log https://app.netlify.com/projects/authentik-integrations/deploys/6ada79a62125b9c8ebe7ab75
😎 Deploy Preview https://deploy-preview-27121--authentik-integrations.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@GirlBossRush
GirlBossRush force-pushed the cherry-pick/24524-to-version-2026.5 branch from 2a214d5 to 9224f8c Compare October 22, 2026 21:07
@GirlBossRush GirlBossRush changed the title web/elements: test that ak-mdx does not evaluate API-supplied content (cherry-pick #24524 to version-2026.5) web/elements: compile ak-mdx API content as CommonMark (cherry-pick #24524 to version-2026.5) Oct 22, 2026
@codecov

codecov Bot commented Oct 22, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 93.59%. Comparing base (252d32f) to head (9224f8c).
⚠️ Report is 1 commits behind head on version-2026.5.
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@                Coverage Diff                 @@
##           version-2026.5   #27121      +/-   ##
==================================================
+ Coverage           93.41%   93.59%   +0.18%     
==================================================
  Files                1056     1056              
  Lines               63071    63071              
  Branches              400      400              
==================================================
+ Hits                58920    59034     +114     
+ Misses               4151     4037     -114     
Flag Coverage Δ
conformance 35.13% <ø> (+<0.01%) ⬆️
e2e 40.25% <ø> (+1.64%) ⬆️
integration 31.68% <ø> (+<0.01%) ⬆️
rust 0.00% <ø> (ø)
unit 92.68% <ø> (+<0.01%) ⬆️
unit-migrate 92.71% <ø> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

@GirlBossRush
GirlBossRush enabled auto-merge (squash) October 22, 2026 21:18
@GirlBossRush
GirlBossRush merged commit c64183c into version-2026.5 Oct 22, 2026
104 checks passed
@GirlBossRush
GirlBossRush deleted the cherry-pick/24524-to-version-2026.5 branch October 22, 2026 21:32
@github-actions

Copy link
Copy Markdown
Contributor

authentik PR Installation instructions

Instructions for docker-compose

Add the following block to your .env file:

AUTHENTIK_IMAGE=ghcr.io/goauthentik/dev-server
AUTHENTIK_TAG=gh-9224f8ce87ffc4a9ec65921cd01627c9b80112d6
AUTHENTIK_OUTPOSTS__CONTAINER_IMAGE_BASE=ghcr.io/goauthentik/dev-%(type)s:gh-%(build_hash)s

Afterwards, run the upgrade commands from the latest release notes.

Instructions for Kubernetes

Add the following block to your values.yml file:

authentik:
    outposts:
        container_image_base: ghcr.io/goauthentik/dev-%(type)s:gh-%(build_hash)s
global:
    image:
        repository: ghcr.io/goauthentik/dev-server
        tag: gh-9224f8ce87ffc4a9ec65921cd01627c9b80112d6

Afterwards, run the upgrade commands from the latest release notes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants