@bolvrk/engine
v0.4.0
Published
Bolvrk rule engine: deterministic Postgres migration danger detection: parser, check pipeline, schema introspection and the free rule set.
Maintainers
Readme
@bolvrk/engine
The Bolvrk rule engine: deterministic Postgres migration danger
detection. A libpg_query (WASM) parser wrapper, the check pipeline, live-schema
introspection for tier-2 rules, team-policy and SARIF cores, the credentials scanner, and
the free rule set — the outage core (BV001–006, 008, 010, 011, 013–016) and credential
hygiene (BC001–006). Two licenses, (FSL-1.1-ALv2 AND Apache-2.0): the free rules in
src/rules/ are open source under Apache-2.0 — see src/rules/LICENSE;
the engine core (everything else) is source-available under FSL-1.1-ALv2 — see
LICENSE.md: use, modify and self-host it, no competing service; each version
converts to Apache-2.0 two years after release.
import { checkMigration, serializeReport } from "@bolvrk/engine";
const report = await checkMigration("CREATE INDEX idx_orders_region ON orders (region);");
console.log(serializeReport(report)); // byte-identical for identical inputcheckMigration runs the rules this package contains. To run a different or larger corpus,
pass it: runCheck(sql, rules, options) or checkMigration(sql, { rules }). The hosted
Bolvrk service composes its rules on top of this engine the same way.
Documentation for every free rule, with fixtures both directions, is in
docs/rules; the full corpus is at
bolvrk.com/roadmap#rules.
