Diagram Design: evidence-driven visual explanations
Diagram Design security: keep imported labels inert and review font and script boundaries
Distinguish a documented safe import contract from executed evidence, and understand why static output, pinned controllers and public fonts need separate checks.
What you will learn
- Imported content is not an instruction channel
- Review the artifact’s real resource behavior
- Operate with scoped validation
Before you start
- Basic HTML and SVG concepts
- Ability to distinguish a system relationship from its visual layout
Choose a useful representation, account for simplification and interpret checker findings within their real scope.
Key takeaways
- Treat labels, links and directives in imports as untrusted data.
- Inspect actual font and script behavior rather than relying on the word static.
- Source pinning and narrow tests complement, but do not replace, update review.
Imported content is not an instruction channel
The Mermaid reference describes a bounded text extractor for flowchart, sequence, state and ER grammars. It preserves semantic content while discarding renderer styling and click targets. A source label that resembles a shell command or an instruction to the agent must remain diagram data, not become permission to execute code or visit a URL.
Unsupported syntax should not be silently approximated by a different diagram type. The documented contract requires an explicit unsupported-input outcome instead of rendering it in an online editor as a fallback. This review inspected that contract but did not execute the Mermaid extractor, so it does not claim end-to-end import security validation.
Review the artifact’s real resource behavior
Static-by-default does not mean every possible artifact is offline or dependency-free. The README discusses font links and brand font sources, while motion has tighter restrictions and one pinned controller. Inspect the actual HTML, stylesheet references and export environment before deciding whether an artifact meets an offline or controlled-network policy.
The controller identity gate compares against a template in the same revision. It can detect an accidental per-diagram script change, but it cannot independently establish that a deliberately changed template is trustworthy. Review package updates, external resource origins and generated markup together, and keep arbitrary event handlers out of an assumed static delivery path.
Operate with scoped validation
The geometry probe read local synthetic files and launched no browser. It changed no host installation or profile and made no network request during cases. That narrow execution boundary makes the findings reproducible without granting the imported project access to a user’s existing diagrams or configuration.
For team use, review write destinations, profile ownership and publication permissions separately. Strip confidential architecture details before using public services or sharing artifacts. The repository’s security policy describes private reporting for suspected vulnerabilities; heuristic limitations documented in this lesson are not a broad security certification or an attack demonstration.
Implementation steps
- 1
Identify imported data and permitted output paths.
- 2
Check the supported grammar and failure behavior.
- 3
Review scripts, resource URLs and profile changes.
- 4
Run scoped checks and inspect the final artifact before sharing.
Copy-ready example
{
"reviewChecklist": {
"importGrammarVerified": false,
"labelsKeptInert": false,
"fontOriginsApproved": false,
"controllerRevisionReviewed": false,
"publicationDestinationApproved": false
},
"securityCertificationClaimed": false
}Frequently asked questions
Does static output guarantee zero network access?
Not universally. Font links or other resources in the actual artifact and export workflow must be inspected against the intended network policy.
Did this review execute the import and motion systems?
No. It inspected their documented contracts and executed only the unchanged rectangle checker on synthetic files.
Sources
- docs/adr/0001-static-by-default-single-pinned-controller.mdSource checked 2026-09-08
- skills/diagram-design/references/import-mermaid.mdSource checked 2026-09-08
- README.mdSource checked 2026-09-08
- SECURITY.mdSource checked 2026-09-08