Security model
Typed, header-declared serialization
Every value is declared with an RDF type in the --- frontmatter and validated
- escaped when rendered. A value that does not satisfy its type throws instead of being emitted:
irirejects anything that is not a syntactically valid absolute IRI, so a value likehttp://x/> . } DROP GRAPH <gthrows instead of breaking out of<…>.stringand$"…"content escape\,", newlines, CR, tab.- Numeric/
bool/date types accept only matching host values and emit canonical forms;"10"is not anint. pnameenforces a conservative prefixed-name subset and never injectsPREFIXdeclarations.$<…>percent-encodes each hole and validates the assembled IRI as absolute.
The raw type
raw inserts a value verbatim, unescaped. It is the single, auditable
unsafe path — declared in the frontmatter, so a reviewer greps one place. Never
feed user input into a raw parameter.
Up-front validation & fail-fast
The render context is validated against the header before any output is
produced. And the ${ } / $"…" / $<…> / {% … %} syntax and the leading
--- are invalid in SPARQL/Turtle/N-Triples, so a template that reaches a
parser unrendered fails loudly. The conformance suite checks both directions
with a real SPARQL parser.