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-prolog

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-prolog 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.

@exercism/codemirror-lang-prolog

SWI-Prolog language support for CodeMirror 6: a Lezer parser for SWI-Prolog 7+ syntax, with highlighting, indentation, folding and completion. Exercism uses it in the Prolog editor on exercism.org.

npm install @exercism/codemirror-lang-prolog
import {EditorView, basicSetup} from "codemirror"
import {prolog} from "@exercism/codemirror-lang-prolog"

new EditorView({extensions: [basicSetup, prolog()], parent: document.body})

prolog() returns the LanguageSupport; prologLanguage is the LRLanguage.

Completion

prolog() adds prologCompletion as the language's completion source. It offers:

  • the variables of the current clause, when the word starts with an uppercase letter or _.
  • the predicates defined in the file, as name/N, and DCG nonterminals as name//N.
  • SWI-Prolog's built-in predicates, the most used library predicates (from lists, apply, aggregate, pairs, clpfd and others) with their arity, and the alphanumeric operators such as is and mod.
  • snippets for a rule, a fact, a DCG rule and directives where a new clause starts, and snippets for if-then-else, findall, forall, format, maplist and catch inside a clause.

It offers nothing inside comments, strings or quoted atoms. clauseSnippets, goalSnippets and globalOptions are exported for use in other completion sources.

What it parses

The operator and built-in tables come from SWI-Prolog 10.0.2 (see spec/prolog/SOURCE in the repository).

Operators are not parsed. Prolog programs change the operator table at run time with op/3, so no fixed grammar can build the right term for every program. This parser reads tokens and the structure that does not depend on operators: clauses and their end, the neck (:-, -->), compound terms, lists, curly terms, dicts and parentheses. Between those, terms are flat sequences: X is A + B is Variable Operator Variable SymbolAtom Variable. Operators declared in the edited file still tokenise; they are just not highlighted as operators.

Each clause is a Directive, Rule or Fact ending in End. The name of a clause's head is in HeadFunctor (after an optional Module:), the name of every other compound in Functor, followed by ArgList. Names are told apart by the tables: Operator (alphanumeric operators such as is, mod), Control (->, \+, call, true, ...), DirectiveName (dynamic, use_module, ...), Builtin (other built-in predicates, by name only), and plain Atom. f( is a compound and t{ a dict, f ( and t { are not, as in SWI-Prolog. Block comments nest, as in SWI-Prolog.

The parser is more lenient than SWI-Prolog: it accepts some input that SWI-Prolog rejects (X(a), digits out of range for their radix, unknown escapes). It only recognises ASCII digits in numbers, and a digit group split by a comment (1_000_/*c*/000) is not one number to it.

The tests check every token class and clause kind, and parse the .pl files of SWI-Prolog's own library: each file that SWI-Prolog's reader accepts must parse without error nodes and into as many clauses as SWI-Prolog reads terms. Exceptions are listed in test/KNOWN.md.

Building and testing

From the root of the repository, run pnpm install (which also builds the package into dist/), then pnpm -r run build to rebuild it and pnpm -r test to run the tests.

Files

Generated by pnpm generate (gen/tables.mjs in the repository) from a run of the pinned swipl: src/tables.ts, and in the repository spec/prolog/ops.json, spec/prolog/builtins.json and spec/prolog/SOURCE.

Hand-written: src/prolog.grammar, src/tokens.js (the tokenizer for names, symbol characters, clause ends, nested comments and quasi-quotations), src/highlight.ts, src/index.ts, the tests, and in the repository spec/prolog/control.json (the control constructs and directive names, which pnpm generate checks against the generated tables) and tools/.

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-prolog

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

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

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

Cry2Wolf: How to Tell a Real Bug from a Nothingburger
AI & VibeSec

Cry2Wolf: Not Every Branded Bug Deserves a Fire Drill

The 2026 Vulnpocalypse Hits PHP: Four Critical RCEs, but How Dangerous Are They?
Vulnerability Insights

The 2026 Vulnpocalypse Hits PHP: Four Critical RCEs, but How Dangerous Are They?

Frame 2085668439 (1)
Group 1261154229