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

@bagandev/liquid

Latest version: v0.0.7

Overview

Last scanned
29 Nov 2026
Published
29 Nov 2026
npm package Publisher: phothinmaung
0 Stars
0 Forks
4 Versions
634 Downloads
Rust Repo language

Scan summary

@bagandev/liquid was last scanned on 29 Nov 2026 at version 0.0.7. Risk score 0 of 100. No malicious behavior was detected.

  • Releases: 4 versions, all published within 6 days (24–29 Nov 2026).
  • Findings: No rules fired in version 0.0.7.
  • Downloads: 634 downloads.

Versions

4 versions published
Versions and the rules that fired in each
VersionPublishedStatus
0.0.7 LATEST 29 Nov 2026 No rules fired
0.0.5 25 Nov 2026 No rules fired
0.0.3 25 Nov 2026 No rules fired
0.0.1 24 Nov 2026 Not shown

No rules fired in 0.0.7

Findings

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

README

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

Rust Liquid

Liquid template rendering for Node.js, implemented in Rust and exposed through Node-API. LiquidEngine supports the standard Liquid filters and tags, custom JavaScript callbacks, partials, and layouts.

Installation

Install the published package:

npm install @bagandev/liquid

The package loads a native Node-API binding for the current platform. To build from this repository, install the Node.js dependencies and Rust toolchain, then run:

npm install
npm run build

Quick start

import { LiquidEngine } from "@bagandev/liquid";

const engine = new LiquidEngine();
const html = await engine.render(
  "Hello {{ name | upcase }}!",
  { name: "Ada" },
);

console.log(html); // Hello ADA!

render(template, context) returns a promise that resolves to the rendered string. The context should be a JSON-compatible object.

Custom filters, tags, and blocks

Register JavaScript callbacks to add template behavior. Filter callbacks receive the input and positional arguments. Tag callbacks receive evaluated arguments, while block callbacks receive the rendered block body and evaluated arguments.

const engine = new LiquidEngine()
  .registerFilter("currency", async (amount, [symbol = "$"]) =>
    `${symbol}${Number(amount).toFixed(2)}`,
  )
  .registerTag("badge", ([label]) => `<strong>${label}</strong>`)
  .registerBlock("panel", (body, [title = "Info"]) =>
    `<section><h2>${title}</h2>${body.trim()}</section>`,
  );

const html = await engine.render(
  '{% badge "New" %}{{ price | currency: "€" }} {% panel "Details" %}Item{% endpanel %}',
  { price: 12.5 },
);

Filters may return a value asynchronously. Tags and blocks may return a string or a promise resolving to one. Methods return the engine, so registrations can be chained.

Partials

Partials can be loaded from a directory, a JavaScript callback, or both. The default extension search order is .liquid, then .html.

const engine = new LiquidEngine()
  .setPartialsDir("./partials")
  .registerPartialLoader(async (name) => {
    if (name === "navigation") return "<nav>{{ title }}</nav>";
    return undefined;
  });

const html = await engine.render(
  '{% include "navigation" %}',
  { title: "Home" },
);

When both a loader and directory are configured, LoaderFirst is the default. Set the priority explicitly with .setPartialPriority("FileSystemFirst") or .setPartialPriority("LoaderFirst"). Use .setPartialExtensions(["html", "liquid"]) to change extension lookup order. A custom loader should resolve to the template source, or to undefined when it does not have that partial.

Layouts and front matter

Templates can choose a layout with YAML front matter or a leading Liquid layout tag. Layouts are loaded from a directory or a JavaScript callback. YAML keys (other than layout) are available under page; layout front matter is available under layout. The rendered inner template is available to the layout as content and content_for_layout.

const engine = new LiquidEngine().registerLayoutLoader(async (name) => {
  if (name === "base") return "<main>{{ content }}</main>";
  return undefined;
});

const html = await engine.render(
  "---\nlayout: base\ntitle: Welcome\n---\n<h1>{{ page.title }}</h1>",
  {},
);
// <main><h1>Welcome</h1></main>

You can also configure filesystem layouts with .setLayoutsDir("./layouts"). Layout extensions default to .liquid, then .html; configure their lookup order with .setLayoutExtensions(["html", "liquid"]). Use .setLayoutPriority("FileSystemFirst") or .setLayoutPriority("LoaderFirst") when both a directory and loader are configured.

Plugins

Use a plugin function to group engine configuration:

const commonFilters = (engine) => {
  engine.registerFilter("shout", async (value) => `${String(value).toUpperCase()}!`);
};

const engine = new LiquidEngine().use(commonFilters);

Front matter utilities

frontMatter(source) parses YAML front matter and returns { layout, body, frontMatter }. splitFrontMatter(source) returns the raw delimited block and the remaining body as { frontMatter, body }; if the delimiters are missing or incomplete, frontMatter is undefined and body contains the original source.

Development

Build the local binding used by the test suite, then run the tests:

npm run local:build
npm test

npm run build builds the package binding and generated JavaScript/type declarations. The test suite uses Node's built-in test runner.

Publishing

The release workflow publishes using npm trusted publishing. Before publishing, configure a GitHub Actions trusted publisher on npm for @bagandev/liquid and each platform package generated from napi.config.json. Use owner bagandev, repository liquid, workflow filename ci.yml, no environment, and allow direct npm publish. Packages must exist on npm before their trusted publishers can be configured; publish any new packages manually first. A newly configured publisher must publish within two days.

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 @bagandev/liquid

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

PolinRider Returns
Research

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

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