Repository navigation
Description
In #253 and #256 we stopped trusting the emSign certificate authorities after a security incident at another company. Many security bugs repeat from project to project, so the advisories other frameworks have published can show where Citry might have the same bug before someone reports it.
docs/design/security-hardening.md plans a project-wide security audit that has not started yet. This issue adds one input to that audit: a list of real past advisories, each checked against Citry.
What to review
Past CVEs and GitHub security advisories from projects that solve the same problems as Citry:
- Python templates and components: Django templates, Jinja2 (including its sandbox), django-components (Citry continues its component work).
- Python expression sandboxes, which do the same job as Citry's
safe_eval: RestrictedPython, simpleeval, asteval. - Vue and its ecosystem: Vue core,
@vue/server-renderer, vue-i18n, Nuxt. - Other JavaScript frameworks with server rendering or server actions: React and Next.js (Server Components and server actions), SvelteKit.
- Server-driven UI, closest to Citry Events: Phoenix LiveView, Laravel Livewire, Hotwire/Turbo, htmx.
- Python frontend frameworks: Reflex, NiceGUI, Streamlit, Gradio, ReactPy, FastHTML, django-unicorn, Tetra.
- Pyodide, which runs the docs playground.
To keep this bounded:
- look at advisories from the last 5 years;
- take at most about 10 per project, picked to cover different kinds of bug;
- stop at about 80 advisories in total, or after about 2 working days.
Then report what was covered and what was left. You can skip an advisory whose cause cannot apply to Citry, such as a bug in a feature Citry lacks. Record each skip and the reason.
What to record for each advisory
- what went wrong, in one or two sentences, with a link to the advisory;
- which Citry part does the same job. Examples:
- template escaping in the Rust compiler,
safe_eval, and Vue server rendering; - Events requests, file uploads, CSRF, and CSP nonces;
- JSON sent to the browser, and
Secretvalues kept on the server; - i18n messages and
html_transform; - asset, preview, and file routes, and caches;
- the Django, Flask, FastAPI, ASGI, and WSGI integrations;
- the language server and editor extensions, the playground, and release tooling;
- template escaping in the Rust compiler,
- whether Citry is not affected (and what prevents it), affected, or unknown;
- for "not affected", the test that proves it, or a note that the test is still missing.
Deliverables
- A new file,
docs/design/security_advisory_review.md, holding the table of reviewed advisories. Group them under the workstream names in section 3 ofsecurity-hardening.md(contextual output encoding, template and expression sandbox, HTTP and Events, and so on), and link the file from that doc's section 1. - A regression test for each "not affected" bug class that has none yet, so a later change cannot bring the bug back. Where a test is large, a follow-up issue for it is enough.
- One public issue per gap that is safe to discuss, such as a missing size limit.
Anything that may be exploitable in a released Citry version stays out of the public table, this issue, and public PRs. That includes an "unknown" that might turn out exploitable. Report it through private vulnerability reporting, as SECURITY.md describes, and keep only a neutral placeholder row in the table.
Done when
- each project above has its advisories classified, up to the limits, or a recorded reason for skipping it;
- every row is marked not affected, affected, or unknown, and each "affected" or "unknown" row has a follow-up (a public issue or a private advisory);
- each "not affected" bug class has a regression test or a follow-up issue for one.
🤖 Generated with Claude Code
Activity
JuroOravec commentedon Oct 25, 2026
A review of published advisories in comparable projects (Vue and Nuxt server rendering, Jinja2 and MarkupSafe, Django templates, django-components, htmx, Alpine.js, and the Svelte, React and Angular template layers) was mapped to Citry's code, bug class by bug class. Classes checked by reading the code and found clear:
OriginorSec-Fetch-Site, and Django's CSRF middleware also applies there.structuredClone.tr()accepts only plain value types and escapes them.citry.Secretrefuses both.A few areas need hands-on testing rather than code reading, and are being followed up. The missing request-size limits are tracked publicly in #404.