Introducing The Sweep: OX’s New Live Security Research Series
Register Now
Breaking: The 2026 Vulnpocalypse Hits PHP: Four Critical RCEs, but How Dangerous Are They?
Read the Report
Are you exposed? Connect your apps in minutes.
Scan your apps free

lemmascript

Latest version: v0.6.17

Overview

Last scanned
30 Nov 2026
Published
30 Nov 2026
npm package Publisher: fernanda_g, namin
210 Stars
26 Forks
16 Versions
131.6K Downloads
TypeScript Repo language

Scan summary

lemmascript was last scanned on 30 Nov 2026 at version 0.6.17. Risk score 0 of 100. No malicious behavior was detected.

  • Releases: 16 versions; the latest 4 were published within 6 days (25–30 Nov 2026).
  • Findings: No rules fired in version 0.6.17.
  • Downloads: 131,587 downloads.

Versions

16 versions published
Versions and the rules that fired in each
VersionPublishedStatus
0.6.17 LATEST 30 Nov 2026 No rules fired
0.6.16 30 Nov 2026 No rules fired
0.6.15 28 Nov 2026 No rules fired
0.6.13 25 Nov 2026 Not shown
0.6.11 22 Nov 2026 Not shown

No rules fired in 0.6.17

Findings

Findings for v0.6.17. The score is a capped sum of the weights of the rules that fired — not CVSS, not exploitability, and not a probability. It is not comparable across packages with different scan coverage.

The score describes 0.6.17; other versions have their own rules, not their own score.

README

The publisher’s own README, as collected from the registry.

LemmaScript (Tech Preview)

CI

A verification toolchain for TypeScript. Write ordinary TypeScript with //@ specification annotations. The toolchain generates verifiable code from your TypeScript — either in Dafny or Lean 4 (with Velvet 2).

See SPEC.md, DESIGN.md, and GETTING_STARTED.md.

For changes to LemmaScript itself, see CONTRIBUTING.md.

This is a Tech Preview: the core idea is there, but support, semantics, and ergonomics are still evolving.

See our blog post.

Examples and Case Studies

See the examples and case studies for verified TypeScript programs, libraries, and apps.

Setup

Prerequisites: Node.js >= 18. For the Lean backend: elan. For the Dafny backend: Dafny >= 4.x.

Install from npm:

npm install -g lemmascript

Or from source:

git clone https://github.com/midspiral/LemmaScript.git
cd LemmaScript && npm install && npm run build

Lean backend: from the LemmaScript source checkout, clone Velvet 2 as a sibling on the lemma2 branch:

git clone --branch lemma2 https://github.com/namin/velvet.git ../velvet
lake build

For an existing Velvet checkout, select the branch with:

git -C ../velvet fetch origin
git -C ../velvet checkout lemma2

The lemma branch is for the previous Velvet version. Use the Lean version pinned in lean-toolchain (currently 4.34.0); Lake resolves the Mathlib dependency. Velvet 2 does not require a Loom checkout or external Z3/cvc5 binaries. See SPEC_LEAN.md for the project layout and proof workflow.

Usage

Dafny backend
lsc gen --backend=dafny src/myModule.ts
lsc check --backend=dafny src/myModule.ts
lsc regen --backend=dafny src/myModule.ts

With no file argument, lsc check batches over LemmaScript-files.txt (one filepath [timeout] [extra dafny flags…] per line — the list tools/check.sh runs in CI).

From a sibling source checkout, the equivalent of lsc is npx tsx ../LemmaScript/tools/src/lsc.ts — no build step, toolchain edits apply immediately.

The Dafny backend generates two files per TS source: foo.dfy.gen (always regeneratable) and foo.dfy (source of truth, with LLM/user proof additions). The diff between them must be additions-only.

Register standalone Dafny laws under their TypeScript source in lemmascript.json.

{
  "proof-files": { "src/search.ts": ["proofs/search.dfy", "proofs/shared.dfy"] }
}

Paths are relative to the config file. Both lsc check src/search.ts and a workspace lsc check that includes src/search.ts pass its registered files directly to Dafny, so errors point to the law you edit.

Lean backend
lsc gen --backend=lean src/myModule.ts
lake build

Sub-packages

Claimcheck

lsc claimcheck forwards to lemmascript-claimcheck to sanity check the natural language //@ contract against the formal specifications.

Runtime precondition checks

lsc guard forwards to lemmascript-guard to generate a sibling *.guarded.ts module that checks //@ requires at runtime. Import its wrappers at application boundaries.

Continuous Integration

LemmaScript ships a reusable GitHub Actions workflow that regenerates your artifacts, verifies them, and fails the build if any committed generated file is out of date. Call it from your own repo's workflow:

# .github/workflows/lemmascript.yml
name: LemmaScript

on:
  push:
    branches: [main]
  pull_request:
    branches: [main]

jobs:
  verify:
    uses: midspiral/LemmaScript/.github/workflows/verify.yml@main
    with:
      backend: dafny      # dafny | lean | dafny-slow

The workflow installs the toolchain and (per backend) the Dafny or Lean stack, then runs tools/check.sh, which batches over a LemmaScript-files.txt at your repo root. This file is the list of sources CI verifies — you create and maintain it. One entry per line, filepath [timeout] [extra dafny flags…]:

src/domain.ts
src/patch.ts 120
src/heavy.ts 300 --isolate-assertions

The optional second column is a per-file timeout in seconds; anything after it is passed verbatim to Dafny. The same list drives lsc check locally when you run it with no file argument, so CI and your local runs verify exactly the same set. To verify additional Dafny files outside that list, add an executable check-extra.sh at the root and it runs automatically (Dafny backends only).

Inputs (all optional):

Input Default Purpose
backend dafny dafny, lean, or dafny-slow (isolate-assertions / long-running proofs)
node-version 24 Node.js version
ls-ref main LemmaScript ref to verify against
typecheck true Run npm ci && npm run typecheck in the calling repo first

To verify against both backends, add a second job with backend: lean.

Examples:

Annotations

//@ requires arr.length > 0
//@ ensures \result >= -1 && \result < arr.length
//@ invariant 0 <= i && i <= arr.length
//@ decreases arr.length - i
//@ type i nat

For the full surface, see SPEC.md.

File Structure

Dafny backend
File Generated? Purpose
.ts — TypeScript source with //@ annotations
.dfy.gen Yes Generated Dafny (merge base, always regeneratable)
.dfy Yes (initial) Annotated Dafny (gen + proof additions)
Lean backend
File Generated? Purpose
.ts — TypeScript source with //@ annotations
.types.lean Yes Lean types, namespace Pure defs
.spec.lean No Ghost definitions, helper lemmas
.def.lean Yes Velvet method definitions
.proof.lean No prove_correct with proof tactics

OX Radar and Response Center

Find threats in your stack.

OX Radar can check high-priority threats, like critical package CVEs, against your context.

Each incident is marked Detected or Not Detected with a remediation plan and proof all tracked in the Response Center.

Where it’s listed

The probe returned only these fields for this server — auth requirement, protocol and tool list weren’t observed, so they’re not shown (never guessed).

  • npm lemmascript

References

The publisher’s own links, as the registry reports them. These are not sources for the assessment on this page.

Powered by Read the latest findings

Scan your whole stack

Group 1261154050 1
Group 1261154050
 

From OX Research Newsroom

PolinRider Returns
Research

PolinRider Returns: Hijacked npm Packages Use Ethereum Blockchain to Conceal Malware Infrastructure

Critical Apache HTTP Server Flaw Exposes Web Servers to RCE (1)
CVE

CVE-2026-119618: Critical Apache HTTP Server Flaw Exposes Web Servers to Remote Code Execution

Vulnerability Insights

OpenSSH Password Authentication Bypass on Alpine Linux (*sshole) – CVE-2026-123158

Frame 2085668439 (1)
Group 1261154229