Skip to content

docs(config): document image allow-list for llm output - #416

Open
KyryloKorotych wants to merge 1 commit into
codemie-ai:mainfrom
KyryloKorotych:docs/EPMCDME-12950-image-allow-list
Open

KyryloKorotych wants to merge 1 commit into
codemie-ai:mainfrom
KyryloKorotych:docs/EPMCDME-12950-image-allow-list

Conversation

@KyryloKorotych

@KyryloKorotych KyryloKorotych commented Sep 15, 2026

Copy link
Copy Markdown

Summary

Documents the image domain allow-list delivered in EPMCDME-12950 (codemie!3976, codemie-ui!1616) — the security control that gates every image rendered from LLM/assistant output against a per-deployment hostname list, closing a prompt-injection exfiltration channel.

Adds a full guide under Security & Compliance and documents the allowedImageDomains customer config item in the configuration reference.

Changes

  • Added docs/admin/security/llm-output-image-allow-list.md — threat model, scope of the gate, the 9-condition decision order, entry format, configuration, rollout and verification steps
  • Updated customer-feature-configuration.md — new CONTENT SECURITY group with the allowedImageDomains row in the component overview table, a dedicated section under Component Categories, and an entry in the full configuration example
  • Added two FAQ entries: why assistant images are not displayed (end user), and how to allow a specific domain (administrator)
  • Registered the new page in sidebars.ts and cross-linked it from the Security & Compliance index; freed sidebar_position: 3 by moving Network Policies to 4
  • Added exfiltration and srcset to the cspell dictionary

Testing

  • Tested locally with npm start
  • All pages render correctly
  • Images display properly — no images added; none referenced
  • Internal links work — verified by npm run build (zero broken links)
  • Sidebar navigation works — new entry resolves during build

Quality Checks

  • npm run check passes (typecheck + lint + commitlint)
  • No MDX compilation errors
  • No raw angle brackets (<text> must be `<text>`)
  • Sidebar references document IDs (not filenames)
  • Images stored locally next to content (not in static/img/) — not applicable, no images added
  • Commit messages follow Conventional Commits
  • No secrets or credentials in documentation — Gitleaks clean

Additional Notes

Verification performed: npm run check and npm run build both exit 0, with zero broken links reported. A visual pass with npm start was not run — the checkboxes above reflect only what was actually verified.

Source-of-truth discrepancy worth flagging to the reviewer: the description on codemie-ui!1616 documents configuration via the VITE_ALLOWED_IMAGE_DOMAINS frontend env var, but that approach is absent from the merged diff — there are no .env, config.js, or deploy-templates changes. The implementation reads appInfoStore.getAllowedImageDomains(), sourced from GET /v1/configallowedImageDomains, which matches codemie!3976. This documentation follows the code, not the !1616 description — that description should be updated so it no longer contradicts both.

Implementation details documented here that appear in neither MR description, taken from the diff:

  • The gate is a DOMPurify hook on a dedicated sanitizer instance, not a marked renderer override — so raw HTML in model output is gated identically to markdown image syntax
  • Four attributes are inspected: src, srcset, poster, background; srcset candidates are checked individually
  • A blocked <source> element is removed rather than badged, letting the <img> fallback apply; on other elements only the offending attribute is stripped
  • Customer config is fetched once per browser tab, so users must reload after the allow-list is changed — this is called out in the rollout steps

Add a Security & Compliance page covering the domain allow-list that gates
every image rendered from LLM/assistant output, and document the
allowedImageDomains customer config item.

Generated with AI

Co-Authored-By: codemie-ai <[email protected]>

This branch has not been deployed

No deployments
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