Scan your whole stack
From OX Research Newsroom
Are you using @bagandev/liquid?
Find out what’s in your code.
Scan your apps free in minutes (opens in a new tab)Latest version: v0.0.7
@bagandev/liquid was last scanned on 29 Nov 2026 at version 0.0.7. Risk score 0 of 100. No malicious behavior was detected.
| Version | Published | Status |
|---|---|---|
| 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 |
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.
The publisher’s own README, as collected from the registry.
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.
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
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.
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 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.
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.
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);
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.
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.
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.
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.
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).
The publisher’s own links, as the registry reports them. These are not sources for the assessment on this page.