AbsoluteJS

@absolutejs/vulnerabilities-postgres

@absolutejs/vulnerabilities-postgresv0.9.3betaPlatform & Infra

Durable Postgres feeds, findings, alert incidents, policy history, delivery queues, remediation evidence, and risk assessments for AbsoluteJS vulnerability management.

#Installation

BASH
bun add @absolutejs/vulnerabilities-postgres

#Capabilities

Overview

Durable Postgres persistence for @absolutejs/vulnerabilities.

Applications already using Drizzle can keep the complete vulnerability lifecycle schema-derived:

The Drizzle store targets the standard vulnerability_ tables. Custom table prefixes and runtime schema bootstrap remain available through createPostgresVulnerabilityStore.

Show 2 more

The package stores complete provider snapshots and records, appendable sync history, tenant-scoped managed findings, correlation observations, VEX decisions and applications, remediation plans and evidence, risk assessments, immutable alert-policy versions, incident timelines, and leased notification deliveries. Snapshot replacement is one transaction, so readers never see a half-replaced record set. Schema creation is lazy and idempotent for the tagged-template adapter; Drizzle applications import the package tables and manage migrations.

The SQL surface is compatible with postgres.js and Neon-style tagged-template clients. Table prefixes are strictly validated before identifiers are included in SQL. Alert lifecycle mutations require a client with a begin transaction method, such as postgres.js or Bun SQL.

Outcomes

What you can build

Build on the supported package contract

Use @absolutejs/vulnerabilities-postgres through its supported public entry points.

Hardening checklist

Production guidance

Make every external boundary explicitPin the deployed @absolutejs/vulnerabilities-postgres version, replace example or memory-backed dependencies with durable implementations, bound external calls, protect credentials, and emit enough evidence to retry or recover safely.

Follow in order

Troubleshooting path

1
Trace from the first failed boundary
Reproduce the smallest canonical @absolutejs/vulnerabilities-postgres example, confirm the supported entry point and version in the API explorer, then inspect the first boundary that did not produce its documented result.

#@absolutejs/vulnerabilities-postgres quick start

Partial snippet

# @absolutejs/vulnerabilities-postgres

TS
import { createPostgresVulnerabilityStore } from "@absolutejs/vulnerabilities-postgres";
import postgres from "postgres";

const persistence = createPostgresVulnerabilityStore({
  sql: postgres(process.env.DATABASE_URL!),
});

const osvSnapshots = persistence.snapshots();
const alertPolicies = persistence.alertPolicies;
const alertIncidents = persistence.alertIncidents;

#@absolutejs/vulnerabilities-postgres quick start 2

Partial snippet

# @absolutejs/vulnerabilities-postgres

TS
import {
  createDrizzleVulnerabilityStore,
  vulnerabilityCoreDrizzleSchema,
} from "@absolutejs/vulnerabilities-postgres";
import { drizzle } from "drizzle-orm/bun-sql";

export const schema = {
  ...vulnerabilityCoreDrizzleSchema,
  // ...the rest of your application's tables
};
const db = drizzle({ client: sql });
const persistence = createDrizzleVulnerabilityStore(db);

#Public entry points

Supported entry points declared by this package manifest.

Package entry point declared in package.json.

@absolutejs/vulnerabilities-postgres@absolutejs/vulnerabilities-postgres/manifest@absolutejs/vulnerabilities-postgres/manifest.json

#Package commands

Scripts declared by this package manifest.

bun run buildrm -rf dist && bun build src/index.ts src/manifest.ts --outdir dist --target=bun --external @absolutejs/manifest --external @absolutejs/vulnerabilities --external '@absolutejs/vulnerabilities/*' --external @sinclair/typebox --external drizzle-orm --external 'drizzle-orm/*' --external postgres --external @neondatabase/serverless && tsc -p tsconfig.build.json && absolute-manifest emit
bun run check:packagebun run format && bun run typecheck && bun run test && bun run verify-package && bun run build && bun run verify-package --artifacts
bun run formatprettier --write "./**/*.{ts,json,md}"
bun run testbun test
bun run typechecktsc --noEmit

#API reference

Search the declarations exported by the current package type files. Expand a symbol to inspect its source-backed signature.

41 symbols
AlertPostgresTagtypePermalinkSource
TS
type AlertPostgresTag = {
    <T = unknown>(strings: TemplateStringsArray, ...values: unknown[]): PromiseLike<T[]>;
    begin?: <T>(callback: (sql: AlertPostgresTag) => Promise<T>) => Promise<T>;
    unsafe: (sql: string, ...args: never[]) => PromiseLike<unknown[]>;
};
Exported from @absolutejs/vulnerabilities-postgres