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

@exercism/codemirror-lang-ballerina

Latest version: v1.0.1

Overview

Last scanned
29 Nov 2026
Published
29 Nov 2026
npm package Publisher: bnandras, demeter4ron, erikschierboom, glennj, ihid, isaacgood, joshgoebel, keiravillekode, lpil, neenjaw, oxe-i, sleeplessbyte
0 Stars
1 Forks
3 Versions
TypeScript Repo language

Scan summary

@exercism/codemirror-lang-ballerina was last scanned on 29 Nov 2026 at version 1.0.1. Risk score 0 of 100. No malicious behavior was detected.

  • Releases: 3 versions, all published on 29 Nov 2026.
  • Findings: No rules fired in version 1.0.1.

Versions

3 versions published
Versions and the rules that fired in each
VersionPublishedStatus
1.0.1 LATEST 29 Nov 2026 No rules fired
1.0.0 29 Nov 2026 No rules fired
0.0.0-stage 29 Nov 2026 Not shown

No rules fired in 1.0.1

Findings

Findings for v1.0.1. 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 1.0.1; other versions have their own rules, not their own score.

README

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

Ballerina language support for CodeMirror

NPM Version

This package gives the CodeMirror 6 editor a Lezer grammar for Ballerina, with highlighting, indentation, folding and completion. Exercism uses it in the editor for its Ballerina track.

To keep the package working on the Exercism website, don't change the versions of these packages:

"@codemirror/language": "^6.10.1",
"@lezer/highlight": "^1.2.0",
"@lezer/lr": "^1.4.0"

Install

  • NPM: npm install @exercism/codemirror-lang-ballerina
  • Yarn: yarn add @exercism/codemirror-lang-ballerina
  • Bun: bun add @exercism/codemirror-lang-ballerina

Usage

import { EditorView, basicSetup } from "codemirror";
import { ballerina } from "@exercism/codemirror-lang-ballerina";

new EditorView({
  doc: 'import ballerina/io;\n\npublic function main() {\n    io:println("Hello, World!");\n}\n',
  extensions: [basicSetup, ballerina()],
  parent: document.body,
});

ballerina() includes the completion. The package also exports ballerinaLanguage, the two completion sources (localCompletionSource and ballerinaCompletion) and the snippets.

What it covers

The grammar parses Ballerina Swan Lake: imports, functions (with block, => and external bodies), types (records, objects, unions, tuples, arrays, maps, tables, function types and singleton types), classes, services and resource functions, constants, enums, annotations and every statement, including match, do and on fail, lock, transactions and workers. Expressions include check, type tests and casts, lambdas, let, query expressions and query actions, template strings with ${...}, remote calls such as cl->get("/"), client resource access such as cl->/orders/[id].post(x), and XML navigation.

A statement can start with a type (Foo[] xs = [];) or with an expression (foo[i] = 1;). The parser tries both readings where they overlap and keeps the one that parses.

Two small tokenizers in src/tokens.js help the grammar:

  • One reads a module prefix such as io in io:println. Ballerina allows no space around the colon of a qualified name, so this tokenizer looks for a name, a colon and another name with nothing between them.
  • The other reads the / between the segments of a client resource access as a path separator, so it isn't read as a division.

The completion offers:

  • keywords, built-in types, true, false and null.
  • snippets for function, main, if, foreach, while, match, queries, record types, classes, services, resource functions, do and on fail, and import.
  • the functions, types, classes, constants, enum members, variables, parameters and import prefixes declared in the file, each only where it is in scope.
  • after a dot, the langlib methods for the value's type when the file declares it (such as push for an int[] or toUpperAscii for a string), the fields of a record type or class declared in the file, and the methods every value has. After self. it offers the fields and methods of the class.
  • after a module prefix such as io:, int:, string: or array:, that module's functions, types and constants. It follows import aliases, so import ballerina/lang.array as arr; makes arr: offer the array functions.
  • after import, the common standard library modules.

It offers nothing inside strings and comments, or while you type a new name.

Prerequisites

Setup

Run bun install to install all dependencies.

Developing

To help with development, run bun run dev. This will start a Vite dev server (usually at http://localhost:5173/) that renders the index.html file. The #editor element shows some sample Ballerina code, highlighted by the grammar in src/syntax.grammar. Any changes to the grammar will auto-refresh the dev server's rendered contents.

Structure

.
├── src
│   ├── index.ts (the language, with its highlighting, indentation and folding)
│   ├── complete.ts (the completion)
│   ├── syntax.grammar (the Lezer grammar)
│   ├── syntax.grammar.d.ts (the grammar typings)
│   └── tokens.js (the tokenizers for module prefixes and resource paths)
├── test
│   ├── cases (grammar test cases)
│   ├── grammar.test.ts (runs the grammar test cases)
│   ├── complete.test.ts (completion tests)
│   ├── editor.test.ts (indentation and folding tests)
│   └── lezer-plugin.ts (lets the tests import the grammar directly)
├── index.html (dev server file)
├── rollup.config.js (bundling config)
├── tsconfig.json (typescript config)
└── vite.config.js (vite dev server config)

Testing

Run bun test. The tests build the parser straight from src/syntax.grammar, so they don't need a build first.

Building

Run bun run prepare to build the package into dist/. It runs Rollup under Bun's runtime, because one of the Rollup plugins doesn't load in recent versions of Node.

Publishing

To publish a new version, set version in package.json and commit it. Then push a tag made of v followed by that version, for example v1.0.0. The tag starts the Publish workflow, which builds and tests the package and publishes it to npm. If the tag differs from version, the workflow stops before it publishes.

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 @exercism/codemirror-lang-ballerina

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

CVE

Java4Shell (CVE-2026-114938): Easy to Crash, Hard to Exploit — Less Than 0.12% of JVMs Estimated at Risk of RCE

Copy of Template Design OX Blog (1)
Research

Thousands Of GitHub Accounts Hijacked With wfx-loot CI Secret Stealing Malware Via GitHub Actions & npm

Plug and Pray: Your AI Agents Are Taking Orders From Strangers
Research

Plug and Pray: Your AI Agents Are Taking Orders From Strangers

Frame 2085668439 (1)
Group 1261154229