Commonplace kernel API
    Preparing search index...

    Security

    Report a vulnerability privately through this repository's Security tab ("Report a vulnerability"), not in a public issue. Say which entry point and input reproduce it (a file, a document, or the call and its arguments) and what happens: a crash, a hang, memory that grows without bound, output that carries markup or script, or a wrong answer the kernel accepts.

    The kernel is computation only. It opens no files and no network connections, and it evaluates no code it is given.

    Its entry points are built to answer input they cannot use with a refusal, never a throw or a model they cannot hold: loadMesh refuses a document whose records do not make a mesh, readStep refuses what it cannot read, and every verb refuses operands that are not finite. The writers (paperPageSVG, paperPDF, writeStep) escape every value they write from a model or a page.

    Reading untrusted files and documents is supported. Some reads and operations take time and memory that grow with the model, and a valid model can be large, so a host that serves other people should:

    • Run each untrusted job in its own worker or process, with a memory limit and a time limit (Node: worker_threads with resourceLimits, or a child process), and end it when the limit passes.
    • Not share one process between tenants. The kernel keeps process-wide state (tolerance settings, the postcondition gate's settings, caches keyed by content, the id counter): one tenant's settings and timing can be seen by, and can affect, another's work in the same process.
    • Serve SVG output as an image (<img> or a file), not inline in a page of its own origin, as for any generated markup.

    Security fixes go into the latest release.